//Custom functions for yeejeetso.com
//Author: Richard Greenwood

// CASCADE BROWSER
//---------------------------

// shows / hides children in column two
// requires scriptaculous
function showColumnTwo(c, l, m) {
	for (var i = 0; i < l; i++) {
		var id = m + '-'+ i; // creates the correct id string
		if ($(id).hasClassName(c)) {
			$(id).appear({duration: .25});
		} else {
			$(id).hide();
		}
	}
}


// shows / hides column three content
// requires scriptaculous
var r;
function showColumnThree(id) {
	if (r) { $(r).hide(); }
	Effect.Appear(id, {duration: .25});
	r = id;
}

// Sets and unsets active class
// requires prototype
// window[x] : http://adityamukherjee.com/geekaholic/archives/192
// usage: setActive(['id of element'], [ 'a' | 'b' ]);
var a, b;
function setActive(id, f) {
	if (window[f]) { $(window[f]).toggleClassName('active'); }
	$(id).addClassName('active');
	window[f] = id;
}
	
//Sets / Replaces the flash content
//usage: loadReel(STRING [path to flv], NODE REFERENCE [reference to anchor to set down state]);function loadReel(path, id) {
	//sets down state on anchors
	setActive(id, 'a');
		//swfobject code	var flashvars = {};	flashvars.pathToFlv = path;	flashvars.pathToSkin = "/wp-content/themes/ilsa/media/SkinOverPlayStopSeekFullVol.swf";	var params = {};	var attributes = {};	swfobject.embedSWF("/wp-content/themes/ilsa/media/reel.swf", "reel", "640", "360", "9.0.0", false, flashvars, params, attributes);}

