//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
// 															jQuery & Other Scripts
//
//  					TO DO: Remove Spry Effects; replace with jQuery fade
//
//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

$(window).load(function() { //  $(window).load(function() {     $(document).ready(function(){ 
		// We only want these styles applied when javascript is enabled
		$('.prevent-fouc').css('display', 'block');
		$('.fade-in').css({'opacity':0 , 'visibility': 'visible'}).animate({opacity:1}, 1000);
});
	
//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
// 															SSP Scripts
//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

// ========================= Permalinks 
function flashPutHref(href) { location.href = href; } 
// ========================= SlideShowPro HTML links 
function sspToggleDisplayMode() {
		thisMovie("flashcontent").sspToggleDisplayMode(null); // null added in AS3 ver.
}
function sspToggleGallery() {
		thisMovie("flashcontent").sspToggleGallery(null); // null added in AS3 ver.
}
//Passes the ID of the album from the XML file we want SlideShowPro inside the SWF to load
function sspLoadAlbum(album) {
		thisMovie("flashcontent").sspLoadAlbum(album);
		//alert(album);
}
/*function sspLoadImageNumber(number) {
	thisMovie("flashcontent").sspLoadImageNumber(number);
}	*/

// for SWFObject  http://wiki.slideshowpro.net/SSPfl/C-ControlSSPHtmlJavascript	
// This is what we'll call from our hyperlinks to communicate with the SWF that has been assigned an ID of ssp. Flash automatically creates the ID for you as part of your player embed code using the title of your SWF (minus the ".swf"). If you're using the code Flash publishes to embed your movie, check to see what this ID is. Or if you're using a third party embedding script (like SWFObject), name the ID yourself. Doesn't matter what ID is assigned, as long as Javascript knows what it is.
function thisMovie(flashcontent) {  
	 	return swfobjectSSP.getObjectById(flashcontent);  
}

//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
// 															Swap Class 
//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

// toggle active/inactive class on a link based on album-id loading in ssp
// Andrey S.
var jsReady = false;
var currentID = "";

// Called when page is loaded.
function pageInit() 
{
	jsReady = true;		
}
// Called from Flash application to see if the page loaded and ready to receive calls from swf.
function isReady() 
{
	return jsReady;
}	
// Receive data from SWF application

function updateJavaScript(albumID)
{	
	// Jason V.
	// If clicking on 3d view, load colorbox.
	if (albumID == 'album-266284')
	{
		$('.colorbox').click();
	}
	// Remove active class from any active link
	$('.active').removeClass('active');
	// Add active class to current link.
	//$('#' + albumID).addClass('active'); 	// id
	$('.' + albumID).addClass('active'); 		// class
}
//••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
