

$(document).ready(function(){
	// Image map config
	$.fn.maphilight.defaults = {
		fill: true,
		//fillColor: '8c9438',
		fillColor: 'e2a033',
		fillOpacity: 0.2,
		stroke: false,
		strokeColor: '8c9438',
		strokeOpacity: 1,
		strokeWidth: 1,
		fade: true,
		alwaysOn: false
	}
	// Image map function
	$('img[usemap]').maphilight();
	
	// Rollover images
	$(".rollover").hover(
 		function() {
  			curr = $(this).find("img").attr("src");
			overlen = curr.length;
			over = curr.substr(0, overlen-4);
			suffix = curr.replace(over,"")
			over = over + '_over' + suffix;			
			$(this).find("img").attr({ src: over});
 		},function() {
  			$(this).find("img").attr({ src: curr});
 		});
	
 	// Preload rollover images
	$(".rollover").find("img").each(function(i) {
  		temp = this.src;
  		prelen = temp.length;
  		pre = temp.substr(0, prelen-4);
  		suffix = temp.replace(pre,"")		
  		pre = pre+'_over'+suffix;  		
  		preload_image_object = new Image();
  		preload_image_object.src = pre;
	});
	
	// Embed flash
	// bdev commented out 17Nov08 - using standard Web Manager embed code instead
	//$("#home-flash").flashembed("flash/animation1.swf");
	
})