+(function(a){a.fn.rwdImageMaps=function(){var c=this;var b=function(){c.each(function(){if(typeof(a(this).attr("usemap"))=="undefined"){return}var d=a(this).attr("width"),f=a(this).attr("height"),e=a(this).width()/100,i=a(this).height()/100,g=a(this).attr("usemap").replace("#",""),j="coords";a('map[name="'+g+'"]').find("area").each(function(){if(!a(this).data(j)){a(this).data(j,a(this).attr(j))}var l=a(this).data(j).split(","),k=new Array(l.length);for(var h=0;h<k.length;++h){if(h%2===0){k[h]=parseInt(((l[h]/d)*100)*e)}else{k[h]=parseInt(((l[h]/f)*100)*i)}}a(this).attr(j,k.toString())})})};b();a(window).resize(function(){b()})}})(jQuery);
0 commit comments