// Scripts for BLU Custom Catering and Events
// Author:  Mark Pettit of {z}indexProductions



// Navigation Bar Rollovers

$(document).ready(function() {
		
		// Preload all rollovers -- trick courtesy of Atlanta Jones
		$("#navbar img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollOVR = rollsrc.replace('1', 'OVR');
			newImg = new Image(); // create new image obj
			$(newImg).attr("src", rollOVR); // set new obj's src
		});

		
		// Navigation rollovers
		$("#navbar a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			
			if (typeof(imgsrc) != 'undefined') {
			imgsrcOVR = imgsrc.replace('1', 'OVR');
			$(this).children("img").attr("src", imgsrcOVR);
			}
			
		});
		
		// on mouseout
		$("#navbar a").mouseout(function(){
			if (typeof(imgsrc) != 'undefined') {
			$(this).children("img").attr("src", imgsrc);
			}
		});
		
});


		// Menus Pages rollovers

$(document).ready(function() {
		
		// Preload all rollovers -- trick courtesy of Atlanta Jones
		$("#menusList img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollOVR = rollsrc.replace('1', 'OVR');
			newImg = new Image(); // create new image obj
			$(newImg).attr("src", rollOVR); // set new obj's src
		});

		
		// Navigation rollovers
		$("#menusList a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			
			if (typeof(imgsrc) != 'undefined') {
			imgsrcOVR = imgsrc.replace('1', 'OVR');
			$(this).children("img").attr("src", imgsrcOVR);
			}
			
		});
		
		// on mouseout
		$("#menusList a").mouseout(function(){
			if (typeof(imgsrc) != 'undefined') {
			$(this).children("img").attr("src", imgsrc);
			}
		});
		
});




