var windowVideo;
function launchVideo() {
	windowVideo = window.open("http://www.elocallink.tv/vp6/spon-fcsa.php?sponid=BzBQYw5rUTAONQ==&fvm=1","video", "width=700,height=600,screenX=120,screenY=120");
}


function getQueryStringValue(ji) {
	var hu = window.location.search.substring(1);
	var gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		var ft = gy[i].split("=");
		if (ft[0] == ji) { return ft[1]; }
	}
}


function showCompletedProject(wcCat,wcProject) { // displays deep-linked project (Completed)
	// Set category menu
	var thisCatBtn = wcCat;
	var thisSubCatSet = (wcCat + "_Projects");
	$("#" + thisCatBtn).addClass("Selected");
	$("#" + thisSubCatSet).fadeIn("slow");	
	// hide default subcat menu & default panel
	$("#Intro").hide();
	$("#Default").hide();
	// Set subcat menu
	var thisSubCatBtn = wcProject;
	var thisDetail = (wcProject + "_Details");
	$("#" + thisSubCatBtn).addClass("Selected");
	// Load project
	$("#" + thisDetail).after('<div class="Loading"><img src="/wp-content/themes/WAT/images/portfolio/loaderb32.gif" height="32" width="32" /></div>');
	$("#" + thisDetail).load('/wp-content/portfolio/'+thisSubCatBtn+'.php');

}


function showCurrentProject(wcProject) { // displays deep-linked project (Current)
	// hide default subcat menu & default panel
	$("#Intro").hide();
	$("#Default").hide();
	// Set subcat menu
	var thisSubCatBtn = wcProject;
	var thisDetail = (wcProject + "_Details");
	$("#" + thisSubCatBtn).addClass("Selected");
	// Load project
	$("#" + thisDetail).after('<div class="Loading"><img src="/wp-content/themes/WAT/images/portfolio/loaderb32.gif" height="32" width="32" /></div>');
	$("#" + thisDetail).load('/wp-content/portfolio/'+thisSubCatBtn+'.php');

}


function displayAJAXProject(xID) { // this function is called by individual project files - $(document).ready
	$('.Loading').remove(); // hide "loading" anim
	$("#"+xID+"_Details").fadeIn(); // show project content
	// PROJECT PHOTO SLIDESHOWS: cm_Speed, cm_Timeout & cm_Delay defined in parent $(document).ready
	$('#SS_'+xID).cycle({ fx: 'fade', speed: cm_Speed, timeout: cm_Timeout, delay: cm_Delay, sync: true,
		pager: '#SNav_'+xID, pagerAnchorBuilder: function(idx, slide) { return '#SNav_'+xID+' li:eq(' + idx + ') a'; },
		pagerEvent: 'click', pauseOnPagerHover: true, pause: 1
	});
}


