Cufon.replace('#topmenu a', {
	hover: true
});
Cufon.replace('header h1');
		function openMenu(){
	var $mh = $("#menu-hover"),
        $wh = $("#wine-hover"),
        $dds = $("#dishes,#dishes-slide"),
        $wws = $("#wines,#wines-slide"),
        $tl = $("#toplogo"),
        $w = $("#wine"),
        $or = $("#overlay-r"),
        $m = $("#menu"),
        $ol = $("#overlay-l");

  if ( $(this).is('#menu-hover')) {
				$mh.css({width: "1080px",height:"500px",top:"0"});
				$dds.delay(500).fadeIn('slow');
				$tl.fadeOut(1000);
				$w.animate({width: '135px'}, { queue: false, duration: 700, easing: 'easeInOutExpo' });
				$or.animate({
					opacity: 0.9,					  
					height: '500px'
				}, { queue: false, duration: 700, easing: 'easeInOutExpo' });			
		} else {
				$dds.fadeOut("fast", function () {
					$mh.css({width: "681px",height: "91px", top: "220px"});
					$w.animate({
						width: '485px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });	
					$or.animate({
						opacity: 0.4,					  
						height: '230px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });	
				});					
       }  

  if ( $(this).is('#wine-hover')) {
				$wh.css({width: "1080px",height:"500px",top:"0"});
				$wws.delay(500).fadeIn('slow');
				$tl.fadeOut(1000);
				$m.animate({width: '485px'}, { queue: false, duration: 700, easing: 'easeInOutExpo' });
				$ol.animate({
					opacity: 0.9,					  
					height: '500px'
				}, { queue: false, duration: 700, easing: 'easeInOutExpo' });

		} else {
				$wws.fadeOut("fast", function () {
					$wh.css({width: "681px",height: "91px", top: "220px"});	
					$m.animate({
						width: '135px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });  
					$ol.animate({
						opacity: 0.4,					  
						height: '230px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });						
				});			
       }  
			}
		function openNone(){}
$(document).ready(function () {
	$.preloadCssImages({statusTextEl: '#textStatus', statusBarEl: '#status'});
	
//tooltip
		$(".ttips li").hover(
			function() { $(this).contents("span.tooltip:last-child").fadeIn().css({ display: "block" }); },
			function() { $(this).contents("span.tooltip:last-child").css({ display: "none" }); }
		);
		
	var $mh = $("#menu-hover"),
        $wh = $("#wine-hover"),
        $tl = $("#toplogo"),
        $w = $("#wine"),
        $or = $("#overlay-r"),
        $m = $("#menu"),
        $ol = $("#overlay-l"),	
        $lsrs = $("#left-show,#right-show"),
        $dds = $("#dishes,#dishes-slide"),
        $wws = $("#wines,#wines-slide");	


		$("#show-wrap,#content,.nav,#topmenu").center();
		$("#overlay-l,#overlay-r").fadeTo("fast", 0.4);
		$w.animate({
			width: '485px'
		}, { duration: 1 });

		
//hover slide
$('#mainmenu #menu-hover, #mainmenu #wine-hover').hoverIntent(openMenu,openNone);
		
		$('#mainmenu').mouseleave(function () { 
				$dds.fadeOut("fast", function () {
					$mh.css({height: "91px", top: "220px"}).stop().animate({
						width: '681px'
					}, { queue: false, duration: 400 });
					$w.animate({
						width: '485px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });	
					$or.animate({
						opacity: 0.4,					  
						height: '230px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });	
				});		
				$wws.fadeOut("fast", function () {
					$wh.css({height: "91px", top: "220px"}).stop().animate({
						width: '681px'
					}, { queue: false, duration: 400 });	
					$m.animate({
						width: '135px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });  
					$ol.animate({
						opacity: 0.4,					  
						height: '230px'
					}, { queue: false, duration: 700, easing: 'easeInOutExpo' });						
				});			});		
		
		$('#show-wrap').mouseleave(function () { 
				$tl.fadeIn(1000);
			});		

		$lsrs.cycle({
			timeout: 8000,
			random: 1,
			speed: 2000,
			fx: 'fade'
		});	
		$('#topmenu a').click(function () {
			$(".nav").delay(800).fadeIn(); 
			$lsrs.cycle('pause');	
			return false;
		});
		
		var $c = $("#content"),
			$oa = $("#overlay-all");
		$('#close').click(function () {							   
			$('.nav').fadeOut();						   
			$c.fadeOut(400, function () {
				$('#overlay-all').fadeOut();
			});		   
			$lsrs.cycle('resume');	
			return false;
		});
		function onAfter(curr, next, opts) {
			var index = opts.currSlide;
			$('#prev')[index === 0 ? 'fadeOut' : 'fadeIn']();
			$('#next')[index === opts.slideCount - 1 ? 'fadeOut' : 'fadeIn']();
		}

		$c.cycle({ 
			speed: 700,
			fx:      'fade', 
			sync: 1,
			prev:   '#prev',
			next:   '#next',
			after:   onAfter, 
			timeout: 0, 
			cleartype:     1,
			cleartypeNoBg: true		
		});		
		$('#top0').click(function () {
			$oa.fadeTo(500, 0.94, function () {
				$c.cycle(0).delay(200).fadeIn(800); 
			});
			$("#prev").hide(); 
			return false; 
		});	
	
		$('#top1').click(function () { 
			$oa.fadeTo(500, 0.94, function () {
				$c.cycle(1).delay(200).fadeIn(800); 
			});
			return false; 
		});	
	
		$('#top2').click(function () { 
			$oa.fadeTo(500, 0.94, function () {
				$c.cycle(2).delay(200).fadeIn(800); 
				$("#next").hide(); 
			});
			return false; 
		});

        var $ds = $("#dishes-slide");
		$ds.cycle({ 
			speed: 400,
			fx:      'fade', 
			sync: 1, 
			timeout: 0, 
			cleartype:     1,
			cleartypeNoBg: true		
		});		
		$('#tab1').click(function () { 
			$ds.cycle(0); 
			return false; 
		});
		$('#tab2').click(function () { 
			$ds.cycle(1); 
			return false; 
		});
		$('#tab3').click(function () { 
			$ds.cycle(2); 
			return false; 
		});
		$('#tab4').click(function () { 
			$ds.cycle(3); 
			return false; 
		});						   
		$('#tab5').click(function () { 
			$ds.cycle(4); 
			return false; 
		});


		var IE = /*@cc_on!@*/false;
		if (IE) {
			// IE.
		} else {
			$('#dishes .menu-tab li a,#wines .menu-tab li a').hover(function () {
					$(this)
						.prepend('<p></p>')
						.find('p')
						.fadeIn('fast');
				}, function () {
					$(this)
						.find('p')
						.fadeOut('fast', function () {
							$(this).remove();
						});
				});
		}


	
    $('a.newWin').click(function(){
        window.open(this.href);
        return false;
    });	

//Rez Widget
    $("a#rez").click(function () {
      $("#rez-widget").slideToggle("slow");	
    });
	
    $('a.w_button,.w_all_times a').click(function(){
        window.open(this.href);
        return false;
    });

	
	
	});
