﻿jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
﻿
jQuery.extend(jQuery.easing,{easeIn:function(x,t,b,c,d){return jQuery.easing.easeInQuad(x,t,b,c,d);},easeOut:function(x,t,b,c,d){return jQuery.easing.easeOutQuad(x,t,b,c,d);},easeInOut:function(x,t,b,c,d){return jQuery.easing.easeInOutQuad(x,t,b,c,d);},expoin:function(x,t,b,c,d){return jQuery.easing.easeInExpo(x,t,b,c,d);},expoout:function(x,t,b,c,d){return jQuery.easing.easeOutExpo(x,t,b,c,d);},expoinout:function(x,t,b,c,d){return jQuery.easing.easeInOutExpo(x,t,b,c,d);},bouncein:function(x,t,b,c,d){return jQuery.easing.easeInBounce(x,t,b,c,d);},bounceout:function(x,t,b,c,d){return jQuery.easing.easeOutBounce(x,t,b,c,d);},bounceinout:function(x,t,b,c,d){return jQuery.easing.easeInOutBounce(x,t,b,c,d);},elasin:function(x,t,b,c,d){return jQuery.easing.easeInElastic(x,t,b,c,d);},elasout:function(x,t,b,c,d){return jQuery.easing.easeOutElastic(x,t,b,c,d);},elasinout:function(x,t,b,c,d){return jQuery.easing.easeInOutElastic(x,t,b,c,d);},backin:function(x,t,b,c,d){return jQuery.easing.easeInBack(x,t,b,c,d);},backout:function(x,t,b,c,d){return jQuery.easing.easeOutBack(x,t,b,c,d);},backinout:function(x,t,b,c,d){return jQuery.easing.easeInOutBack(x,t,b,c,d);}});
﻿(function($){$.fn.jqm=function(o){var p={overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:F,ajaxText:'',target:F,modal:F,toTop:F,onShow:F,onHide:F,onLoad:F};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};if(p.trigger)$(this).jqmAddTrigger(p.trigger);});};$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])L('bind');A.push(s);}
else if(c.overlay>0)h.w.jqmAddClose(o);else o=F;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return F;},close:function(s){var h=H[s];if(!h.a)return F;h.a=F;if(A[0]){A.pop();if(!A[0])L('unbind');}
if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();}return F;},params:{}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),F=false,i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h);},f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r;},hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function(){if(!this[c]){this[c]=[];$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};})(jQuery);
﻿(function($){$.fn.Floaty=function(options){settings=jQuery.extend({vWidth:340,vHeight:245,vThumbSize:"small",vThumbVer:2,BgColor:'#000',BgOpacity:0.6,BorderColor:'#fff',BorderOpacity:0.9,ShowBorder:0,ShowRelatedVideo:1,Color1:'666666',Color2:'efefef',CloseKey:'x',imgClose:'//progecad.me/skins/icadsales/images/close.png',ResizeSpeed:500},options);$(this).each(function(){var id=GetvId(this.getAttribute('href'));$(this).html('<img src='+GetThumb(id,settings.vThumbSize)+' width="120px" height="90px" class="FloatyThumb" id='+id+' />');$(this).click(function(){show(id);return false;});});function show(id){$('body').append('<div id="jq-overlay"></div><div id="jq-floaty"><div id="floaty-container-embed"><div id="floaty-close-btn"> </div></div></div>');var arrPageSizes=getPageSize();$('#jq-overlay').css({backgroundColor:settings.BgColor,opacity:settings.BgOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();$('#floaty-container-embed').css({backgroundColor:settings.BorderColor,opacity:settings.BorderOpacity});$('#floaty-close-btn').css({backgroundImage:'url('+settings.imgClose+')'});var arrPageScroll=getPageScroll();$('#jq-floaty').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#floaty-close-btn').click(function(){close();return false;});$(window).resize(function(){var arrPageSizes=getPageSize();$('#jq-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=getPageScroll();$('#jq-floaty').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});resize(settings.vWidth,settings.vHeight,id)}
function resize(vWidth,vHeight,id){var intCurrentWidth=$('#floaty-container-embed').width();var intCurrentHeight=$('#floaty-container-embed').height();var intWidth=(vWidth+20);var intHeight=(vHeight+20);var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#floaty-container-embed').animate({width:intWidth,height:intHeight},settings.ResizeSpeed,function(){play(id,settings.vWidth,settings.vHeight,settings.ShowBorder,settings.ShowRelatedVideo,settings.Color1,settings.Color2);keyboard_activate();});}
function keyboard_activate(){$(document).keydown(function(objEvent){keyboard(objEvent);});}
function keyboard(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
key=String.fromCharCode(keycode).toLowerCase();if((key==settings.CloseKey)||(key=='x')||(keycode==escapeKey)){close();}}
function play(id,w,h,b,r,c1,c2){var str='';if(c1!='666666'){str+='&color1=0x'+c1}
if(c2!='efefef'){str+='&color2=0x'+c2}
if(r!=1){str+='&rel=0'}
if(b!=0){str+='&border=1'}
var em='<div id="floaty-object"><object width="'+w+'" height="'+h+'"><param name="movie" value="http://www.youtube.com/v/'+id+'&hl=en&fs=1'+str+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+id+'&hl=en&fs=1'+str+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+w+'" height="'+h+'"></embed></object></div>'
$('#floaty-loading').hide();$('#floaty-container-embed').append(em);}
function close(){$('#jq-floaty').remove();$('#jq-overlay').fadeOut(function(){$('#jq-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
function GetvId(url){if(url==null){return"";}
var vid;var results;results=url.match("[\\?&]v=([^&#]*)");vid=(results==null)?url:results[1];return vid;}
function GetThumb(vid,size){if(size=="small"){return"http://img.youtube.com/vi/"+vid+"/"+settings.vThumbVer+".jpg";}else{return"http://img.youtube.com/vi/"+vid+"/0.jpg";}}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};};})(jQuery);﻿var includeCaption=false;var zoomTime=5;var zoomSteps=15;var includeFade=1;var minBorder=40;var shadowSettings='0px 5px 25px rgba(0, 0, 0, ';var zoomImagesURI='http://images1.progecad.us/skins/icadsales/images/zoom/';var myWidth=0,myHeight=0,myScroll=0;myScrollWidth=0;myScrollHeight=0;var zoomOpen=false,preloadFrame=1,preloadActive=false,preloadTime=0,imgPreload=new Image();var preloadAnimTimer=0;var zoomActive=new Array();var zoomTimer=new Array();var zoomOrigW=new Array();var zoomOrigH=new Array();var zoomOrigX=new Array();var zoomOrigY=new Array();var zoomID="ZoomBox";var theID="ZoomImage";var zoomCaption="ZoomCaption";var zoomCaptionDiv="ZoomCapDiv";if(navigator.userAgent.indexOf("MSIE")!=-1){var browserIsIE=true;}
function setupZoom(){prepZooms();insertZoomHTML();zoomdiv=document.getElementById(zoomID);zoomimg=document.getElementById(theID);}
function prepZooms(){if(!document.getElementsByTagName){return;}
var links=document.getElementsByTagName("a");for(i=0;i<links.length;i++){if(links[i].getAttribute("href")){if(links[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi)!=-1){if(links[i].getAttribute("rel")!="nozoom"){links[i].onclick=function(event){return zoomClick(this,event);};links[i].onmouseover=function(){zoomPreload(this);};}}}}}
function zoomPreload(from){var theimage=from.getAttribute("href");if(imgPreload.src.indexOf(from.getAttribute("href").substr(from.getAttribute("href").lastIndexOf("/")))==-1){preloadActive=true;imgPreload=new Image();imgPreload.onload=function(){preloadActive=false;}
imgPreload.src=theimage;}}
function preloadAnimStart(){preloadTime=new Date();document.getElementById("ZoomSpin").style.left=(myWidth/2)+'px';document.getElementById("ZoomSpin").style.top=((myHeight/2)+myScroll)+'px';document.getElementById("ZoomSpin").style.visibility="visible";preloadFrame=1;document.getElementById("SpinImage").src=zoomImagesURI+'zoom-spin-'+preloadFrame+'.png';preloadAnimTimer=setInterval("preloadAnim()",100);}
function preloadAnim(from){if(preloadActive!=false){document.getElementById("SpinImage").src=zoomImagesURI+'zoom-spin-'+preloadFrame+'.png';preloadFrame++;if(preloadFrame>12)preloadFrame=1;}else{document.getElementById("ZoomSpin").style.visibility="hidden";clearInterval(preloadAnimTimer);preloadAnimTimer=0;zoomIn(preloadFrom);}}
function zoomClick(from,evt){var shift=getShift(evt);if(!evt&&window.event&&(window.event.metaKey||window.event.altKey)){return true;}else if(evt&&(evt.metaKey||evt.altKey)){return true;}
getSize();if(preloadActive==true){if(preloadAnimTimer==0){preloadFrom=from;preloadAnimStart();}}else{zoomIn(from,shift);}
return false;}
function zoomIn(from,shift){zoomimg.src=from.getAttribute("href");if(from.childNodes[0].width){startW=from.childNodes[0].width;startH=from.childNodes[0].height;startPos=findElementPos(from.childNodes[0]);}else{startW=50;startH=12;startPos=findElementPos(from);}
hostX=startPos[0];hostY=startPos[1];if(document.getElementById('scroller')){hostX=hostX-document.getElementById('scroller').scrollLeft;}
endW=imgPreload.width;endH=imgPreload.height;if(zoomActive[theID]!=true){if(document.getElementById("ShadowBox")){document.getElementById("ShadowBox").style.visibility="hidden";}else if(!browserIsIE){if(fadeActive["ZoomImage"]){clearInterval(fadeTimer["ZoomImage"]);fadeActive["ZoomImage"]=false;fadeTimer["ZoomImage"]=false;}
document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+'0.0)';}
document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption){document.getElementById(zoomCaptionDiv).style.visibility="hidden";if(from.getAttribute('title')&&includeCaption){document.getElementById(zoomCaption).innerHTML=from.getAttribute('title');}else{document.getElementById(zoomCaption).innerHTML="";}}
zoomOrigW[theID]=startW;zoomOrigH[theID]=startH;zoomOrigX[theID]=hostX;zoomOrigY[theID]=hostY;zoomimg.style.width=startW+'px';zoomimg.style.height=startH+'px';zoomdiv.style.left=hostX+'px';zoomdiv.style.top=hostY+'px';if(includeFade==1){setOpacity(0,zoomID);}
zoomdiv.style.visibility="visible";sizeRatio=endW/endH;if(endW>myWidth-minBorder){endW=myWidth-minBorder;endH=endW/sizeRatio;}
if(endH>myHeight-minBorder){endH=myHeight-minBorder;endW=endH*sizeRatio;}
zoomChangeX=((myWidth/2)-(endW/2)-hostX);zoomChangeY=(((myHeight/2)-(endH/2)-hostY)+myScroll);zoomChangeW=(endW-startW);zoomChangeH=(endH-startH);if(shift){tempSteps=zoomSteps*7;}else{tempSteps=zoomSteps;}
zoomCurrent=0;if(includeFade==1){fadeCurrent=0;fadeAmount=(0-100)/tempSteps;}else{fadeAmount=0;}
zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+hostX+", "+zoomChangeX+", "+hostY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDoneIn(zoomID)')",zoomTime);zoomActive[theID]=true;}}
function zoomOut(from,evt){if(getShift(evt)){tempSteps=zoomSteps*7;}else{tempSteps=zoomSteps;}
if(zoomActive[theID]!=true){if(document.getElementById("ShadowBox")){document.getElementById("ShadowBox").style.visibility="hidden";}else if(!browserIsIE){if(fadeActive["ZoomImage"]){clearInterval(fadeTimer["ZoomImage"]);fadeActive["ZoomImage"]=false;fadeTimer["ZoomImage"]=false;}
document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+'0.0)';}
document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption&&document.getElementById(zoomCaption).innerHTML!=""){document.getElementById(zoomCaptionDiv).style.visibility="hidden";}
startX=parseInt(zoomdiv.style.left);startY=parseInt(zoomdiv.style.top);startW=zoomimg.width;startH=zoomimg.height;zoomChangeX=zoomOrigX[theID]-startX;zoomChangeY=zoomOrigY[theID]-startY;zoomChangeW=zoomOrigW[theID]-startW;zoomChangeH=zoomOrigH[theID]-startH;zoomCurrent=0;if(includeFade==1){fadeCurrent=0;fadeAmount=(100-0)/tempSteps;}else{fadeAmount=0;}
zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+startX+", "+zoomChangeX+", "+startY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDone(zoomID, theID)')",zoomTime);zoomActive[theID]=true;}}
function zoomDoneIn(zoomdiv,theID){zoomOpen=true;zoomdiv=document.getElementById(zoomdiv);if(document.getElementById("ShadowBox")){setOpacity(0,"ShadowBox");shadowdiv=document.getElementById("ShadowBox");shadowLeft=parseInt(zoomdiv.style.left)-13;shadowTop=parseInt(zoomdiv.style.top)-8;shadowWidth=zoomdiv.offsetWidth+26;shadowHeight=zoomdiv.offsetHeight+26;shadowdiv.style.width=shadowWidth+'px';shadowdiv.style.height=shadowHeight+'px';shadowdiv.style.left=shadowLeft+'px';shadowdiv.style.top=shadowTop+'px';document.getElementById("ShadowBox").style.visibility="visible";fadeElementSetup("ShadowBox",0,100,5);}else if(!browserIsIE){fadeElementSetup("ZoomImage",0,.8,5,0,"shadow");}
if(includeCaption&&document.getElementById(zoomCaption).innerHTML!=""){zoomcapd=document.getElementById(zoomCaptionDiv);zoomcapd.style.top=parseInt(zoomdiv.style.top)+(zoomdiv.offsetHeight+15)+'px';zoomcapd.style.left=(myWidth/2)-(zoomcapd.offsetWidth/2)+'px';zoomcapd.style.visibility="visible";}
if(!browserIsIE)setOpacity(0,"ZoomClose");document.getElementById("ZoomClose").style.visibility="visible";if(!browserIsIE)fadeElementSetup("ZoomClose",0,100,5);document.onkeypress=getKey;}
function zoomDone(zoomdiv,theID){zoomOpen=false;zoomOrigH[theID]="";zoomOrigW[theID]="";document.getElementById(zoomdiv).style.visibility="hidden";zoomActive[theID]==false;document.onkeypress=null;}
function zoomElement(zoomdiv,theID,zoomCurrent,zoomStartW,zoomChangeW,zoomStartH,zoomChangeH,zoomStartX,zoomChangeX,zoomStartY,zoomChangeY,zoomSteps,includeFade,fadeAmount,execWhenDone){if(zoomCurrent==(zoomSteps+1)){zoomActive[theID]=false;clearInterval(zoomTimer[theID]);if(execWhenDone!=""){eval(execWhenDone);}}else{if(includeFade==1){if(fadeAmount<0){setOpacity(Math.abs(zoomCurrent*fadeAmount),zoomdiv);}else{setOpacity(100-(zoomCurrent*fadeAmount),zoomdiv);}}
moveW=cubicInOut(zoomCurrent,zoomStartW,zoomChangeW,zoomSteps);moveH=cubicInOut(zoomCurrent,zoomStartH,zoomChangeH,zoomSteps);moveX=cubicInOut(zoomCurrent,zoomStartX,zoomChangeX,zoomSteps);moveY=cubicInOut(zoomCurrent,zoomStartY,zoomChangeY,zoomSteps);document.getElementById(zoomdiv).style.left=moveX+'px';document.getElementById(zoomdiv).style.top=moveY+'px';zoomimg.style.width=moveW+'px';zoomimg.style.height=moveH+'px';zoomCurrent++;clearInterval(zoomTimer[theID]);zoomTimer[theID]=setInterval("zoomElement('"+zoomdiv+"', '"+theID+"', "+zoomCurrent+", "+zoomStartW+", "+zoomChangeW+", "+zoomStartH+", "+zoomChangeH+", "+zoomStartX+", "+zoomChangeX+", "+zoomStartY+", "+zoomChangeY+", "+zoomSteps+", "+includeFade+", "+fadeAmount+", '"+execWhenDone+"')",zoomTime);}}
function getKey(evt){if(!evt){theKey=event.keyCode;}else{theKey=evt.keyCode;}
if(theKey==27){zoomOut(this,evt);}}
function fadeOut(elem){if(elem.id){fadeElementSetup(elem.id,100,0,10);}}
function fadeIn(elem){if(elem.id){fadeElementSetup(elem.id,0,100,10);}}
var fadeActive=new Array();var fadeQueue=new Array();var fadeTimer=new Array();var fadeClose=new Array();var fadeMode=new Array();function fadeElementSetup(theID,fdStart,fdEnd,fdSteps,fdClose,fdMode){if(fadeActive[theID]==true){fadeQueue[theID]=new Array(theID,fdStart,fdEnd,fdSteps);}else{fadeSteps=fdSteps;fadeCurrent=0;fadeAmount=(fdStart-fdEnd)/fadeSteps;fadeTimer[theID]=setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')",15);fadeActive[theID]=true;fadeMode[theID]=fdMode;if(fdClose==1){fadeClose[theID]=true;}else{fadeClose[theID]=false;}}}
function fadeElement(theID,fadeCurrent,fadeAmount,fadeSteps){if(fadeCurrent==fadeSteps){clearInterval(fadeTimer[theID]);fadeActive[theID]=false;fadeTimer[theID]=false;if(fadeClose[theID]==true){document.getElementById(theID).style.visibility="hidden";}
if(fadeQueue[theID]&&fadeQueue[theID]!=false){fadeElementSetup(fadeQueue[theID][0],fadeQueue[theID][1],fadeQueue[theID][2],fadeQueue[theID][3]);fadeQueue[theID]=false;}}else{fadeCurrent++;if(fadeMode[theID]=="shadow"){if(fadeAmount<0){document.getElementById(theID).style.webkitBoxShadow=shadowSettings+(Math.abs(fadeCurrent*fadeAmount))+')';}else{document.getElementById(theID).style.webkitBoxShadow=shadowSettings+(100-(fadeCurrent*fadeAmount))+')';}}else{if(fadeAmount<0){setOpacity(Math.abs(fadeCurrent*fadeAmount),theID);}else{setOpacity(100-(fadeCurrent*fadeAmount),theID);}}
clearInterval(fadeTimer[theID]);fadeTimer[theID]=setInterval("fadeElement('"+theID+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')",15);}}
function setOpacity(opacity,theID){var object=document.getElementById(theID).style;if(navigator.userAgent.indexOf("Firefox")!=-1){if(opacity==100){opacity=99.9999;}}
object.filter="alpha(opacity="+opacity+")";object.opacity=(opacity/100);}
function linear(t,b,c,d)
{return c*t/d+b;}
function sineInOut(t,b,c,d)
{return-c/2*(Math.cos(Math.PI*t/d)-1)+b;}
function cubicIn(t,b,c,d){return c*(t/=d)*t*t+b;}
function cubicOut(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;}
function cubicInOut(t,b,c,d)
{if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;}
function bounceOut(t,b,c,d)
{if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}}
function getSize(){if(self.innerHeight){myWidth=window.innerWidth;myHeight=window.innerHeight;myScroll=window.pageYOffset;}else if(document.documentElement&&document.documentElement.clientHeight){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;myScroll=document.documentElement.scrollTop;}else if(document.body){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;myScroll=document.body.scrollTop;}
if(window.innerHeight&&window.scrollMaxY){myScrollWidth=document.body.scrollWidth;myScrollHeight=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){myScrollWidth=document.body.scrollWidth;myScrollHeight=document.body.scrollHeight;}else{myScrollWidth=document.body.offsetWidth;myScrollHeight=document.body.offsetHeight;}}
function getShift(evt){var shift=false;if(!evt&&window.event){shift=window.event.shiftKey;}else if(evt){shift=evt.shiftKey;if(shift)evt.stopPropagation();}
return shift;}
function findElementPos(elemFind)
{var elemX=0;var elemY=0;do{elemX+=elemFind.offsetLeft;elemY+=elemFind.offsetTop;}while(elemFind=elemFind.offsetParent)
return Array(elemX,elemY);}﻿function insertZoomHTML(){var inBody=document.getElementsByTagName("body").item(0);var inSpinbox=document.createElement("div");inSpinbox.setAttribute('id','ZoomSpin');inSpinbox.style.position='absolute';inSpinbox.style.left='10px';inSpinbox.style.top='10px';inSpinbox.style.visibility='hidden';inSpinbox.style.zIndex='3525';inBody.insertBefore(inSpinbox,inBody.firstChild);var inSpinImage=document.createElement("img");inSpinImage.setAttribute('id','SpinImage');inSpinImage.setAttribute('src',zoomImagesURI+'zoom-spin-1.png');inSpinbox.appendChild(inSpinImage);var inZoombox=document.createElement("div");inZoombox.setAttribute('id','ZoomBox');inZoombox.style.position='absolute';inZoombox.style.left='10px';inZoombox.style.top='10px';inZoombox.style.visibility='hidden';inZoombox.style.zIndex='3499';inBody.insertBefore(inZoombox,inSpinbox.nextSibling);var inImage1=document.createElement("img");inImage1.onclick=function(event){zoomOut(this,event);return false;};inImage1.setAttribute('src',zoomImagesURI+'spacer.gif');inImage1.setAttribute('id','ZoomImage');inImage1.setAttribute('border','0');inImage1.setAttribute('style','-webkit-box-shadow: '+shadowSettings+'0.0)');inImage1.style.display='block';inImage1.style.width='10px';inImage1.style.height='10px';inImage1.style.cursor='pointer';inZoombox.appendChild(inImage1);var inClosebox=document.createElement("div");inClosebox.setAttribute('id','ZoomClose');inClosebox.style.position='absolute';if(browserIsIE){inClosebox.style.left='-1px';inClosebox.style.top='0px';}else{inClosebox.style.left='-15px';inClosebox.style.top='-15px';}
inClosebox.style.visibility='hidden';inZoombox.appendChild(inClosebox);var inImage2=document.createElement("img");inImage2.onclick=function(event){zoomOut(this,event);return false;};inImage2.setAttribute('src',zoomImagesURI+'closebox.png');inImage2.setAttribute('width','30');inImage2.setAttribute('height','30');inImage2.setAttribute('border','0');inImage2.style.cursor='pointer';inClosebox.appendChild(inImage2);if(!document.getElementById('ZoomImage').style.webkitBoxShadow&&!browserIsIE){var inFixedBox=document.createElement("div");inFixedBox.setAttribute('id','ShadowBox');inFixedBox.style.position='absolute';inFixedBox.style.left='50px';inFixedBox.style.top='50px';inFixedBox.style.width='100px';inFixedBox.style.height='100px';inFixedBox.style.visibility='hidden';inFixedBox.style.zIndex='3498';inBody.insertBefore(inFixedBox,inZoombox.nextSibling);var inShadowTable=document.createElement("table");inShadowTable.setAttribute('border','0');inShadowTable.setAttribute('width','100%');inShadowTable.setAttribute('height','100%');inShadowTable.setAttribute('cellpadding','0');inShadowTable.setAttribute('cellspacing','0');inFixedBox.appendChild(inShadowTable);var inShadowTbody=document.createElement("tbody");inShadowTable.appendChild(inShadowTbody);var inRow1=document.createElement("tr");inRow1.style.height='25px';inShadowTbody.appendChild(inRow1);var inCol1=document.createElement("td");inCol1.style.width='27px';inRow1.appendChild(inCol1);var inShadowImg1=document.createElement("img");inShadowImg1.setAttribute('src',zoomImagesURI+'zoom-shadow1.png');inShadowImg1.setAttribute('width','27');inShadowImg1.setAttribute('height','25');inShadowImg1.style.display='block';inCol1.appendChild(inShadowImg1);var inCol2=document.createElement("td");inCol2.setAttribute('background',zoomImagesURI+'zoom-shadow2.png');inRow1.appendChild(inCol2);var inSpacer1=document.createElement("img");inSpacer1.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer1.setAttribute('height','1');inSpacer1.setAttribute('width','1');inSpacer1.style.display='block';inCol2.appendChild(inSpacer1);var inCol3=document.createElement("td");inCol3.style.width='27px';inRow1.appendChild(inCol3);var inShadowImg3=document.createElement("img");inShadowImg3.setAttribute('src',zoomImagesURI+'zoom-shadow3.png');inShadowImg3.setAttribute('width','27');inShadowImg3.setAttribute('height','25');inShadowImg3.style.display='block';inCol3.appendChild(inShadowImg3);inRow2=document.createElement("tr");inShadowTbody.appendChild(inRow2);var inCol4=document.createElement("td");inCol4.setAttribute('background',zoomImagesURI+'zoom-shadow4.png');inRow2.appendChild(inCol4);var inSpacer2=document.createElement("img");inSpacer2.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer2.setAttribute('height','1');inSpacer2.setAttribute('width','1');inSpacer2.style.display='block';inCol4.appendChild(inSpacer2);var inCol5=document.createElement("td");inCol5.setAttribute('bgcolor','#ffffff');inRow2.appendChild(inCol5);var inSpacer3=document.createElement("img");inSpacer3.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer3.setAttribute('height','1');inSpacer3.setAttribute('width','1');inSpacer3.style.display='block';inCol5.appendChild(inSpacer3);var inCol6=document.createElement("td");inCol6.setAttribute('background',zoomImagesURI+'zoom-shadow5.png');inRow2.appendChild(inCol6);var inSpacer4=document.createElement("img");inSpacer4.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer4.setAttribute('height','1');inSpacer4.setAttribute('width','1');inSpacer4.style.display='block';inCol6.appendChild(inSpacer4);var inRow3=document.createElement("tr");inRow3.style.height='26px';inShadowTbody.appendChild(inRow3);var inCol7=document.createElement("td");inCol7.style.width='27px';inRow3.appendChild(inCol7);var inShadowImg7=document.createElement("img");inShadowImg7.setAttribute('src',zoomImagesURI+'zoom-shadow6.png');inShadowImg7.setAttribute('width','27');inShadowImg7.setAttribute('height','26');inShadowImg7.style.display='block';inCol7.appendChild(inShadowImg7);var inCol8=document.createElement("td");inCol8.setAttribute('background',zoomImagesURI+'zoom-shadow7.png');inRow3.appendChild(inCol8);var inSpacer5=document.createElement("img");inSpacer5.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer5.setAttribute('height','1');inSpacer5.setAttribute('width','1');inSpacer5.style.display='block';inCol8.appendChild(inSpacer5);var inCol9=document.createElement("td");inCol9.style.width='27px';inRow3.appendChild(inCol9);var inShadowImg9=document.createElement("img");inShadowImg9.setAttribute('src',zoomImagesURI+'zoom-shadow8.png');inShadowImg9.setAttribute('width','27');inShadowImg9.setAttribute('height','26');inShadowImg9.style.display='block';inCol9.appendChild(inShadowImg9);}
if(includeCaption){var inCapDiv=document.createElement("div");inCapDiv.setAttribute('id','ZoomCapDiv');inCapDiv.style.position='absolute';inCapDiv.style.visibility='hidden';inCapDiv.style.marginLeft='auto';inCapDiv.style.marginRight='auto';inCapDiv.style.zIndex='3501';inBody.insertBefore(inCapDiv,inZoombox.nextSibling);var inCapTable=document.createElement("table");inCapTable.setAttribute('border','0');inCapTable.setAttribute('cellPadding','0');inCapTable.setAttribute('cellSpacing','0');inCapDiv.appendChild(inCapTable);var inTbody=document.createElement("tbody");inCapTable.appendChild(inTbody);var inCapRow1=document.createElement("tr");inTbody.appendChild(inCapRow1);var inCapCol1=document.createElement("td");inCapCol1.setAttribute('align','right');inCapRow1.appendChild(inCapCol1);var inCapImg1=document.createElement("img");inCapImg1.setAttribute('src',zoomImagesURI+'zoom-caption-l.png');inCapImg1.setAttribute('width','13');inCapImg1.setAttribute('height','26');inCapImg1.style.display='block';inCapCol1.appendChild(inCapImg1);var inCapCol2=document.createElement("td");inCapCol2.setAttribute('background',zoomImagesURI+'zoom-caption-fill.png');inCapCol2.setAttribute('id','ZoomCaption');inCapCol2.setAttribute('valign','middle');inCapCol2.style.fontSize='14px';inCapCol2.style.fontFamily='Helvetica';inCapCol2.style.fontWeight='bold';inCapCol2.style.color='#ffffff';inCapCol2.style.textShadow='0px 2px 4px #000000';inCapCol2.style.whiteSpace='nowrap';inCapRow1.appendChild(inCapCol2);var inCapCol3=document.createElement("td");inCapRow1.appendChild(inCapCol3);var inCapImg2=document.createElement("img");inCapImg2.setAttribute('src',zoomImagesURI+'zoom-caption-r.png');inCapImg2.setAttribute('width','13');inCapImg2.setAttribute('height','26');inCapImg2.style.display='block';inCapCol3.appendChild(inCapImg2);}}
var columnReadyCounter = 0;

// This is the callback function for the "hiding" animations
// it gets called for each animation (since we don't know which is slowest)
// the third time it's called, then it resets the column positions
function ifReadyThenReset() {

	columnReadyCounter++;

	if (columnReadyCounter == 3) {
		$(".colslot").not(".current .colslot").css("top", 350);
		columnReadyCounter = 0;
	}

};

// When the DOM is ready
$(function() {

	var $allContentBoxes = $(".content-box"),
	    $allTabs = $(".slottabs li a"),
	    $el, $colOne, $colTwo, $colThree,
	    hrefSelector = "",
	    speedOne = 1000,
		speedTwo = 2000,
		speedThree = 1500;

	// first tab and first content box are default current
	$(".slottabs li:first-child a, .content-box:first").addClass("current");
	$(".box-wrapper .current .colslot").css("top", 0);

	$("#slot-machine-tabs").delegate(".slottabs a", "click", function() {

		$el = $(this);

		if ( (!$el.hasClass("current")) && ($(":animated").length == 0 ) ) {

			// current tab correctly set
			$allTabs.removeClass("current");
			$el.addClass("current");

			// optional... random speeds each time.
			speedOne = Math.floor(Math.random()*1000) + 500;
			speedTwo = Math.floor(Math.random()*1000) + 500;
			speedThree = Math.floor(Math.random()*1000) + 500;

			// each column is animated upwards to hide
			// kind of annoyingly redudundant code
			$colOne = $(".box-wrapper .current .col-one");
			$colOne.animate({
				"top": -$colOne.height()
			}, speedOne);

			$colTwo = $(".box-wrapper .current .col-two");
			$colTwo.animate({
				"top": -$colTwo.height()
			}, speedTwo);

			$colThree = $(".box-wrapper .current .col-three");
			$colThree.animate({
				"top": -$colThree.height()
			}, speedThree);

			// new content box is marked as current
			$allContentBoxes.removeClass("current");
			hrefSelector = $el.attr("href");
			$(hrefSelector).addClass("current");

			// columns from new content area are moved up from the bottom
			// also annoying redundant and triple callback seems weird
			$(".box-wrapper .current .col-one").animate({
				"top": 0
			}, speedOne, function() {
				ifReadyThenReset();
			});

			$(".box-wrapper .current .col-two").animate({
				"top": 0
			}, speedTwo, function() {
				ifReadyThenReset();
			});

			$(".box-wrapper .current .col-three").animate({
				"top": 0
			}, speedThree, function() {
				ifReadyThenReset();
			});

		};

	});

});(function($) {
    $.fn.tipsy = function(options) {

        options = $.extend({}, $.fn.tipsy.defaults, options);
        
        return this.each(function() {
            
            var opts = $.fn.tipsy.elementOptions(this, options);
            
            $(this).hover(function() {

                $.data(this, 'cancel.tipsy', true);

                var tip = $.data(this, 'active.tipsy');
                if (!tip) {
                    tip = $('<div class="tipsy"><div class="tipsy-inner"/></div>');
                    tip.css({position: 'absolute', zIndex: 100000});
                    $.data(this, 'active.tipsy', tip);
                }

                if ($(this).attr('title') || typeof($(this).attr('original-title')) != 'string') {
                    $(this).attr('original-title', $(this).attr('title') || '').removeAttr('title');
                }

                var title;
                if (typeof opts.title == 'string') {
                    title = $(this).attr(opts.title == 'title' ? 'original-title' : opts.title);
                } else if (typeof opts.title == 'function') {
                    title = opts.title.call(this);
                }

                tip.find('.tipsy-inner')[opts.html ? 'html' : 'text'](title || opts.fallback);

                var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight});
                tip.get(0).className = 'tipsy'; // reset classname in case of dynamic gravity
                tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
                var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight;
                var gravity = (typeof opts.gravity == 'function') ? opts.gravity.call(this) : opts.gravity;

                switch (gravity.charAt(0)) {
                    case 'n':
                        tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north');
                        break;
                    case 's':
                        tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south');
                        break;
                    case 'e':
                        tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east');
                        break;
                    case 'w':
                        tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west');
                        break;
                }

                if (opts.fade) {
                    tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 0.8});
                } else {
                    tip.css({visibility: 'visible'});
                }

            }, function() {
                $.data(this, 'cancel.tipsy', false);
                var self = this;
                setTimeout(function() {
                    if ($.data(this, 'cancel.tipsy')) return;
                    var tip = $.data(self, 'active.tipsy');
                    if (opts.fade) {
                        tip.stop().fadeOut(function() { $(this).remove(); });
                    } else {
                        tip.remove();
                    }
                }, 100);

            });
            
        });
        
    };
    
    // Overwrite this method to provide options on a per-element basis.
    // For example, you could store the gravity in a 'tipsy-gravity' attribute:
    // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
    // (remember - do not modify 'options' in place!)
    $.fn.tipsy.elementOptions = function(ele, options) {
        return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
    };
    
    $.fn.tipsy.defaults = {
        fade: false,
        fallback: '',
        gravity: 'n',
        html: false,
        title: 'title'
    };
    
    $.fn.tipsy.autoNS = function() {
        return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
    };
    
    $.fn.tipsy.autoWE = function() {
        return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
    };
    
})(jQuery);
/*
 * jqDnR - Minimalistic Drag'n'Resize for jQuery.
 *
 * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * $Version: 2007.08.19 +r2
 */

(function($){
$.fn.jqDrag=function(h){return i(this,h,'d');};
$.fn.jqResize=function(h){return i(this,h,'r');};
$.jqDnR={dnr:{},e:0,
drag:function(v){
 if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY});
 else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)});
  return false;},
stop:function(){E.css('opacity',M.o);$(document).unbind('mousemove',J.drag).unbind('mouseup',J.stop);}
};
var J=$.jqDnR,M=J.dnr,E=J.e,
i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e;
 h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e;
 // attempt utilization of dimensions plugin to fix IE issues
 if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}}
 M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0].scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')};
 E.css({opacity:0.8});$(document).mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
 return false;
 });
});},
f=function(k){return parseInt(E.css(k))||false;};
})(jQuery);/**
* linkNotify v2.0 // 2009.12.15
* <http://briancray.com/2009/12/15/user-feedback-clicked-links-linknotify-2/>
* 
* default use: $('a').linkNotify();
* change selector: $('#content a').linkNotify();
* change progress bar color: $('a').linkNotify('#ff0000');
*
* @author    Brian Cray <bcrayzie@gmail.com>
*/

(function($) {
	$.fn.linkNotify = function (progressbarcolor) {
		progressbarcolor = progressbarcolor || '#eeeeee';
		
		var ignore = false;
		$(document).keydown(function () {
			ignore = true;
		}).keyup(function () {
			ignore = false;
		});
			
		this.not('[href^="#"]').not(':has(img)').each(function () {
			$(this).click(function () {
				if(ignore == true)
				{
					return;
				}
				
				var $thisel = $(this);
				var $thisoff = $thisel.offset();
				
				$('<div></div>').appendTo('body').css({'position': 'absolute', 'z-index': '-1', 'top': $thisoff.top, 'left': $thisoff.left, 'width': '0', 'height': $thisel.height(), 'background-color': progressbarcolor}).animate({'width': $thisel.width()}, 5000);
			});
		});
		return this;
	};
})(jQuery);