google.load("jquery","1.4.2");

google.setOnLoadCallback(function(){
	
	$.ajaxSetup({async: false});
	$.getScript("js/jquery.cycle.js");
	$.ajaxSetup({async: true});
	
	$.ajaxSetup({async: false});
	$.getScript("js/jquery.color.js");
	$.ajaxSetup({async: true});
	
	$.ajaxSetup({async: false});
	$.getScript("inc/jquery.printit.js");
	$.ajaxSetup({async: true});
	
	$("#headerPhotos").cycle();
	
	$("#topNav ul li a").hover(function(){
	
		$(this).animate({ color: "#830" });
										
	},function(){
											
		$(this).animate({ color: "#fff" });
		
	});
	
	if($.inArray("roxi", getUrlVars())>-1) {
		
		$("#gemMine").css("display","block");
	
	}
	
	$("#coupon").click(function(){
	
		theURL=$(this).attr("href");
		
		printPopup = window.open(theURL,"coupon","width=500,height=300,scrollbars=no,toolbar=no,menubar=no,location=no,status=no");
		setTimeout('printPopup.window.print()',500);
		setTimeout('printPopup.close()',1500);
		
		return false;
								
	});
	
});


function getUrlVars()

{

	var vars = [], hash;
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

	for(var i = 0; i < hashes.length; i++)

		{

			hash = hashes[i].split('=');
			vars.push(hash[0]);
			vars[hash[0]] = hash[1];

		}

	return vars;

}