/******************** SlideOutBox Controls **********************/ 
 
    $(function(){
        $('.slide-out-div').tabSlideOut({
            tabHandle: '.handle',                     //class of the element that will become your tab
            pathToTabImage: 'img/rates_tab_1.jpg', //path to the image for the tab //Optionally can be set using css
            imageHeight: '125px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '50px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'click',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '277px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: true                      //options: true makes it stick(fixed position) on scroll
        });

    });

/******************** SlideOutBox Controls **********************/ 
$(document).ready(function(){
			$("#slider").easySlider({
				auto: true, 
				continuous: true
			});
			
			/* fancybox image call */
			$("a.imgExplode").fancybox();
			
			});

//////////////////Quick Quote Form////////////////////////////

		$(document).ready(function() {
			$("#quickQuote").validationEngine({
				ajaxSubmit: true,
				ajaxSubmitFile: "inc/php_scripts/quick_quote_submission_script.php",
				success :  false,
				failure : function() {} 
			})
			
			$("#quickQuoteLink").click(function(){
                    if ($("#quickQuoteForm").is(":hidden")){
                        $("#quickQuoteForm").slideDown("slow");
                    }
                    else{
                        $("#quickQuoteForm").slideUp("slow");
                    }
                });
          });
		
		function closeForm(){
                $("#messageSent").show("slow");
                setTimeout('$("#messageSent").hide();$("#quickQuoteForm").slideUp("slow")', 2000);
           }

//////////////////Estimate Form////////////////////////////
$(document).ready(function() {
			$("#webSiteEstimate").validationEngine()
		});

		/*$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});*/
		
/******************** Form ON/OFF Switches **********************/

/* Estimate Form */
 $(document).ready(function(){ 
  $('.webSiteDetails').hide();
  
  $('#webSiteFalse').click(function(){
		$('.webSiteDetails').slideUp("slow");
  });
  $('#webSiteTrue').click(function(){
		$('.webSiteDetails').slideDown("slow");
  });
});
 
/******************** Accoridan Controls **********************/

 $(document).ready(function() {
  $("#accordion").accordion({
    header:'h2',
    active:'.open'
  });
});
