/* Slider Hook */
$(function(){
	$('#slides').slides({
		preload: true,
		/*preloadImage: 'img/loading.gif',*/
		play: 6500,
		pause: 2500,
		effect: 'slide',
		generatePagination: true,
		hoverPause: true,
		animationStart: function(current){
			$('.slide_caption').animate({
				bottom:-60
			},100);
			if (window.console && console.log) {
				console.log('animationStart on slide: ', current);
			};
		},
		animationComplete: function(current){
			$('.slide_caption').animate({
				bottom:0
			},200);
			if (window.console && console.log) {
				console.log('animationComplete on slide: ', current);
			};
		},
		slidesLoaded: function() {
			$('.slide_caption').animate({
				bottom:0
			},200);
		}
	});
});


/* Inline Modal Box Hooks */
$(document).ready(function() {
	$("#comm1").fancybox({
		overlayColor      : '#000',
		'titlePosition'	: 'inside',
		'transitionIn'		: 'fade',
		'transitionOut'	: 'fade'
	});
});

$(document).ready(function() {
	$("#comm2").fancybox({
		overlayColor      : '#000',
		'titlePosition'	: 'inside',
		'transitionIn'		: 'fade',
		'transitionOut'	: 'fade'
	});
});

$(document).ready(function() {
	$("#resi1").fancybox({
		overlayColor      : '#000',
		'titlePosition'	: 'inside',
		'transitionIn'		: 'fade',
		'transitionOut'	: 'fade'
	});
});

$(document).ready(function() {
	$("#resi2").fancybox({
		overlayColor      : '#000',
		'titlePosition'	: 'inside',
		'transitionIn'		: 'fade',
		'transitionOut'	: 'fade'
	});
});

$(document).ready(function() {
	$("#cust").fancybox({
		overlayColor      : '#000',
		'titlePosition'	: 'inside',
		'transitionIn'		: 'fade',
		'transitionOut'	: 'fade'
	});
});


/* Toggle Container for Search Options*/
$(document).ready(function(){
  //Hide (Collapse) the toggle containers on load
  $(".toggle1").hide(); 

  //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
  $(".trigger1").click(function(){
	  $(this).toggleClass("active").next().slideToggle("slow");
	  return false; //Prevent the browser jump to the link anchor
  });
});

$(document).ready(function(){
  //Hide (Collapse) the toggle containers on load
  $(".toggle2").hide(); 

  //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
  $(".trigger2").click(function(){
	  $(this).toggleClass("active").next().slideToggle("slow");
	  return false; //Prevent the browser jump to the link anchor
  });
});

$(document).ready(function(){
  //Hide (Collapse) the toggle containers on load
  $(".toggle3").hide(); 

  //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
  $(".trigger3").click(function(){
	  $(this).toggleClass("active").next().slideToggle("slow");
	  return false; //Prevent the browser jump to the link anchor
  });
});
