jQuery(function($) { // Tell BC this is jquery
	 	 
 // Popbox for English or Spanish
    switch (box) {
		case "en":
			$(".box-en").addClass("show");
			break;
		case "es":
			$(".box-es").addClass("show");
			break;
		default:
			$(".box-es").addClass("show");
	}
	
	// Remove any empty images
	$("img[src='']").remove();
	// End Remove any empty images
	
 // End Popbox for English or Spanish

// Fancy Transitions http://workshop.rs/projects/jqfancytransitions/

	$("#slideshow").jqFancyTransitions({
		effect: 'curtain', // wave, zipper, curtain
		width: 930, // width of panel
		height: 138, // height of panel
		strips: 20, // number of strips
		delay: 5000, // delay between images in ms
		stripDelay: 60, // delay beetwen strips in ms
		titleOpacity: 0.7, // opacity of title
		titleSpeed: 1000, // speed of title appereance in ms
		position: 'alternate', // top, bottom, alternate, curtain
		direction: 'alternate' // left, right, alternate, random, fountain, fountainAlternate 
	}); 

// End Fancy Transitions

// FlowPlayer

	$("#player").flowplayer("/flowplayer/flowplayer-3.1.5.swf", {
		clip:  { 
			autoPlay: false, 
			autoBuffering: true,
			cachebusting: true
		} 
	});
	// Add wmode opaque
	//$(document.createElement('param'))
	//	.attr("name", "wmode")
	//	.attr("value", "opaque")
	//	.appendTo("#player object");
// End FlowPayer

	
// Color Box Lightbox
	$(".popup-video").colorbox({innerWidth:646,innerHeight:366}); 
	$(".popup-slide[rel='group1']").colorbox({slideshow:true,slideshowSpeed:"5000"});
	$(".popup-slide[rel='group1']:gt(0)").hide();
	$(".popup-slide[rel='group2']").colorbox({slideshow:true,slideshowSpeed:"5000"});
	$(".popup-slide[rel='group2']:gt(0)").hide(); 
	$(".popup-slide[rel='group3']").colorbox({slideshow:true,slideshowSpeed:"5000"});
	$(".popup-slide[rel='group3']:gt(0)").hide(); 

// End Color Box Lightbox

// Image Error Handeler for Colorbox Slideshows

	$("a[href='']").remove();
	
// Image Error Handeler for Colorbox Slideshows


// Menu http://qrayg.com/experiment/cssmenus/

	$("#nav_833437 li").hover( function() { $(this).addClass("iehover"); }, function() { $(this).removeClass("iehover"); } ); 
	$("#nav_850742 li").hover( function() { $(this).addClass("iehover"); }, function() { $(this).removeClass("iehover"); } );
	$("#nav_863785 li").hover( function() { $(this).addClass("iehover"); }, function() { $(this).removeClass("iehover"); } ); 
	$("#nav_863785 li").hover( function() { $(this).addClass("iehover"); }, function() { $(this).removeClass("iehover"); } );

// Menu

}); // End BC this is jquery
