/** 
 *	AkaZora Javascript script.js
 * @author	Derek Nobuyuki Wallace, iGEN Knowledge Solutions, inc. http://www.igen.ca
 * @author	Dennis Lo, Dennis Lo Designs, http://www.dennislo.com
 *
*/


$(function(){
	$("#homeMasthead").cycle({pager:'#homeMastheadControl',pagerAnchorBuilder:function(index, slide){return '<a href="#!" class="mastheadButt">'+index+'</a>';}});
	$('.cloud-zoom,.cloud-zoom-gallery').CloudZoom();

	$("#pressImages").cycle({timeout:0,prev:'.pressPrevious',next:'.pressNext,#pressImages'});
	
	$(".regionSelectorLink").click(function(){
		var regionTarget = $(this).attr("rel");
		if(regionTarget=="") return false;
		if(regionTarget=="all"){
			$(".retailRegionGroup").fadeIn(400);
		}else{
			$(".retailRegionGroup").fadeOut(600,function(){
				//console.log("retailRegions_"+regionTarget);
				//console.log($("#retailRegions_"+regionTarget));
				$("#retailRegions_"+regionTarget).fadeIn(600);
			});
		}
		return false;
	});
	
	if($("#productGrid").length>0){$("#productGrid").vgrid({
		easeing: "easeOutQuint",
		time: 400,
		delay: 20,
		fadeIn: {
			time: 500,
			delay: 50
		}
	});}
	
	/*var getresults=function(results) {
		eval(results);
		if(window.drag_and_drop_cart_updater) {
			drag_and_drop_cart_updater();
		}
		if(document.getElementById('loadingimage') != null) {
			document.getElementById('loadingindicator').style.visibility = 'hidden';
		} else if(document.getElementById('alt_loadingimage') != null) {
			document.getElementById('alt_loadingindicator').style.visibility = 'hidden';
		}
		if((document.getElementById('sliding_cart') != null) && (document.getElementById('sliding_cart').style.display == 'none')) {
			jQuery("#fancy_collapser").attr("src", (WPSC_CORE_IMAGES_URL + "/minus.png"));
			jQuery("#sliding_cart").show("fast",function(){
				ajax.post("index.php",noresults,"ajax=true&set_slider=true&state=1");
			});
		}
		if(document.getElementById('fancy_notification') != null) {
			jQuery('#loading_animation').css("display", 'none');
		//jQuery('#fancy_notificationimage').css("display", 'none');
		}
	}*/
});




















