// JavaScript Document

var oldTarg =0; 
function menuToggle(targ){
	$("#menu_" + targ).addClass("hot");
	if(oldTarg != targ && oldTarg != 0) {
		$("#" + targ).slideToggle("fast");
		$("#" + oldTarg).hide();
		$("#menu_" + oldTarg).removeClass("hot");
	}
	oldTarg = targ;
}

function loadVideo(targ){
	filePath = "../../html/vids/";
	dump = '<embed src="'+filePath+targ+'.mov" id="vid_clip" name="vid_clip" pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" autoplay="true" bgcolor="730A0A" height="255" hspace="0" vspace="0" width="320">';	
 	$("#video_box span").hide()
 	.html(dump)
 	.fadeIn("fast");
}

$(document).ready(function() {
	menuToggle('video_mgr');
	$('#content').fadeIn("slow", function(){
		
	});
	$(".vid_select").hover(function(){
		$(this).find("img").css("width", "120px");
		$(this).find("img").css("height","90px");
		$(this).find("img").css("marginLeft", "-27px");
		$(this).find("img").css("marginTop", "-23px");
		nTest = $(this).css("z-index");
		$(this).css("z-index","100");
		$(this).find(".tools").css("display","block");
		$(this).find(".title").css("display","block");
		$(this).find(".title").css("marginLeft", "-27px");
	},function(){
		/**/
		$(this).find("img").css("width", "60px");
		$(this).find("img").css("height", "45px");
		$(this).find("img").css("marginLeft","0px");
		$(this).find("img").css("marginTop","0px");
		$(this).css("z-index", nTest);
		$(this).find(".tools").css("display","none");
		$(this).find(".title").css("display","none");
	});

	Date.firstDayOfWeek = 7;
	Date.format = 'yyyy/mm/dd';
	$('input.date-picker').datePicker({startDate:'01/01/1996',clickInput:true});


});

function popWindow(theURL, popW, popH, scroll) {
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable';
	Win = window.open(theURL, "video_window", winProp);
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }

}
 