//cluetip
(function(E){var I,H,G,D,F,J,C;E.fn.cluetip=function(L,K){if(typeof L=="object"){K=L;L=null}return this.each(function(j){var U=E(this);var f=E.extend(false,{},E.fn.cluetip.defaults,K||{},E.metadata?U.metadata():E.meta?U.data():{});var O=false;var Y=parseInt(f.cluezIndex,10)-1;var r=false,q=0;if(!E("#cluetip").length){H=E('<div id="cluetip-inner"></div>');D=E('<h3 id="cluetip-title"></h3>');G=E('<div id="cluetip-outer"></div>').append(H).prepend(D);I=E('<div id="cluetip"></div>').css({zIndex:f.cluezIndex}).append(G).append('<div id="cluetip-extra"></div>')[B](A).hide();E('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:Y-1}).insertBefore("#cluetip").hide();I.css({position:"absolute",zIndex:Y});G.css({position:"relative",zIndex:Y+1});F=E('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:Y+1}).appendTo("#cluetip")}var h=(f.dropShadow)?+f.dropShadowSteps:0;if(!J){J=E([]);for(var u=0;u<h;u++){J=J.add(E("<div></div>").css({zIndex:Y-u-1,opacity:0.1,top:1+u,left:1+u}))}J.css({position:"absolute",backgroundColor:"#000"}).prependTo(I)}var d=U.attr(f.attribute),R=f.cluetipClass;if(!d&&!f.splitTitle&&!L){return true}if(f.local&&f.hideLocal){E(d+":first").hide()}var e=parseInt(f.topOffset,10),a=parseInt(f.leftOffset,10);var Z,s;var W=isNaN(parseInt(f.height,10))?"auto":(/\D/g).test(f.height)?f.height:f.height+"px";var M,S,k,x,m,t;var X=isNaN(parseInt(f.width,10))?275:parseInt(f.width,10);var v=X+(parseInt(I.css("paddingLeft"))||0)+(parseInt(I.css("paddingRight"))||0)+h;var b=this.offsetWidth;var T,l,y,n,N;var p;var g=(f.attribute!="title")?U.attr(f.titleAttribute):"";if(f.splitTitle){if(g==undefined){g=""}p=g.split(f.splitTitle);g=p.shift()}var Q;var V=function(AD){if(!f.onActivate(U)){return false}r=true;I.removeClass().css({width:X});if(d==U.attr("href")){U.css("cursor",f.cursor)}U.attr("title","");if(f.hoverClass){U.addClass(f.hoverClass)}S=k=U.offset().top;T=U.offset().left;n=AD.pageX;m=AD.pageY;if(U[0].tagName.toLowerCase()!="area"){M=E(document).scrollTop();N=E(window).width()}if(f.positionBy=="fixed"){l=b+T+a;I.css({left:l})}else{l=(b>T&&T>v)||T+b+v+a>N?T-v-a:b+T+a;if(U[0].tagName.toLowerCase()=="area"||f.positionBy=="mouse"||b+v>N){if(n+20+v>N){I.addClass(" cluetip-"+R);l=(n-v-a)>=0?n-v-a-parseInt(I.css("marginLeft"),10)+parseInt(H.css("marginRight"),10):n-(v/2)}else{l=n+a}}var AA=l<0?AD.pageY+e:AD.pageY;I.css({left:(l>0&&f.positionBy!="bottomTop")?l:(n+(v/2)>N)?N/2-v/2:Math.max(n-(v/2),0)})}s=E(window).height();if(L){H.html(L);o(AA)}else{if(p){var AB=p.length;for(var AC=0;AC<AB;AC++){if(AC==0){H.html(p[AC])}else{H.append('<div class="split-body">'+p[AC]+"</div>")}}o(AA)}else{if(!f.local&&d.indexOf("#")!=0){if(O&&f.ajaxCache){H.html(O);o(AA)}else{var AE=f.ajaxSettings;AE.url=d;AE.beforeSend=function(){G.children().empty();if(f.waitImage){E("#cluetip-waitimage").css({top:m+20,left:n+20}).show()}};AE.error=function(){if(r){H.html("<i>sorry, the contents could not be loaded</i>")}};AE.success=function(i){O=f.ajaxProcess(i);if(r){H.html(O)}};AE.complete=function(){C=E("#cluetip-inner img").length;if(C&&!E.browser.opera){E("#cluetip-inner img").load(function(){C--;if(C<1){E("#cluetip-waitimage").hide();if(r){o(AA)}}})}else{E("#cluetip-waitimage").hide();if(r){o(AA)}}};E.ajax(AE)}}else{if(f.local){var AF=E(d+":first");var z=E.fn.wrapInner?AF.wrapInner("<div></div>").children().clone(true):AF.html();E.fn.wrapInner?H.empty().append(z):H.html(z);o(AA)}}}}};var o=function(AA){I.addClass("cluetip-"+R);if(f.truncate){var AB=H.text().slice(0,f.truncate)+"...";H.html(AB)}function i(){}g?D.show().html(g):(f.showTitle)?D.show().html("&nbsp;"):D.hide();if(f.sticky){var z=E('<div id="cluetip-close"><a href="#">'+f.closeText+"</a></div>");(f.closePosition=="bottom")?z.appendTo(H):(f.closePosition=="title")?z.prependTo(D):z.prependTo(H);z.click(function(){c();return false});if(f.mouseOutClose){if(E.fn.hoverIntent&&f.hoverIntent){I.hoverIntent({over:i,timeout:f.hoverIntent.timeout,out:function(){z.trigger("click")}})}else{I.hover(i,function(){z.trigger("click")})}}else{I.unbind("mouseout")}}var AC="";G.css({overflow:W=="auto"?"visible":"auto",height:W});Z=W=="auto"?Math.max(I.outerHeight(),I.height()):parseInt(W,10);x=k;t=M+s;if(f.positionBy=="fixed"){x=k-f.dropShadowSteps+e}else{if((l<n&&Math.max(l,0)+v>n)||f.positionBy=="bottomTop"){if(k+Z+e>t&&m-M>Z+e){x=m-Z-e;AC="top"}else{x=m+e;AC="bottom"}}else{if(k+Z+e>t){x=(Z>=s)?M:t-Z-e}else{if(U.css("display")=="block"||U[0].tagName.toLowerCase()=="area"||f.positionBy=="mouse"){x=AA-e}else{x=k-f.dropShadowSteps}}}}if(AC==""){l<T?AC="left":AC="right"}I.css({top:x+"px"}).removeClass().addClass("clue-"+AC+"-"+R).addClass(" cluetip-"+R);if(f.arrows){var AD=(k-x-f.dropShadowSteps);F.css({top:(/(left|right)/.test(AC)&&l>=0&&AD>0)?AD+"px":/(left|right)/.test(AC)?0:""}).show()}else{F.hide()}J.hide();I.hide()[f.fx.open](f.fx.open!="show"&&f.fx.openSpeed);if(f.dropShadow){J.css({height:Z,width:X}).show()}if(E.fn.bgiframe){I.bgiframe()}if(f.delayedClose>0){q=setTimeout(c,f.delayedClose)}f.onShow(I,H)};var w=function(){r=false;E("#cluetip-waitimage").hide();if(!f.sticky||(/click|toggle/).test(f.activation)){c();clearTimeout(q)}if(f.hoverClass){U.removeClass(f.hoverClass)}E(".cluetip-clicked").removeClass("cluetip-clicked")};var c=function(){G.parent().hide().removeClass().end().children().empty();if(g){U.attr(f.titleAttribute,g)}U.css("cursor","");if(f.arrows){F.css({top:""})}};if((/click|toggle/).test(f.activation)){U.click(function(i){if(I.is(":hidden")||!U.is(".cluetip-clicked")){V(i);E(".cluetip-clicked").removeClass("cluetip-clicked");U.addClass("cluetip-clicked")}else{w(i)}this.blur();return false})}else{if(f.activation=="focus"){U.focus(function(i){V(i)});U.blur(function(i){w(i)})}else{U.click(function(){if(U.attr("href")&&U.attr("href")==d&&!f.clickThrough){return false}});var P=function(i){if(f.tracking==true){var AA=l-i.pageX;var z=x?x-i.pageY:k-i.pageY;U.mousemove(function(AB){I.css({left:AB.pageX+AA,top:AB.pageY+z})})}};if(E.fn.hoverIntent&&f.hoverIntent){U.mouseover(function(){U.attr("title","")}).hoverIntent({sensitivity:f.hoverIntent.sensitivity,interval:f.hoverIntent.interval,over:function(i){V(i);P(i)},timeout:f.hoverIntent.timeout,out:function(i){w(i);U.unbind("mousemove")}})}else{U.hover(function(i){V(i);P(i)},function(i){w(i);U.unbind("mousemove")})}}}})};E.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(K){return true},onShow:function(K,L){},ajaxCache:true,ajaxProcess:function(K){K=K.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,"").replace(/<(link|title)(.|\s)*?\/(link|title)>/g,"");return K},ajaxSettings:{dataType:"html"},debug:false};var B="appendTo",A="body";E.cluetip={};E.cluetip.setup=function(K){if(K&&K.insertionType&&(K.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){B=K.insertionType}if(K&&K.insertionElement){A=K.insertionElement}}})(jQuery);
//dimensions
(function($){$.dimensions={version:"@VERSION"};$.each(["Height","Width"],function(i,name){$.fn["inner"+name]=function(){if(!this[0]){return }var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";return this.css("display")!="none"?this[0]["client"+name]:num(this,name.toLowerCase())+num(this,"padding"+torl)+num(this,"padding"+borr)};$.fn["outer"+name]=function(options){if(!this[0]){return }var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";options=$.extend({margin:false},options||{});var val=this.css("display")!="none"?this[0]["offset"+name]:num(this,name.toLowerCase())+num(this,"border"+torl+"Width")+num(this,"border"+borr+"Width")+num(this,"padding"+torl)+num(this,"padding"+borr);return val+(options.margin?(num(this,"margin"+torl)+num(this,"margin"+borr)):0)}});$.each(["Left","Top"],function(i,name){$.fn["scroll"+name]=function(val){if(!this[0]){return }return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=="Left"?val:$(window)["scrollLeft"](),name=="Top"?val:$(window)["scrollTop"]()):this["scroll"+name]=val}):this[0]==window||this[0]==document?self[(name=="Left"?"pageXOffset":"pageYOffset")]||$.boxModel&&document.documentElement["scroll"+name]||document.body["scroll"+name]:this[0]["scroll"+name]}});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,"marginTop");offset.left-=num(elem,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return $(offsetParent)}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0}})(jQuery);
//hoverIntent
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode}catch(e){p=this}}if(p==this){return false}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.mouseover(handleHover).mouseout(handleHover)}})(jQuery);
//corner
jQuery.fn.corner=function(F){function K(N){var N=parseInt(N).toString(16);return(N.length<2)?"0"+N:N}function D(O){for(;O&&O.nodeName.toLowerCase()!="html";O=O.parentNode){var N=jQuery.css(O,"backgroundColor");if(N.indexOf("rgb")>=0){rgb=N.match(/\d+/g);return"#"+K(rgb[0])+K(rgb[1])+K(rgb[2])}if(N&&N!="transparent"){return N}}return"#ffffff"}function M(N){switch(H){case"round":return Math.round(E*(1-Math.cos(Math.asin(N/E))));case"cool":return Math.round(E*(1+Math.cos(Math.asin(N/E))));case"sharp":return Math.round(E*(1-Math.cos(Math.acos(N/E))));case"bite":return Math.round(E*(Math.cos(Math.asin((E-N-1)/E))));case"slide":return Math.round(E*(Math.atan2(N,E/N)));case"jut":return Math.round(E*(Math.atan2(E,(E-N-1))));case"curl":return Math.round(E*(Math.atan(N)));case"tear":return Math.round(E*(Math.cos(N)));case"wicked":return Math.round(E*(Math.tan(N)));case"long":return Math.round(E*(Math.sqrt(N)));case"sculpt":return Math.round(E*(Math.log((E-N-1),E)));case"dog":return(N&1)?(N+1):E;case"dog2":return(N&2)?(N+1):E;case"dog3":return(N&3)?(N+1):E;case"fray":return(N%2)*E;case"notch":return E;case"bevel":return N+1}}F=(F||"").toLowerCase();var B=/keep/.test(F);var G=((F.match(/cc:(#[0-9a-f]+)/)||[])[1]);var J=((F.match(/sc:(#[0-9a-f]+)/)||[])[1]);var E=parseInt((F.match(/(\d+)px/)||[])[1])||10;var L=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var H=((F.match(L)||["round"])[0]);var I={T:0,B:1};var A={TL:/top|tl/.test(F),TR:/top|tr/.test(F),BL:/bottom|bl/.test(F),BR:/bottom|br/.test(F)};if(!A.TL&&!A.TR&&!A.BL&&!A.BR){A={TL:1,TR:1,BL:1,BR:1}}var C=document.createElement("div");C.style.overflow="hidden";C.style.height="1px";C.style.backgroundColor=J||"transparent";C.style.borderStyle="solid";return this.each(function(R){var O={T:parseInt(jQuery.css(this,"paddingTop"))||0,R:parseInt(jQuery.css(this,"paddingRight"))||0,B:parseInt(jQuery.css(this,"paddingBottom"))||0,L:parseInt(jQuery.css(this,"paddingLeft"))||0};if(jQuery.browser.msie){this.style.zoom=1}if(!B){this.style.border="none"}C.style.borderColor=G||D(this.parentNode);var T=jQuery.curCSS(this,"height");for(var P in I){var U=I[P];C.style.borderStyle="none "+(A[P+"R"]?"solid":"none")+" none "+(A[P+"L"]?"solid":"none");var V=document.createElement("div");var N=V.style;U?this.appendChild(V):this.insertBefore(V,this.firstChild);if(U&&T!="auto"){if(jQuery.css(this,"position")=="static"){this.style.position="relative"}N.position="absolute";N.bottom=N.left=N.padding=N.margin="0";if(jQuery.browser.msie){N.setExpression("width","this.parentNode.offsetWidth")}else{N.width="100%"}}else{N.margin=!U?"-"+O.T+"px -"+O.R+"px "+(O.T-E)+"px -"+O.L+"px":(O.B-E)+"px -"+O.R+"px -"+O.B+"px -"+O.L+"px"}for(var Q=0;Q<E;Q++){var W=Math.max(0,M(Q));var S=C.cloneNode(false);S.style.borderWidth="0 "+(A[P+"R"]?W:0)+"px 0 "+(A[P+"L"]?W:0)+"px";U?V.appendChild(S):V.insertBefore(S,V.firstChild)}}})};