﻿var IEPNGFix=window.IEPNGFix||{};IEPNGFix.tileBG=function(j,r,v){var i=this.data[j.uniqueID],l=Math.max(j.clientWidth,j.scrollWidth),k=Math.max(j.clientHeight,j.scrollHeight),b=j.currentStyle.backgroundPositionX,c=j.currentStyle.backgroundPositionY,a=j.currentStyle.backgroundRepeat;if(!i.tiles){i.tiles={elm:j,src:"",cache:[],img:new Image(),old:{}}}var B=i.tiles,t=B.img.width,q=B.img.height;if(r){if(!v&&r!=B.src){B.img.onload=function(){this.onload=null;IEPNGFix.tileBG(j,r,1)};return B.img.src=r}}else{if(B.src){v=1}t=q=0}B.src=r;if(!v&&l==B.old.w&&k==B.old.h&&b==B.old.x&&c==B.old.y&&a==B.old.r){return}var u={top:"0%",left:"0%",center:"50%",bottom:"100%",right:"100%"},C,E,p;C=u[b]||b;E=u[c]||c;if(p=C.match(/(\d+)%/)){C=Math.round((l-t)*(parseInt(p[1])/100))}if(p=E.match(/(\d+)%/)){E=Math.round((k-q)*(parseInt(p[1])/100))}C=parseInt(C);E=parseInt(E);var w={repeat:1,"repeat-x":1}[a],z={repeat:1,"repeat-y":1}[a];if(w){C%=t;if(C>0){C-=t}}if(z){E%=q;if(E>0){E-=q}}this.hook.enabled=0;if(!({relative:1,absolute:1}[j.currentStyle.position])){j.style.position="relative"}var g=0,D,n=w?l:C+0.1,F,o=z?k:E+0.1,h,A,m;if(t&&q){for(D=C;D<n;D+=t){for(F=E;F<o;F+=q){m=0;if(!B.cache[g]){B.cache[g]=document.createElement("div");m=1}var f=(D+t>l?l-D:t),e=(F+q>k?k-F:q);h=B.cache[g];A=h.style;A.behavior="none";A.left=D+"px";A.top=F+"px";A.width=f+"px";A.height=e+"px";A.clip="rect("+(F<0?0-F:0)+"px,"+f+"px,"+e+"px,"+(D<0?0-D:0)+"px)";A.display="block";if(m){A.position="absolute";A.zIndex=-999;if(j.firstChild){j.insertBefore(h,j.firstChild)}else{j.appendChild(h)}}this.fix(h,r,0);g++}}}while(g<B.cache.length){this.fix(B.cache[g],"",0);B.cache[g++].style.display="none"}this.hook.enabled=1;B.old={w:l,h:k,x:b,y:c,r:a}};IEPNGFix.update=function(){for(var a in IEPNGFix.data){var b=IEPNGFix.data[a].tiles;if(b&&b.elm&&b.src){IEPNGFix.tileBG(b.elm,b.src)}}};IEPNGFix.update.timer=0;if(window.attachEvent&&!window.opera){window.attachEvent("onresize",function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)})}Cufon.replace("h1 .textWidget",{hover:true,fontFamily:"Garamond"});Cufon.replace("h2",{hover:true,fontFamily:"Garamond"});Cufon.replace(".widgetCTA .widgetCTAHeaders",{hover:true,fontFamily:"Garamond"});function bookmarksite(b,c){if(window.sidebar){window.sidebar.addPanel(b,c,"")}else{if(window.opera&&window.print){var a=document.createElement("a");a.setAttribute("href",c);a.setAttribute("title",b);a.setAttribute("rel","sidebar");a.click()}else{if(document.all){window.external.AddFavorite(c,b)}}}}$(document).ready(function(){$(".widgetCTA").hover(function(){$(this).find(".widgetCTAimg").animate({top:"-14px"},200)},function(){$(this).find(".widgetCTAimg").animate({top:"0px"},200)})});(function(b){b.iframe=function(d){this.obj=d;var a=document.getElementById("sb-overlay");this.height=d.height?parseInt(d.height,10):a.offsetHeight;this.width=d.width?parseInt(d.width,10):a.offsetWidth};b.iframe.prototype={append:function(a,h,g){this.id=h;var f='<iframe id="'+h+'" name="'+h+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto"';if(b.client.isIE){f+=' allowtransparency="true"';if(b.client.isIE6){f+=" src=\"javascript:false;document.write('');\""}}f+="></iframe>";a.innerHTML=f},remove:function(){var a=document.getElementById(this.id);if(a){b.lib.remove(a);if(b.client.isGecko){delete window.frames[this.id]}}},onLoad:function(){var a=b.client.isIE?document.getElementById(this.id).contentWindow:window.frames[this.id];a.location.href=this.obj.content}}})(Shadowbox);
