/* Author:
	Alter Imaging, Inc.
*/
// PLEASE COMMENT YOUR JS WELL
$(function(){

// PLACE jQUERY HERE

	// Prepare to submit a form
	$(".btn-submit").click(function(e){
		var target = $(this).closest("form");
		target.find("input[name='submitted']").val("y");
		target.submit();
		e.preventDefault();
	});

	// Add zoom and target to .pdf links, and remove background image from parent
	$("a[href*='.pdf']").each(function(){
		var href = $(this).attr("href");
		$(this)
            .attr("href", href+"#zoom=90").attr("target", "_blank")
            .parent("li").css({'background-image':'none'});
	});


	// Open external links in new window
	/*$("a[href^='http']").each(function(){
		$(this).attr("target", "_blank");
	});*/

	if ( $(".tmp-home").length ){
		$("#cycle").cycle();
	}
	
	$("input:text, input[type=email]").each(function(){
		if ( $(this).val() == "" ){
			$(this).addClass('placeholder');
		}
	});

	$("input:text, input[type=email]").blur(function(){
		if ( $(this).val() == "" ){
			$(this).addClass("placeholder");
		} else {
			$(this).removeClass("placeholder");
		}
	});

/* FAQ and Counselors */
	$(".expand").hide();

	$("a.trigger").click(function() {
		$(this).parent().next(".expand").toggle('fast');
		return false;
	});



});

// PLACE CUSTOM FUNCTIONS HERE




$(".answer").hide();

$('.faq').click(function(){
	
		$(this).find(".answer").slideToggle();
	
	});




















