$(document).ready(function() {
	$("#contact_drop").hover(function() {
		 $("#questions_content").slideDown(400);
		 $('a.questions').addClass("active");

	}, function() {
		 $("#questions_content").slideUp(400);
		 $('a.questions').removeClass("active");
	});
});

/* PRINT PAGE */
function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature.");
}



$(document).ready(function() {
	$('.fadeThis').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});
	
	$("a.anchorLink").anchorAnimate();
});

$(document).ready(function(){
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	$('.acc_trigger').click(function(){
			$(this).toggleClass('active').next().slideUp(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
			$(this).html('<a href="#">Expand To Read More</a>');
			return false; //Prevent the browser jump to the link anchor
	});
	//On Click
	$('.acc_trigger').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
			$(this).html('<a href="#">Read Less</a>');
		}
		return false; //Prevent the browser jump to the link anchor
	});
});


/* SCROLLING ANCHOR */

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 800
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}

