$(document).ready(function() {
	equalHeight($(".featureHolder"));
	$("#rotate > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 8000, true);
	$("#featureImage > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 4000, true);
});
// Adding equal heights to columns on the home page
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}


// Allows passing of clip file name to popup window
function playClip(file,title,refresh){
	if (refresh==null) refresh = 0;
	window.open('/wmplayer.php?f='+file+'&t='+title+'&r='+refresh,'_blank','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,scrollbars=0,location=0,width=400,height=400,left=50,top=50')
}

function writePlayer(file) {
	document.write('<object id="MediaPlayer" width=320 height=310 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">')
	document.write('<param name="filename" value="'+file+'">')
	document.write('<param name="showControls" value="True">')
	document.write('<param name="showTracker" value="true">')
	document.write('<param name="showStatusBar" value="true">')
	document.write('<param name="showDisplay" value="false">')
	document.write('<param name="autoStart" value="True">')
	document.write('<param name="loop" value="false">')
	document.write('<param name="transparentatStart" value="true">')
	document.write('<param name="animationatStart" value="true">')
	document.write('<param name="scale" value="aspect">')
	document.write('<embed type="application/x-mplayer2" src="'+file+'" name="MediaPlayer" width=320 height=310 showStatusBar="1" showControls="1" showTracker="1" showDisplay="0" autoStart="1" loop="-1" bgColor="darkblue" kioskMode="true" scale="aspect" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" autosize="-1"></embed>')
	document.write('</object>')
}

