
$(document).ready(function(){var busy=false;var x_fact=1.2;function zoomMap(amount,value){var map=document.getElementById(value.useMap.substring(1));if(map!=null){for(var i=0;i<map.areas.length;i++){var area=map.areas[i];var coords=area.coords.split(',');for(var j=0;j<coords.length;j++){coords[j]=coords[j]*amount;}
var coordsString="";for(var j=0;j<coords.length;j++){if(j>0)
coordsString+=",";coordsString+=coords[j];}
area.coords=coordsString;}}};function zoom(fact,value){if(!busy){busy=true;var xi=parseInt($(value).css('left'));var yi=parseInt($(value).css('top'));var new_h=(value.height*fact);var new_w=(value.width*fact);$(value).animate({left:xi,top:yi,height:new_h,width:new_w},100,function(){busy=false;});zoomMap(fact,value);}};$.fn.zoomable=function(){return this.each(function(index,value){var getScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft;};var getScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop;};$(value).css('position','relative').css('left','0').css('top',0).css('margin','0');if('MouseScrollEvent'in window){$(document).unbind('DOMMouseScroll');$(document).bind('DOMMouseScroll',function(e){e.preventDefault();if(e.detail>0){zoom(1/x_fact,value);}
else if(e.detail<0){zoom(x_fact,value);}});}
else{$(value).unbind('mousewheel');$(value).bind('mousewheel',function(e){e.preventDefault();if(e.wheelDelta<0){zoom(1/x_fact,value);}
else if(e.wheelDelta>0){zoom(x_fact,value);}});}
$(value).load(function(){var viewportWidth=$(window).width();var imageWidth=$(value).width()+40;var initialWidthFactor=viewportWidth/imageWidth;var viewportHeight=$(window).height();var imageHeight=$(value).height()+40;var initialHeightFactor=viewportHeight/imageHeight;if(initialWidthFactor<1.0||initialHeightFactor<1.0){if(initialHeightFactor<initialWidthFactor)
zoom(Math.max(initialHeightFactor,0.66),value);else
zoom(Math.max(initialWidthFactor,0.66),value);}});});};});