$(function() {
		$('.PopOut').fadeOut(0);
	
		$('#rooms').hover(
			function(){ 
				$(this).find('img:first').attr('src','../img/button_rooms_on.gif');
				$(this).find('.PopOut').fadeTo(300, 0.94);
			}, 
			function(){
				$(this).find('img:first').attr('src','../img/button_rooms_off.gif');
				$(this).find('.PopOut').fadeOut(300);
			}
		);
		$('#catering').hover(
			function(){ 
				$(this).find('img:first').attr('src','../img/button_catering_on.gif');
				$(this).find('.PopOut').fadeTo(300, 0.94);
			}, 
			function(){
				$(this).find('img:first').attr('src','../img/button_catering_off.gif');
				$(this).find('.PopOut').fadeOut(300);
			}
		);
		
		$('#av').hover(function(){$(this).find('img').attr('src','../img/button_av_on.gif');}, function(){$(this).find('img').attr('src','../img/button_av_off.gif');});
		$('#map').hover(function(){$(this).find('img').attr('src','../img/button_map_on.gif');}, function(){$(this).find('img').attr('src','../img/button_map_off.gif');});
		$('#contact').hover(function(){$(this).find('img').attr('src','../img/button_contact_on.gif');}, function(){$(this).find('img').attr('src','../img/button_contact_off.gif');});
		$('#home').hover(function(){$(this).find('img').attr('src','../img/button_home_on.gif');}, function(){$(this).find('img').attr('src','../img/button_home_off.gif');});
	});


function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=425');");
}

var win=null; 
function NewWindow(mypage,myname,w,h,scroll,pos)
{ 
	if(pos=="random"){
		LeftPosition=(screen.availWidth) ? Math.floor(Math.random()*(screen.availWidth-w)):1;
		TopPosition=(screen.availHeight)?Math.floor(Math.random()*((screen.availHeight-h)-75)):1;
	} 
	if(pos=="center"){
		LeftPosition=(screen.availWidth)?(screen.availWidth-w)/2:1;
		TopPosition=(screen.availHeight)?(screen.availHeight-h)/2:1;
	} 
	if(pos=="default"){
		LeftPosition=1;TopPosition=1
	} 
	else if((pos!="center" && pos!="random" && pos!="default") || pos==null)
	{
		LeftPosition=0;TopPosition=20
	} 
	
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; win=window.open(mypage,myname,settings); 
	if(win.focus){win.focus();}
}
