$(document).ready(function(){
						   
	if ($("#home").length) {
		// Change these 2 values to edit number and/or size of images
		
		var quotesCount = 5;
		var imgWidth = 275;
		$("#plate").show();
		var quote = Math.floor(Math.random()*quotesCount)+1;
		var quoteDir = '_images/beliefs/';
		var img_src = quoteDir + quote + '.gif';
		
		$("#believe-quote").attr({src: img_src}).attr("style", "width:"+imgWidth+"px;height:"+imgWidth+"px;left:"+($("#content-bg").width()/2 - imgWidth/2)+"px;top:"+($("#content-bg").height()/2 - imgWidth/2)+"px;").animate({opacity: 1.0}, 750).fadeIn("slow").animate({opacity: 1.0}, 2000).fadeOut("slow", function(){$("#plate").fadeOut();});

	}

	if ($(".collection").length) {

		$("#buynow").click(function(){
			//$("#shield").animate({opacity: .75}, 1).fadeIn("fast", function(){$("#confirm-buy").fadeIn("fast")});
			$("#plate2").animate({opacity: .75}, 1).fadeIn("fast", function(){$("#confirm-buy").fadeIn("fast")});
			return false;
		});
		$("#cancel").click(function(){
			$("#confirm-buy").fadeOut("fast", function(){$("#plate2").fadeOut();});
			return false;
		});
	}
	
	if ($("#signup").length) {
		$(".reset").click(function(){
			$(".form-error").removeClass("form-error");	
			$(".form-error-msg").hide();
		});
	}

});

function popup(page, width, height) {
	newwindow=window.open(page,'pwindow','status=0,menubar=0,toolbar=0,resizable=0,scrollbars=1,width='+width+',height='+height);
	if (window.focus){newwindow.focus()}
}


