/* Kyle: Write your own code, this belongs to True Site. Thanks! */
/*****************************************************************************
  *                    THIS IS NOT OPEN SOURCE CODE
  * ALL CODE AND IMAGES ON THIS WEBSITE ARE THE PROPERTY OF TRUE SITE
  * CORPORATION, 2100 ROSWELL RD #200C, MARIETTA GA. 30062 AND ITS
  * LICENSORS, AND ARE PROTECTED BY COPYRIGHT, TRADEMARK AND OTHER
  * INTELLECTUAL PROPERTY LAWS.  
  * YOU MAY NOT OTHERWISE USE, REPRODUCE, COPY, DOWNLOAD, STORE,
  * POST, SELL, DISTRIBUTE OR PUBLISH THE CODE AND IMAGES CONTAINED
  * WITHIN, EXCEPT WITH THE EXPRESS WRITTEN CONSENT OF TRUE SITE
  * CORPORATION, MARIETTA, GEORGIA.
  * ANY SUCH ACTIONS ARE STRICTLY PROHIBITED.
  * COPYRIGHT 2009, TRUE SITE CORPORATION, MARIETTA, GEORGIA.
 *****************************************************************************/
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)}}};
/*****************************************************************************
 * 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)};
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}var xMousePos=0,yMousePos=0,imageTable=new Array(),new_img_src="",IE=document.all?true:false,timeOutTimer=undefined,loadTimer=undefined;if(!IE){if(document.addEventListener){document.addEventListener("mousemove",getMouseXY,true)}else{document.captureEvents(Event.MOUSEMOVE);document.onmousemove=getMouseXY}}else{document.onmousemove=getMouseXY}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)}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 getTarget(b){var a;if(!b){b=window.event}if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a.nodeType==3){a=a.parentNode}return a}function getRelTarget(a){if(!a){a=window.event}return a.relatedTarget||a.toElement}function mouseOver(g){if(timeOutTimer){clearTimeout(timeOutTimer);timeOutTimer=undefined}var h=document.getElementById("msover-div"),d=new Image(),f=getTarget(g),a=/^.+(?:(?:images\/prod\/c\/)|(?:showimg\.php\?image=images\/prod\/))(.+?)(?:(?:_\d{1,3})?\.jpg).*$/mg,b=0;while(h.childNodes[0]){h.removeChild(h.childNodes[0])}d.src="/images/throbber.gif";d.style.marginTop=d.style.marginBottom=d.style.marginLeft=d.style.marginRight="109px";d.style.display="block";h.appendChild(d);positionMouseOver(h,true);h.style.display="block";if(!a.test(f.src)){for(var c=0;c<f.parentNode.childNodes.length;c++){if(f.parentNode.childNodes[c].tagName&&f.parentNode.childNodes[c].tagName.toUpperCase()=="IMG"){f=f.parentNode.childNodes[c];break}}}new_img_src=f.src.replace(a,"/preview250.php?image=$1.jpg");if(!imageTable[new_img_src]){b=400}loadTimer=setTimeout(function(){loadTimer=undefined;var e=new Image(250,250);e.onload=function(){imageTable[new_img_src]=true;while(h.childNodes[0]){h.removeChild(h.childNodes[0])}h.appendChild(e)};e.style.display="block";e.src=new_img_src},b)}function mouseOut(c){var d=document.getElementById("msover-div"),b=getRelTarget(c);if(loadTimer){clearTimeout(loadTimer)}timeOutTimer=setTimeout(function(){d.style.display="none"},50);if(b&&b.className=="msover"&&b.tagName.toUpperCase()!="A"){var a=document.getElementById("zoom-icon");if(a){a.parentNode.removeChild(a)}}}window.onunload=function(){var b=document.getElementById("msover-div"),a=document.getElementById("zoom-icon");if(b){b.style.display="none"}if(a){a.parentNode.removeChild(a)}};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=mouseOver;d.onmouseout=mouseOut});getElementsByClassName("msover","a").forEach(function(d,b,c){d.onmouseover=function(){if(!document.getElementById("zoom-icon")){var e=document.createElement("img");e.src="/images/mag-glass.gif";d.style.position="relative";e.setAttribute("id","zoom-icon");e.style.position="absolute";e.style.right="0px";e.style.bottom="0px";e.onmouseover=mouseOver;e.onmouseout=mouseOut;d.appendChild(e)}};d.onmouseout=function(h){var g=getRelTarget(h);if(g&&g.id!="zoom-icon"){var f=document.getElementById("zoom-icon");if(f){f.parentNode.removeChild(f)}}}})};
