



//-------------------------- TOGGLE CONTACT FORM AND ABOUT CONTACT SECTION
$(document).ready(function(){
        $(".openone").click(function() {
    
		$("#overlay").fadeIn("slow");
		$(".overlayhours").fadeIn("slow");
        
       
    });
});

$(document).ready(function(){
        $(".closeopening").click(function() {
			$("#overlay").fadeOut("slow");
		$(".overlayhours").fadeOut("slow");
        
       
    });
});

$(document).ready(function(){
        $(".opentwo").click(function() {
    
		$("#overlay").fadeIn("slow");
		$("#subscribe").fadeIn("slow");
        
       
    });
});

$(document).ready(function(){
        $(".close").click(function() {
		$("#overlay").fadeOut("slow");
		$("#subscribe").fadeOut("slow");
        
       
    });
});
  
$(document).ready(function(){

 
    $(".left ul li").hover(function() {
        $(this).stop().animate({ marginLeft: "10px" }, 200);
        
    },function(){
        $(this).stop().animate({ marginLeft: "0px" }, 300);
       
    });
});



$(document).ready(function(){
   $(".social").hover(function() {
        $(this).stop().fadeTo('slow', 0.5);
        
    },function(){
        $(this).stop().fadeTo('slow', 1.0);
       
    });
});


$(document).ready(function(){
        $("#opening").click(function() {
        $(".openhours").stop().animate({ marginTop: "0px" }, 200);
		$("#subscribe").fadeOut("slow");
		$("#opening").stop().animate({ marginTop: "205px" }, 200);
		$(".closeopening").fadeIn("slow");
        
    },function(){
        $(".openhours").stop().animate({ marginTop: "205px" }, 300);
		$("#subscribe").fadeIn("slow");
		$("#opening").stop().animate({ marginTop: "0px" }, 200);
		$(".closeopening").fadeOut("slow");
       
    });
});




function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

   
    
     var $sibs  = $active.siblings();
     var rndNum = Math.floor(Math.random() * $sibs.length );
     var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});




