﻿$(document).ready(function() {        
		iniRestuarants();
		
		$("#ft ul li#navIV a").addClass("highlight");
		$("#ft ul li#navV a").addClass("first");
		$("#ft ul li#navIV ul li a").removeClass("highlight");

});

function iniRestuarants() {	
	$("div.brand > ul > li").each(function() {
		var img = $("> img:first", this).attr("src");
		$(this)
			.css({backgroundImage: "url(" + img + ")"})
			.hover(function() {
					$("> ul", this).css({display: "block"}).stop().animate({opacity: 1}, 400);
				},
				function () {
					$("> ul", this).stop().animate({opacity: 0}, 400);
				});
	});
}

//BlockUI
    $(document).ready(function() {        
        $("#viewMap").click(function() {        
            $.blockUI({
                message: $("#Map")
                , css: {
                    backgroundColor: "white"
					,border: "5px solid white"
                    ,width:"800px"
					,left: "16%"
					,top: "15%"
					,cursor: "default"
					
                }
                , overlayCSS: {
					backgroundColor: "#E3D19E"
                    ,opacity: 0.5
					,cursor: "default"
                }
            });
            //setTimeout(function() { $.unblockUI(); }, 3000);
			return false;
        });
	});
	
    $(document).ready(function() {        
		
		  $("#btnClose").click(function() {        
				$.unblockUI();
				return false;
				
		  });
       
    });
    
function openPopup(id) {
    width = 380;
    height = 300;
    leftVal = (screen.width) / 4;
    topVal = (screen.height) / 4;
    if (deployJava.versionCheck('1.4.0_10+') == false) {                           
        userInput = confirm("You need the Java(TM) Runtime Environment.Would you like to install now?");                
        if (userInput == true) { 
            deployJava.returnPage = location.href;
            //deployJava.installLatestJRE(); 
            window.open('http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com', 'installjava', "left=" + leftVal + ",top=" + topVal + ",menubar=no,resizable=no,scrollbars=1,width=700,height=600"); 
        }
    }else{
       window.open('ipix.aspx?id='+id, 'Map', "left=" + leftVal + ",top=" + topVal + ",menubar=no,resizable=no,scrollbars=1,width=" + width + ",height=" + height + ""); 
    }
    
}    

function changeImg(id,path) {
    $('#loading').show();
    $('#DivshowImg').hide();
    if($('#ctl00_ContentPlaceHolder1_showImg').attr('src') == path){
        $('#loading').hide();
        $('#DivshowImg').show();
    }
    $('#'+id).attr('src',path);    
    $('#'+id).load(function(){
        $('#loading').hide();
        $('#DivshowImg').show();
    });
    
}


