$(function() {

$('ul.sf-menu').superfish({ 
        delay:       1000,                            // one second delay on mouseout 
        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
        speed:       'fast',                          // faster animation speed 
        autoArrows:  false,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
}); 

    $('#headerImg').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});



 $("a[href^='http']").not("[href*='chezvousdining.ca']").click(function(){
 	window.open(this.href);
 	return false;
 });

$("a[href*=.pdf]").click(function(){
	window.open(this.href);
	return false;
});

$("a[href$='.pdf'], a[href$='.doc']").addClass("doc");
$("a[href^='http']").not("[href*='chezvousdining.ca']").addClass("link")


	$("#serviceMenus").hide();
	$(".trigger").click(function(){
		$("#serviceMenus").slideToggle("slow,"); 

		return false;
	});

	$("#shows").hide();
	$(".trigger").click(function(){
		$("#shows").slideToggle("slow,"); 

		return false;
	});

$("#signup form").validate({
	errorLabelContainer: $("#signup div.error")

});



$('input[type="text"]').focus(function() {  
	this.value = '';
});  

$('input[type="text"]').blur(function() {  
     if ($.trim(this.value) == ''){  
         this.value = (this.defaultValue ? this.defaultValue : '');  
     }  
});  


        $('a[href*=#]').click(function() {
          if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target
            || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
              var targetOffset = $target.offset().top;
              $('html,body')
              .animate({scrollTop: targetOffset}, 1000);
             return false;
            }
          }
        });



				

});






