Cufon.replace('#navigation li a',{hover:true});

$(function(){
	$('#navigation li a').hover(
	function(){
		$(this).stop().animate({marginLeft: 10},{duration:300});
	},
	function(){
		$(this).stop().animate({marginLeft: 0},{duration:300});
	}
	);
	
	$('#navigation li .menuother').click(function(){
		$('#menunav').hide();
		clearInterval(checkposition);
		var navitem = $(this).attr('name') + '.php';
		$(this).parent().addClass('selected').siblings().removeClass('selected');
    	$("#topdoor").show("slide", { direction: "up", easing: 'easeInOutExpo' }, 1200);
    	$("#bottomdoor").show("slide", { direction: "down", easing: 'easeInOutExpo' }, 1200, function(){$('#content-place').load(navitem);});
	    setTimeout(function() {
    	$("#topdoor").hide("slide", { direction: "up", easing: 'easeInOutExpo' }, 1200);
		}, 1200);
		setTimeout(function() {
    	$("#bottomdoor").hide("slide", { direction: "down", easing: 'easeInOutExpo' }, 1200);
		}, 1200);
	});
	
	$('#navigation li #menuparent').click(function(){
		clearInterval(checkposition);
		$('#menunav').show('slide',{direction: "up"},800);
		var navitem = $(this).attr('name') + '.php';
		$(this).parent().addClass('selected').siblings().removeClass('selected');
    	$("#topdoor").show("slide", { direction: "up", easing: 'easeInOutExpo' }, 1200);
    	$("#bottomdoor").show("slide", { direction: "down", easing: 'easeInOutExpo' }, 1200, function(){$('#content-place').load(navitem);});
	    setTimeout(function() {
    	$("#topdoor").hide("slide", { direction: "up", easing: 'easeInOutExpo' }, 1200);
		}, 1200);
		setTimeout(function() {
    	$("#bottomdoor").hide("slide", { direction: "down", easing: 'easeInOutExpo' }, 1200);
		}, 1200);
	});	
	
	$('#navigation li ul li a').click(function(){
		var navitem = 'Menu-' + $(this).attr('name') + '.php';
		$('#content-place').load(navitem);
	});
	
	$('#facebook').hover(function(){
		var divname = $(this);
		$('#facebook .widget-box').fadeIn(300);
		$('#facebook .widget-info').load('twitter-widget.php');
	},
	function(){
		var divname = $(this);
		$('#facebook .widget-box').fadeOut(300);
	});
	
	$('#twitter').hover(function(){
		var divname = $(this);
		$('#twitter .widget-box').fadeIn(300);
		$('#twitter .widget-info').load('twitter-widget.php');
	},
	function(){
		var divname = $(this);
		$('#twitter .widget-box').fadeOut(300);
	});
	
	$('#iphone').hover(function(){
		var divname = $(this);
		$('#iphone .widget-box').fadeIn(300);
		$('#iphone .widget-info').load('iphone-widget.php');
	},
	function(){
		var divname = $(this);
		$('#iphone .widget-box').fadeOut(300);
	});
	
	$('#opentable').hover(function(){
		var divname = $(this);
		$('#opentable .widget-box').fadeIn(300);
		$('#opentable .widget-info').load('reservation-widget.php');
	},
	function(){
		var divname = $(this);
		$('#opentable .widget-box').fadeOut(300);
	});
	
	$('#video').hover(function(){
		var divname = $(this);
		$('#watchourvideo').hide();
		$('#video .widget-box').fadeIn(300);
		$('#video .widget-info').load('video-widget.php');
	},
	function(){
		var divname = $(this);
		$('#video .widget-box').fadeOut(300);
	});
	
});
