/* Misc Scripts */

$(document).ready(function () {
	
	// Widow fix for home page white boxes
	//	$('.whiteBox p').widowFix();

// Prettyphoto

/*    $("a[rel^='prettyPhoto']").prettyPhoto(); */

			
	$("a[rel^='prettyPhoto']").prettyPhoto({
		flash_markup: '<object id="myplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
			theme:'facebook',
			opacity: 0.60
			});	
	
	$(".videoWrapper span").click(function(){
	     window.location=$(this).prev("a").attr("href");
	     return false;
	});




// Easy List Splitter code 

	$('.twoColH').easyListSplitter({ 
	   colNumber: 2, 
	   direction: 'horizontal' 
	});
	$('.twoColV').easyListSplitter({ 
	   colNumber: 2, 
	   direction: 'vertical' 
	});
	$('.threeColH').easyListSplitter({ 
	   colNumber: 3, 
	   direction: 'horizontal' 
	});
	
// Toggle Show/Hide code 

	$(".toggleButton").click(function () {
	    if ($(this).siblings(".bio").is(":hidden")) {
	        $(this).siblings(".bio").slideDown("slow");
	        $(this).text('Hide Bio');
	    } else {
	        $(this).next(".bio").slideUp("slow");
	        $(this).text('View Bio');
	    }
	});
	
// Add VideoJS to all video tags on the page when the DOM is ready

    //VideoJS.setupAllWhenReady();

});
