$(document).ready(function(){
	
	$('#strPrd').change(function(){
		$("#prcPostcard").hide();
		$("#prcBrochure").hide();
		$("#prcBooklets").hide();
		$("#prcPosterss").hide();
		$("#pricequotepcard").html("");
		$("#pricequotebrc").html("");
		$("#pricequotebklt").html("");
		$("#pricequotepstr").html("");
		$("#shipquotepcard").html("");
		$("#" + this.value).fadeIn("slow");
	});
	
	$('.PricingInputPcard').change(function(){
		$.ajax({
		   type: "POST",
		   url: "/PricingPostcards.asp",
		   data: "strPages="+$('#strPagesPcard').val()+"&strSize="+$('#strSizePcard').val()+"&strColor="+$('#strColorPcard').val()+"&strQuantity="+$('#strQuantityPcard').val(),
		   success: function(html){
			   $("#pricequotepcard").html(html);
			   }
		});
	});
	
	$('#getShipPcard').click(function(){
		$.ajax({
		   type: "POST",
		   url: "/ShippingPostcards.asp",
		   data: "strSize="+$('#strSizePcard').val()+"&strQuantity="+$('#strQuantityPcard').val()+"&strDestZip="+$('#destZipPcard').val(),
		   success: function(html){
			   $("#shipquotepcard").html(html);
			   }
		});
	});
	
	$('.PricingInputBrochure').change(function(){
		$.ajax({
			   type: "POST",
			   url: "/PricingBrochures.asp",
			   data: "strPaper="+$('#strPaperBrochure').val()+"&strFold="+$('#strFoldBrochure').val()+"&strColor="+$('#strColorBrochure').val()+"&strQuantity="+$('#strQuantityBrochure').val(),
			   success: function(html){
				   $("#pricequotebrc").html(html);
				   }
			});
	});
	
	$('.PricingInputBooklets').change(function(){
		$.ajax({
			   type: "POST",
			   url: "/PricingCatalogs.asp",
			   data: "strPages="+$('#strPagesBooklets').val()+"&strSize="+$('#strSizeBooklets').val()+"&strColor="+$('#strColorBooklets').val()+"&strQuantity="+$('#strQuantityBooklets').val(),
			   success: function(html){
				   $("#pricequotebklt").html(html);
				   }
			});
	});
	
	$('.PricingInputPoster').change(function(){
		$.ajax({
			   type: "POST",
			   url: "/PricingPosters.asp",
			   data: "strSize="+$('#strSizePosters').val()+"&strPaper="+$('#strPaperPosters').val()+"&strColor="+$('#strColorPosters').val(),
			   success: function(html){
				   $("#pricequotepstr").html(html);
				   }
			});
	});
	
	$('#vidButton').click(function(){
		$('#samplevid').show();
		$('#samplez').hide();
	});
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: false, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded' /* light_rounded / dark_rounded / light_square / dark_square */
	});
	
	$('a.deleteDesign').click(function(){
		var answer = confirm("Are you sure you want to delete this design?");
		if (answer) {
			$.ajax({
			   type: "POST",
			   url: "/delete-design/"+$(this).attr("rel")+"/",
			   data: "id="+$(this).attr("rel"),
			   success: function(html){
			   	   $("#row"+html).css("background-color","#ff0000");
				   $("#row"+html).fadeOut("slow");
				   }
				});
			return false
			}
		});
	
});