typeof classBehaviours=="undefined"&&(classBehaviours={}),typeof classBehaviours.transitions=="undefined"&&(classBehaviours.transitions={css3:!1,instance:0,rate:25,settings:[],start:function(n,t,i,r){var u=classBehaviours.transitions,v=classBehaviours.utilities,e,h,l,o,c,s,a,f;for(u.css3=u.checkCompatibility(n),n.id=n.id?n.id:"classBehavioursTransitions_"+u.instance++,u.settings[n.id]==null&&(u.settings[n.id]={}),u.settings[n.id].time=parseInt(v.getClassParameter(n,"time","500")),u.settings[n.id].curve=v.getClassParameter(n,"curve","0D5_0_0D5_1").split("_"),f=0;f<u.settings[n.id].curve.length;f++)u.settings[n.id].curve[f]=parseFloat(u.settings[n.id].curve[f].replace("D","."));for(e=n.className,f=0;f<t.length;f++)e=e.replace(t[f],i[0]);e.indexOf(i[0])<0&&(e+=" "+i[0]);switch(u.css3){case!0:n.style.transition="all cubic-bezier("+u.settings[n.id].curve[0]+", "+u.settings[n.id].curve[1]+", "+u.settings[n.id].curve[2]+", "+u.settings[n.id].curve[3]+") "+u.settings[n.id].time/1e3+"s",n.addEventListener("transitionend",r),n.className=e;break;case"webkit":n.style.webkitTransition="all cubic-bezier("+u.settings[n.id].curve[0]+", "+u.settings[n.id].curve[1]+", "+u.settings[n.id].curve[2]+", "+u.settings[n.id].curve[3]+") "+u.settings[n.id].time/1e3+"s",n.addEventListener("webkitTransitionEnd",r),n.className=e;break;case"opera":debug("Opera Transitions"),n.style.oTransition="all cubic-bezier("+u.settings[n.id].curve[0]+", "+u.settings[n.id].curve[1]+", "+u.settings[n.id].curve[2]+", "+u.settings[n.id].curve[3]+") "+u.settings[n.id].time/1e3+"s",n.addEventListener("oTransitionEnd",r),n.className=e;break;case"mozilla":h=0,/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)&&(l=RegExp.$1,h=l!=undefined?new Number(l):new Number(4)),n.style.mozTransition="all cubic-bezier("+u.settings[n.id].curve[0]+", "+u.settings[n.id].curve[1]+", "+u.settings[n.id].curve[2]+", "+u.settings[n.id].curve[3]+") "+u.settings[n.id].time/1e3+"s",h<4?n.addEventListener("mozTransitionEnd",r):n.addEventListener("mozTransitionEnd",r,!0),n.className=e;break;default:for(u.settings[n.id].timeout!=null&&(clearTimeout(u.settings[n.id].timeout),u.settings[n.id].timeout=null),o=null,c=n.className.split(" "),f=0;f<c.length;f++)o=u.getTransitionRules(c[f],o);for(o=u.getTransitionStatus(n,o),s=null,a=e.split(" "),f=0;f<a.length;f++)s=u.getTransitionRules(a[f],s);u.doTransition(n,o,s,+new Date,+new Date+u.settings[n.id].time,e,r)}},checkCompatibility:function(){var t=!1,i;try{document.createEvent("transitionEvent"),t=!0}catch(r){}try{document.createEvent("OTransitionEvent"),t="opera"}catch(r){}try{document.createEvent("WebKitTransitionEvent"),t="webkit"}catch(r){}return i=document.createElement("div"),typeof i.style.MozTransition!="undefined"&&(t="mozilla"),i=null,t},getTransitionRules:function(n,t){var i,e,o=n.toLowerCase(),t,f,u,r;for(t==null&&(t={transition:"",top:"",right:"",bottom:"",left:"",color:"",fontSize:"",background:"",backgroundColor:"",backgroundPosition:"",width:"",height:"",opacity:"",boxShadow:""}),f=0;f<document.styleSheets.length;f++)for(atMediaRules=document.styleSheets[f].cssRules!=null?document.styleSheets[f].cssRules:document.styleSheets[f].rules,u=0;u<atMediaRules.length;u++)for(i=atMediaRules[u].cssRules!=null?atMediaRules[u].cssRules:atMediaRules[u].rules,i==null&&(i=[atMediaRules[u]]),r=0;r<i.length;r++)e=i[r].selectorText.toLowerCase(),e.indexOf("."+o)>-1&&e.indexOf("."+o)==e.length-o.length-1&&(typeof i[r].style.transition!="undefined"&&i[r].style.transition!=""&&(t.transition=i[r].style.transition),typeof i[r].style.top!="undefined"&&i[r].style.top!=""&&(t.top=i[r].style.top),typeof i[r].style.right!="undefined"&&i[r].style.right!=""&&(t.right=i[r].style.right),typeof i[r].style.bottom!="undefined"&&i[r].style.bottom!=""&&(t.bottom=i[r].style.bottom),typeof i[r].style.left!="undefined"&&i[r].style.left!=""&&(t.left=i[r].style.left),typeof i[r].style.color!="undefined"&&i[r].style.color!=""&&(t.color=i[r].style.color),typeof i[r].style.fontSize!="undefined"&&i[r].style.fontSize!=""&&(t.size=i[r].style.fontSize),typeof i[r].style.background!="undefined"&&i[r].style.background!=""&&(t.background=i[r].style.background),typeof i[r].style.backgroundColor!="undefined"&&i[r].style.backgroundColor!=""&&(t.backgroundColor=i[r].style.backgroundColor),typeof i[r].style.backgroundPosition!="undefined"&&i[r].style.backgroundPosition!=""&&(t.backgroundPosition=i[r].style.backgroundPosition),typeof i[r].style.width!="undefined"&&i[r].style.width!=""&&(t.width=i[r].style.width),typeof i[r].style.height!="undefined"&&i[r].style.height!=""&&(t.height=i[r].style.height),typeof i[r].style.opacity!="undefined"&&i[r].style.opacity!=""?t.opacity=i[r].style.opacity:typeof i[r].style.MozOpacity!="undefined"&&i[r].style.MozOpacity!=""?t.opacity=i[r].style.MozOpacity:typeof i[r].style.WebkitOpacity!="undefined"&&i[r].style.WebkitOpacity!=""?t.opacity=i[r].style.WebkitOpacity:typeof i[r].style.OOpacity!="undefined"&&i[r].style.OOpacity!=""&&(t.opacity=i[r].style.OOpacity),navigator.userAgent.indexOf("MSIE")>-1&&typeof i[r].style.filter!="undefined"&&i[r].style.filter.indexOf("opacity=")>-1&&(t.opacity=parseInt(i[r].style.filter.split("opacity=")[1])/100),typeof i[r].style.boxShadow!="undefined"&&i[r].style.boxShadow!=""?t.boxShadow=i[r].style.boxShadow:typeof i[r].style.MozBoxShadow!="undefined"&&i[r].style.MozBoxShadow!=""?t.boxShadow=i[r].style.MozBoxShadow:typeof i[r].style.WebkitBoxShadow!="undefined"&&i[r].style.WebkitBoxShadow!=""?t.boxShadow=i[r].style.WebkitBoxShadow:typeof i[r].style.OBoxShadow!="undefined"&&i[r].style.OBoxShadow!=""&&(t.boxShadow=i[r].style.OBoxShadow));return t},getTransitionStatus:function(n,t){var t,i;return t==null&&(t={transition:"",top:"",right:"",bottom:"",left:"",color:"",fontSize:"",background:"",backgroundColor:"",backgroundPosition:"",width:"",height:"",opacity:"",boxShadow:""}),i={},i.transition=typeof n.style.transition!="undefined"&&n.style.transition!=""?n.style.transition:t.transition,i.top=typeof n.style.top!="undefined"&&n.style.top!=""?n.style.top:t.top,i.right=typeof n.style.right!="undefined"&&n.style.right!=""?n.style.right:t.right,i.bottom=typeof n.style.bottom!="undefined"&&n.style.bottom!=""?n.style.bottom:t.bottom,i.left=typeof n.style.left!="undefined"&&n.style.left!=""?n.style.left:t.left,i.color=typeof n.style.color!="undefined"&&n.style.color!=""?n.style.color:t.color,i.fontSize=typeof n.style.fontSize!="undefined"&&n.style.fontSize!=""?n.style.fontSize:t.fontSize,i.background=typeof n.style.background!="undefined"&&n.style.background!=""?n.style.background:t.background,i.backgroundColor=typeof n.style.backgroundColor!="undefined"&&n.style.backgroundColor!=""?n.style.backgroundColor:t.backgroundColor,i.backgroundPosition=typeof n.style.backgroundPosition!="undefined"&&n.style.backgroundPosition!=""?n.style.backgroundPosition:t.backgroundPosition,i.width=typeof n.style.width!="undefined"&&n.style.width!=""?n.style.width:t.width,i.height=typeof n.style.height!="undefined"&&n.style.height!=""?n.style.height:t.height,i.opacity=typeof n.style.opacity!="undefined"&&n.style.opacity!=""?n.style.opacity:typeof n.style.MozOpacity!="undefined"&&n.style.MozOpacity!=""?n.style.MozOpacity:typeof n.style.WebkitOpacity!="undefined"&&n.style.WebkitOpacity!=""?n.style.WebkitOpacity:typeof n.style.OOpacity!="undefined"&&n.style.OOpacity!=""?n.style.OOpacity:t.opacity,navigator.userAgent.indexOf("MSIE")>-1&&typeof n.style.filter!="undefined"&&n.style.filter!=""&&n.style.filter.indexOf("opacity=")>-1&&(i.opacity=parseInt(n.style.filter.split("opacity=")[1])/100),i.boxShadow=typeof n.style.boxShadow!="undefined"&&n.style.boxShadow!=""?n.style.boxShadow:typeof n.style.MozBoxShadow!="undefined"&&n.style.MozBoxShadow!=""?n.style.MozBoxShadow:typeof n.style.WebkitBoxShadow!="undefined"&&n.style.WebkitBoxShadow!=""?n.style.WebkitBoxShadow:typeof n.style.OBoxShadow!="undefined"&&n.style.OBoxShadow!=""?n.style.OBoxShadow:t.boxShadow,i},setTransitionStatus:function(n,t){t.transition!=""&&(n.style.transition=t.transition),t.top!=""&&(n.style.top=t.top),t.right!=""&&(n.style.right=t.right),t.bottom!=""&&(n.style.bottom=t.bottom),t.left!=""&&(n.style.left=t.left),t.color!=""&&(n.style.color=t.color),t.fontSize!=""&&(n.style.fontSize=t.fontSize),t.background!=""&&(n.style.background=t.background),t.backgroundColor!=""&&(n.style.backgroundColor=t.backgroundColor),t.backgroundPosition!=""&&(n.style.backgroundPosition=t.backgroundPosition),t.width!=""&&(n.style.width=t.width),t.height!=""&&(n.style.height=t.height),t.opacity!=""&&(n.style.opacity=t.opacity),t.opacity!=""&&(n.style.MozOpacity=t.opacity),t.opacity!=""&&(n.style.WebkitOpacity=t.opacity),t.opacity!=""&&(n.style.OOpacity=t.opacity),navigator.userAgent.indexOf("MSIE")>-1&&t.opacity!=""&&(n.style.filter="alpha(opacity="+Math.round(t.opacity*100)+")"),t.boxShadow!=""&&(n.style.boxShadow=t.boxShadow),t.boxShadow!=""&&(n.style.MozBoxShadow=t.boxShadow),t.boxShadow!=""&&(n.style.WebkitBoxShadow=t.boxShadow),t.boxShadow!=""&&(n.style.OBoxShadow=t.boxShadow)},parseColor:function(n){var i,t;if(n.indexOf("#")>-1)for(i=[n.substr(1,2),n.substr(3,2),n.substr(5,2)],t=0;t<i.length;t++)i[t]=parseInt(i[t],16);else if(n.indexOf("rgb(")>-1)for(i=n.replace("rgb(","").replace(")","").split(","),t=0;t<i.length;t++)i[t]=parseInt(i[t]);else n.indexOf("rgba(")>-1;return i},doTransition:function(n,t,i,r,u,f,e){var c=classBehaviours.transitions,d=+new Date,o=(d-r)/(u-r);o>1&&(o=1);if(t.top!=""&&i.top!=""){var tt=t.top.indexOf("%")>-1?parseFloat(t.top)/100:parseFloat(t.top),at=i.top.indexOf("%")>-1?parseFloat(i.top)/100:parseFloat(i.top),v=(at-tt)*o+tt;t.top.indexOf("%")>-1&&(v=v*100+"%"),t.top.indexOf("em")>-1&&(v=v+"em"),t.top.indexOf("px")>-1&&(v=parseInt(v)+"px"),n.style.top=v}if(t.right!=""&&i.right!=""){var nt=t.right.indexOf("%")>-1?parseFloat(t.right)/100:parseFloat(t.right),lt=i.right.indexOf("%")>-1?parseFloat(i.right)/100:parseFloat(i.right),b=(lt-nt)*o+nt;t.right.indexOf("%")>-1&&(b=b*100+"%"),t.right.indexOf("em")>-1&&(b=b+"em"),t.right.indexOf("px")>-1&&(b=parseInt(b)+"px"),n.style.left=h}if(t.bottom!=""&&i.bottom!=""){var g=t.bottom.indexOf("%")>-1?parseFloat(t.bottom)/100:parseFloat(t.bottom),ot=i.bottom.indexOf("%")>-1?parseFloat(i.bottom)/100:parseFloat(i.bottom),a=(ot-g)*o+g;t.bottom.indexOf("%")>-1&&(a=a*100+"%"),t.bottom.indexOf("em")>-1&&(a=a+"em"),t.bottom.indexOf("px")>-1&&(a=parseInt(a)+"px"),n.style.bottom=a}if(t.left!=""&&i.left!=""){var rt=t.left.indexOf("%")>-1?parseFloat(t.left)/100:parseFloat(t.left),et=i.left.indexOf("%")>-1?parseFloat(i.left)/100:parseFloat(i.left),h=(et-rt)*o+rt;t.left.indexOf("%")>-1&&(h=h*100+"%"),t.left.indexOf("em")>-1&&(h=h+"em"),t.left.indexOf("px")>-1&&(h=parseInt(h)+"px"),n.style.left=h}if(t.width!=""&&i.width!=""){var ut=t.width.indexOf("%")>-1?parseFloat(t.width)/100:parseFloat(t.width),ct=i.width.indexOf("%")>-1?parseFloat(i.width)/100:parseFloat(i.width),l=(ct-ut)*o+ut;t.width.indexOf("%")>-1&&(l=l*100+"%"),t.width.indexOf("em")>-1&&(l=l+"em"),t.width.indexOf("px")>-1&&(l=parseInt(l)+"px"),n.style.width=l}if(t.height!=""&&i.height!=""){var ft=t.height.indexOf("%")>-1?parseFloat(t.height)/100:parseFloat(t.height),ht=i.height.indexOf("%")>-1?parseFloat(i.height)/100:parseFloat(i.height),y=(ht-ft)*o+ft;t.height.indexOf("%")>-1&&(y=y*100+"%"),t.height.indexOf("em")>-1&&(y=y+"em"),t.height.indexOf("px")>-1&&(y=parseInt(y)+"px"),n.style.height=y}if(t.opacity!=""&&i.opacity!=""){var it=parseFloat(t.opacity),st=parseFloat(i.opacity),k=(st-it)*o+it;n.style.opacity=k,n.style.MozOpacity=k,n.style.WebkitOpacity=k,n.style.OOpacity=k,navigator.userAgent.indexOf("MSIE")>-1&&(n.style.filter="alpha(opacity="+Math.round(k*100)+")")}if(t.color!=""&&i.color!=""){var s=c.parseColor(t.color),p=c.parseColor(i.color),w=[parseInt((p[0]-s[0])*o+s[0]),parseInt((p[1]-s[1])*o+s[1]),parseInt((p[2]-s[2])*o+s[2])];n.style.color="#"+w[0].toString(16)+w[1].toString(16)+w[2].toString(16)}if(t.backgroundColor!=""&&i.backgroundColor!=""){var s=c.parseColor(t.backgroundColor),p=c.parseColor(i.backgroundColor),w=[parseInt((p[0]-s[0])*o+s[0]),parseInt((p[1]-s[1])*o+s[1]),parseInt((p[2]-s[2])*o+s[2])];n.style.backgroundColor="#"+w[0].toString(16)+w[1].toString(16)+w[2].toString(16)}d<u?c.settings[n.id].timeout=setTimeout(function(){classBehaviours.transitions.doTransition(n,t,i,r,u,f,e)},c.rate+d-+new Date):(c.settings[n.id].timeout=null,n.className=f,c.setTransitionStatus(n,i),e!=null&&e(n))}})
