
jQuery(document).ready(function(){


/* THIS REMOVE THE LINE FROM THE EMPTY <UL> ELEMENTS (NOTE: be sure there is NO space between the <ul></ul> elements) */
	jQuery("#NavMenu li ul:empty").remove();
	
	// Preload all rollovers
	jQuery(".rolloverJPG").each(function() {
		// Set the original src
		rollsrc = jQuery(this).attr("src");
		rollON = rollsrc.replace(/.jpg$/ig,"_on.jpg");
		jQuery("<img>").attr("src", rollON);
});
	
	
	// Navigation rollovers
	jQuery(".rolloverJPG").mouseover(function(){
		imgsrc = jQuery(this).attr("src");
		matches = imgsrc.match(/_on/);
		// don't do the rollover if state is already ON
		if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_on.jpg"); // strip off extension
			jQuery(this).attr("src", imgsrcON);
		}
		
	}).mouseout(function(){
		jQuery(this).attr("src", imgsrc);
});


	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
	
});



