var translatemenudone = findmenudone = 0;

$(document).ready(function() {
	$('div').pngFix( );
	activatemenu("#findlink","findmenudone", "#quicklinkscontent", "#findlink", "over");
	$('.collapsiblelist li>ul').each(function(i) {
		var parent = $(this).parent('li');
		parent.addClass('closed');
		var children = $(this).remove();
		parent.prepend('<span class="toggle">-</span>').find('span').toggle(
			function() {
				parent.removeClass('closed');
				parent.addClass('open');
				children.show();
			},
			function() {
				parent.removeClass('open');
				parent.addClass('closed');
				children.hide();
			}
		);
		parent.append(children);
	});
	$('.collapsiblelist ul ul').hide();
	$(".striped tr:even").addClass("alt");
////BEGIN System Maintenance notice	
	/*$("body").addClass("syswidenotice");
	$('.syswidenotice').wrapInner('<body + style="position: relative; min-height: 100%; top: 0px;" + />');
	$('.syswidenotice').append('<p id="imisnotice"><strong>Notice:</strong> Our systems will be unavailable Friday, January 7 at 5:00 PM &mdash; Sunday, January 9 at 11:30 PM for scheduled maintenance.</p>');*/
////END System Maintenance notice
});


function activatemenu(id, storedlocation, menu, linkover, classover) {
	var trackerID;
	$(id).mouseover(function() {				 	
		if(eval(storedlocation) == 0) {
			trackerID = window.setTimeout('showMenu("' + storedlocation + '","' + menu + '","' + linkover + '","' + classover + '")',250);
		} else { 
			window.clearTimeout(trackerID); }
	   });
		$(id).mouseout(function() {
			window.clearTimeout(trackerID);
			trackerID = window.setTimeout('clearMenu("' + storedlocation + '","' + menu + '","' + linkover + '","' + classover + '")',250);
	   }); 
		$(menu).mouseover(function() {
			window.clearTimeout(trackerID);
			$(menu).show("");
			$(linkover).addClass(classover);
	   }); 
		$(menu).mouseout(function() {
			window.clearTimeout(trackerID);
			trackerID = window.setTimeout('clearMenu("' + storedlocation + '","' + menu + '","' + linkover + '","' + classover + '")',250);
	   });	
}

function showMenu(storedlocation, menu, linkover, classover) {
		eval(storedlocation+"=1;");
    	$(menu).slideDown("fast"); 
		$(linkover).addClass(classover);
}
 function clearMenu(storedlocation, menu, linkover, classover) {
		eval(storedlocation+"=0;");
		$(menu).stop();
		$(menu).hide("");
		$(linkover).removeClass(classover);
}


/*
Wrote by jose.nobile@gmail.com
Free to use for any purpose
Tested at IE 7, IE 8, FF 3.5.5, Chrome 3, Safari 4, Opera 10
Tested with Object[classid and codebase] < embed >, object[classid and codebase], embed, object < embed > -> Vimeo/Youtube Videos
Please, reporte me any error / issue
*/
window.setTimeout('window.fix_wmode2transparent_swf()', 200);
window.fix_wmode2transparent_swf = function  () {
	if((typeof (jQuery) == "undefined")||(!Spry.Widget.Tooltip.onloadDidFire)) {
		window.setTimeout('window.fix_wmode2transparent_swf()', 200);
		return;
	}
	if(window.noConflict)jQuery.noConflict();
	// For embed
	jQuery("embed").each(function(i) {
		var elClone = this.cloneNode(true);
		elClone.setAttribute("WMode", "Transparent");
		jQuery(this).before(elClone);
		jQuery(this).remove();
	});	
	// For object and/or embed into objects
	jQuery("object").each(function (i, v) {
	var elEmbed = jQuery(this).children("embed");
	if(typeof (elEmbed.get(0)) != "undefined") {
		if(typeof (elEmbed.get(0).outerHTML) != "undefined") {
			elEmbed.attr("wmode", "transparent");
			jQuery(this.outerHTML).insertAfter(this);
			jQuery(this).remove();
		}
		return true;
	}
	var algo = this.attributes;
	var str_tag = '<OBJECT ';
	for (var i=0; i < algo.length; i++) str_tag += algo[i].name + '="' + algo[i].value + '" ';	
	str_tag += '>';
	var flag = false;
	jQuery(this).children().each(function (elem) {
		if(this.nodeName == "PARAM") {
			if (this.name == "wmode") {
				flag=true;
				str_tag += '<PARAM NAME="' + this.name + '" VALUE="transparent">';		
			}
			else  str_tag += '<PARAM NAME="' + this.name + '" VALUE="' + this.value + '">';
		}
	});
	if(!flag)
		str_tag += '<PARAM NAME="wmode" VALUE="transparent">';		
	str_tag += '</OBJECT>';
	jQuery(str_tag).insertAfter(this);
	jQuery(this).remove();	
	});
}

/* End */



