$(document).ready(function () {
	$("#loader").fadeOut(2000, function() {
	$("#loader").css("display","none");
});

	$('.flasher').hide().fadeIn(2200);
	
	
	$('#sliderone').cycle({
      	fx:     'fade',
      	speed:   1000,
      	timeout: 7000,
      	delay:  4000,
		sync:          1,
		next:   '#sliderNext',
		prev:   '#sliderPrev'
	});
	
	$('#slidertwo').cycle({
      	fx:     'fade',
      	speed:   800,
      	timeout: 7000,
      	delay:  4000,
		sync:          0,
		
		next:   '#sliderNext',
		prev:   '#sliderPrev'
	});
	
	// Pause the cycle
	$('#pauseButton').click(function() { 
		$('#slidertwo').cycle('pause');
		$(this).hide();
		$('#resumeButton').show();
		return false;
	});
	
	// Resume the cycle
	$('#resumeButton').click(function() { 
		$('#slidertwo').cycle('resume');
		$(this).hide();
		$('#pauseButton').show();
		return false;
	});
	
	
	
	$('#pauseButton').click(function() { 
		$('#sliderone').cycle('pause');
		$(this).hide();
		$('#resumeButton').show();
		return false;
	});
	
	// Resume the cycle
	$('#resumeButton').click(function() { 
		$('#sliderone').cycle('resume');
		$(this).hide();
		$('#pauseButton').show();
		return false;
	});
	

	
	$('#hideText').click(function() {
								 
		if($('#hideText').hasClass('cp-view')) {
			$('.textCaptures').stop().animate({left: "0px"}, 800);	
			$('#hideText').removeClass('cp-view');
		}
		else {
		$('#hideText').addClass('cp-view');
		$('.textCaptures').stop().animate({left: "-340px"}, 800);	
		}
	});
	
		$(".photoTourDrawer").hide();
	$('#tourShow').click(function() {
		$(".photoTourDrawer").slideToggle('slow');							  
	});
	//Hide (Collapse) the toggle containers on load
	$(".answer").hide(); 

	//Switch the "Open" and "Close" state per click
	$(".question").toggle(function(){
									   
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$(".question").click(function(){
		$(this).next('div.answer').slideToggle("medium");
	});
	
	



	
});