/*****************************************************************************
 * A portable getElementsByClassName, developed by Robert Nyman, http://www.robertnyman.com
 * Code/licensing: http://code.google.com/p/getelementsbyclassname/
 *****************************************************************************/
var getElementsByClassName=function(b,a,c){if(document.getElementsByClassName){getElementsByClassName=function(j,m,h){h=h||document;var d=h.getElementsByClassName(j),l=(m)?new RegExp("\\b"+m+"\\b","i"):null,e=[],g,f,k;for(f=0,k=d.length;f<k;f+=1){g=d[f];if(!l||l.test(g.nodeName)){e.push(g)}}return e}}else{if(document.evaluate){getElementsByClassName=function(o,r,n){r=r||"*";n=n||document;var g=o.split(" "),p="",l="http://www.w3.org/1999/xhtml",q=(document.documentElement.namespaceURI===l)?l:null,h=[],d,f,i,k;for(i=0,k=g.length;i<k;i+=1){p+='[contains(concat(" ", @class, " "), " '+g[i]+' ")]'}try{d=document.evaluate(".//"+r+p,n,q,0,null)}catch(m){d=document.evaluate(".//"+r+p,n,null,0,null)}while((f=d.iterateNext())){h.push(f)}return h}}else{getElementsByClassName=function(r,u,q){u=u||"*";q=q||document;var h=r.split(" "),t=[],d=(u==="*"&&q.all)?q.all:q.getElementsByTagName(u),p,j=[],o,i,g,e,s;for(i=0,e=h.length;i<e;i+=1){t.push(new RegExp("(^|\\s)"+h[i]+"(\\s|$)"))}for(g=0,s=d.length;g<s;g+=1){p=d[g];o=false;for(var f=0,n=t.length;f<n;f+=1){o=t[f].test(p.className);if(!o){break}}if(o){j.push(p)}}return j}}}return getElementsByClassName(b,a,c)};
/*****************************************************************************
 * Mouseover code
 *****************************************************************************/
if(!Array.prototype.forEach){Array.prototype.forEach=function(b){var a=this.length,d=arguments[1],c;if(typeof b!="function"){throw new TypeError()}for(c=0;c<a;c++){if(c in this){b.call(d,this[c],c,this)}}}}function viewportSize(){return[filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0),filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0)]}function scrollPosition(){return[filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0),filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)]}function filterResults(d,b,a){var c=d?d:0;if(b&&(!c||(c>b))){c=b}return a&&(!c||(c>a))?a:c}xMousePos=0;yMousePos=0;var IE=document.all?true:false,timeOutTimer=undefined,loadTimer=undefined;if(!IE){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=getMouseXY;function positionMouseOver(a,c){if(a&&(c||a.style.display!="none")){var e=0,d=0,f=scrollPosition(),b=viewportSize();e=xMousePos;d=yMousePos+25;if(((d+a.offsetHeight)-f[1])>b[1]){d=((yMousePos-5)-a.offsetHeight)+2}else{e+=12}if(((e+a.offsetWidth)-f[0])>b[0]-15){e=((xMousePos+15)-a.offsetWidth)-2}a.style.left=e+"px";a.style.top=d+"px"}}function getMouseXY(a){if(!a){a=window.event}if(a.pageX||a.pageY){xMousePos=a.pageX;yMousePos=a.pageY}else{if(a.clientX||a.clientY){var b=scrollPosition();xMousePos=a.clientX+b[0];yMousePos=a.clientY+b[1]}}positionMouseOver(document.getElementById("msover-div"),false)}window.onload=function(){var a=document.createElement("div");a.setAttribute("id","msover-div");a.style.display="none";document.body.appendChild(a);getElementsByClassName("msover","img").forEach(function(d,b,c){d.onmouseover=function(){if(timeOutTimer){clearTimeout(timeOutTimer);timeOutTimer=undefined}var f=document.getElementById("msover-div"),e=new Image();while(f.childNodes[0]){f.removeChild(f.childNodes[0])}e.src="/images/throbber.gif";e.style.marginTop=e.style.marginBottom=e.style.marginLeft=e.style.marginRight="109px";e.style.display="block";f.appendChild(e);positionMouseOver(f,true);f.style.display="block";loadTimer=setTimeout(function(){loadTimer=undefined;var g=new Image(250,250);g.onload=function(){while(f.childNodes[0]){f.removeChild(f.childNodes[0])}f.appendChild(g)};g.style.display="block";g.src=d.src.replace(/^.+(?:(?:images\/prod\/c\/)|(?:showimg\.php\?image=images\/prod\/))(.+?)(?:(?:_\d{1,3})?\.jpg).*$/mg,"/preview250.php?image=$1.jpg")},400)};d.onmouseout=function(){var e=document.getElementById("msover-div");if(loadTimer){clearTimeout(loadTimer)}timeOutTimer=setTimeout(function(){e.style.display="none"},150)}})};
