jQuery.preloadImages = function(){for(var i = 0; i<arguments.length; i++){jQuery("<img>").attr("src", arguments[i]);}}
$.preloadImages("assets/home-over.jpg","assets/menu-over.jpg","assets/catering-over.jpg","assets/locations-over.jpg","assets/rewardsclub-over.jpg","assets/sponsorships-over.jpg","assets/franchising-over.jpg","assets/employment-over.jpg","assets/contact-over.jpg");

$(document).ready(function(){ 
$("img.rollover").hover(function(){this.src = this.src.replace('.j','-over.j');},function(){this.src = this.src.replace('-over.j','.j');});
$('.slideshow').cycle({fx: 'fade', speed: 2500, timeout: 5000 });
$("#subnav").hide();
$('.locations').mouseover(function() { $("#subnav").fadeIn();});
$('.rollout').mouseover(function() { $("#subnav").fadeOut();});	
});

var win = null;
function CenteredWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
