// PLEASE COMMENT YOUR JS WELL
$(function(){

// PLACE jQUERY HERE

	// Prepare to submit a form
	/*$(".btn-submit").click(function(){
		var target = $(this).closest("form");
		target.find("input[name='submitted']").val("y");
	});*/

	// Add zoom and target to .pdf links
	$("a[href*='.pdf']").each(function(){
		$(this).attr("target", "_blank");
		var href = $(this).attr("href");
		$(this).attr("href", href+"#zoom=90");								  
	});
	
	// Home page slideshow
	if ( $("#slideshow").length ){
		//$("#slideshow").cycle();
	}
	
	// Switch out product images in the product detail sidebar
	$(".thumb-sm-wrapper").click(function(){
		src = $(this).children("img").attr("src");
		$(".thumb-lg-wrapper img").attr("src", src);
		return false;
	});
	
	// FAQ
	$(".faq-q a").click(function(){
		$(".faq-a.open").slideUp('fast').removeClass("open");
		$(this).parent().next(".faq-a").addClass("open").slideDown('fast');							 
	});
	
	
});

// PLACE CUSTOM FUNCTIONS HERE

