// ColorBox v1.3.17.1 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function bc(b){if(!T){O=b,_(a.extend(J,a.data(O,e))),x=a(O),P=0,J.rel!=="nofollow"&&(x=a("."+X).filter(function(){var b=a.data(this,e).rel||this.rel;return b===J.rel}),P=x.index(O),P===-1&&(x=x.add(O),P=x.length-1));if(!R){R=S=!0,q.show();if(J.returnFocus)try{O.blur(),a(O).one(k,function(){try{this.focus()}catch(a){}})}catch(c){}p.css({opacity:+J.opacity,cursor:J.overlayClose?"pointer":"auto"}).show(),J.w=Z(J.initialWidth,"x"),J.h=Z(J.initialHeight,"y"),W.position(0),n&&y.bind("resize."+o+" scroll."+o,function(){p.css({width:y.width(),height:y.height(),top:y.scrollTop(),left:y.scrollLeft()})}).trigger("resize."+o),ba(g,J.onOpen),I.add(C).hide(),H.html(J.close).show()}W.load(!0)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;J.slideshow&&x[1]?(d=function(){E.text(J.slideshowStop).unbind(c).bind(i,function(){if(P<x.length-1||J.loop)a=setTimeout(W.next,J.slideshowSpeed)}).bind(h,function(){clearTimeout(a)}).one(c+" "+j,e),q.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,J.slideshowSpeed)},e=function(){clearTimeout(a),E.text(J.slideshowStart).unbind([i,h,j,c].join(" ")).one(c,d),q.removeClass(b+"on").addClass(b+"off")},J.slideshowAuto?d():e()):q.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(O),a.event.trigger(b)}function _(b){for(var c in b)a.isFunction(b[c])&&c.substring(0,2)!=="on"&&(b[c]=b[c].call(O));b.rel=b.rel||O.rel||"nofollow",b.href=b.href||a(O).attr("href"),b.title=b.title||O.title,typeof b.href=="string"&&(b.href=a.trim(b.href))}function $(a){return J.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){b=b==="x"?y.width():y.height();return typeof a=="string"?Math.round(/%/.test(a)?b/100*parseInt(a,10):parseInt(a,10)):a}function Y(c,d){var e=b.createElement("div");c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},e="colorbox",f="cbox",g=f+"_open",h=f+"_load",i=f+"_complete",j=f+"_cleanup",k=f+"_closed",l=f+"_purge",m=a.browser.msie&&!a.support.opacity,n=m&&a.browser.version<7,o=f+"_IE6",p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K,L,M,N,O,P,Q,R,S,T,U,V,W,X=f+"Element";W=a.fn[e]=a[e]=function(b,c){var f=this,g;if(!f[0]&&f.selector)return f;b=b||{},c&&(b.onComplete=c);if(!f[0]||f.selector===undefined)f=a("<a/>"),b.open=!0;f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(X)}),g=b.open,a.isFunction(g)&&(g=g.call(f)),g&&bc(f[0]);return f},W.init=function(){y=a(c),q=Y().attr({id:e,"class":m?f+(n?"IE6":"IE"):""}),p=Y("Overlay",n?"position:absolute":"").hide(),r=Y("Wrapper"),s=Y("Content").append(z=Y("LoadedContent","width:0; height:0; overflow:hidden"),B=Y("LoadingOverlay").add(Y("LoadingGraphic")),C=Y("Title"),D=Y("Current"),F=Y("Next"),G=Y("Previous"),E=Y("Slideshow").bind(g,bb),H=Y("Close")),r.append(Y().append(Y("TopLeft"),t=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(u=Y("MiddleLeft"),s,v=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),w=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),A=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(p,q.append(r,A)),s.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),K=t.height()+w.height()+s.outerHeight(!0)-s.height(),L=u.width()+v.width()+s.outerWidth(!0)-s.width(),M=z.outerHeight(!0),N=z.outerWidth(!0),q.css({"padding-bottom":K,"padding-right":L}).hide(),F.click(function(){W.next()}),G.click(function(){W.prev()}),H.click(function(){W.close()}),I=F.add(G).add(D).add(E),s.children().removeClass("hover"),p.click(function(){J.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;R&&J.escKey&&b===27&&(a.preventDefault(),W.close()),R&&J.arrowKey&&x[1]&&(b===37?(a.preventDefault(),G.click()):b===39&&(a.preventDefault(),F.click()))})},W.remove=function(){q.add(p).remove(),a("."+X).removeData(e).removeClass(X)},W.position=function(a,c){function g(a){t[0].style.width=w[0].style.width=s[0].style.width=a.style.width,B[0].style.height=B[1].style.height=s[0].style.height=u[0].style.height=v[0].style.height=a.style.height}var d,e=0,f=0;q.hide(),J.fixed&&!n?q.css({position:"fixed"}):(e=y.scrollTop(),f=y.scrollLeft(),q.css({position:"absolute"})),J.right!==!1?f+=Math.max(y.width()-J.w-N-L-Z(J.right,"x"),0):J.left!==!1?f+=Z(J.left,"x"):f+=Math.max(y.width()-J.w-N-L,0)/2,J.bottom!==!1?e+=Math.max(b.documentElement.clientHeight-J.h-M-K-Z(J.bottom,"y"),0):J.top!==!1?e+=Z(J.top,"y"):e+=Math.max(b.documentElement.clientHeight-J.h-M-K,0)/2,q.show(),d=q.width()===J.w+N&&q.height()===J.h+M?0:a,r[0].style.width=r[0].style.height="9999px",q.dequeue().animate({width:J.w+N,height:J.h+M,top:e,left:f},{duration:d,complete:function(){g(this),S=!1,r[0].style.width=J.w+N+L+"px",r[0].style.height=J.h+M+K+"px",c&&c()},step:function(){g(this)}})},W.resize=function(a){if(R){a=a||{},a.width&&(J.w=Z(a.width,"x")-N-L),a.innerWidth&&(J.w=Z(a.innerWidth,"x")),z.css({width:J.w}),a.height&&(J.h=Z(a.height,"y")-M-K),a.innerHeight&&(J.h=Z(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=z.wrapInner("<div style='overflow:auto'></div>").children();J.h=b.height(),b.replaceWith(b.children())}z.css({height:J.h}),W.position(J.transition==="none"?0:J.speed)}},W.prep=function(b){function h(b){W.position(b,function(){function o(){m&&q[0].style.removeAttribute("filter")}var b,d,g,h,j=x.length,k,n;!R||(n=function(){clearTimeout(V),B.hide(),ba(i,J.onComplete)},m&&Q&&z.fadeIn(100),C.html(J.title).add(z).show(),j>1?(typeof J.current=="string"&&D.html(J.current.replace(/\{current\}/,P+1).replace(/\{total\}/,j)).show(),F[J.loop||P<j-1?"show":"hide"]().html(J.next),G[J.loop||P?"show":"hide"]().html(J.previous),b=P?x[P-1]:x[j-1],g=P<j-1?x[P+1]:x[0],J.slideshow&&E.show(),J.preloading&&(h=a.data(g,e).href||g.href,d=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,d=a.isFunction(d)?d.call(b):d,$(h)&&(a("<img/>")[0].src=h),$(d)&&(a("<img/>")[0].src=d))):I.hide(),J.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],J.fastIframe?n():a(k).one("load",n),k.name=f+ +(new Date),k.src=J.href,J.scrolling||(k.scrolling="no"),m&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(z).one(l,function(){k.src="//about:blank"})):n(),J.transition==="fade"?q.fadeTo(c,1,o):o(),y.bind("resize."+f,function(){W.position(0)}))})}function g(){J.h=J.h||z.height(),J.h=J.mh&&J.mh<J.h?J.mh:J.h;return J.h}function d(){J.w=J.w||z.width(),J.w=J.mw&&J.mw<J.w?J.mw:J.w;return J.w}if(!!R){var c=J.transition==="none"?0:J.speed;y.unbind("resize."+f),z.remove(),z=Y("LoadedContent").html(b),z.hide().appendTo(A.show()).css({width:d(),overflow:J.scrolling?"auto":"hidden"}).css({height:g()}).prependTo(s),A.hide(),a(Q).css({"float":"none"}),n&&a("select").not(q.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(j,function(){this.style.visibility="inherit"}),J.transition==="fade"?q.fadeTo(c,0,function(){h(0)}):h(c)}},W.load=function(b){var c,d,g=W.prep;S=!0,Q=!1,O=x[P],b||_(a.extend(J,a.data(O,e))),ba(l),ba(h,J.onLoad),J.h=J.height?Z(J.height,"y")-M-K:J.innerHeight&&Z(J.innerHeight,"y"),J.w=J.width?Z(J.width,"x")-N-L:J.innerWidth&&Z(J.innerWidth,"x"),J.mw=J.w,J.mh=J.h,J.maxWidth&&(J.mw=Z(J.maxWidth,"x")-N-L,J.mw=J.w&&J.w<J.mw?J.w:J.mw),J.maxHeight&&(J.mh=Z(J.maxHeight,"y")-M-K,J.mh=J.h&&J.h<J.mh?J.h:J.mh),c=J.href,V=setTimeout(function(){B.show()},100),J.inline?(Y().hide().insertBefore(a(c)[0]).one(l,function(){a(this).replaceWith(z.children())}),g(a(c))):J.iframe?g(" "):J.html?g(J.html):$(c)?(a(Q=new Image).addClass(f+"Photo").error(function(){J.title=!1,g(Y("Error").text("This image could not be loaded"))}).load(function(){var a;Q.onload=null,J.scalePhotos&&(d=function(){Q.height-=Q.height*a,Q.width-=Q.width*a},J.mw&&Q.width>J.mw&&(a=(Q.width-J.mw)/Q.width,d()),J.mh&&Q.height>J.mh&&(a=(Q.height-J.mh)/Q.height,d())),J.h&&(Q.style.marginTop=Math.max(J.h-Q.height,0)/2+"px"),x[1]&&(P<x.length-1||J.loop)&&(Q.style.cursor="pointer",Q.onclick=function(){W.next()}),m&&(Q.style.msInterpolationMode="bicubic"),setTimeout(function(){g(Q)},1)}),setTimeout(function(){Q.src=c},1)):c&&A.load(c,J.data,function(b,c,d){g(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!S&&x[1]&&(P<x.length-1||J.loop)&&(P=P<x.length-1?P+1:0,W.load())},W.prev=function(){!S&&x[1]&&(P||J.loop)&&(P=P?P-1:x.length-1,W.load())},W.close=function(){R&&!T&&(T=!0,R=!1,ba(j,J.onCleanup),y.unbind("."+f+" ."+o),p.fadeTo(200,0),q.stop().fadeTo(300,0,function(){q.add(p).css({opacity:1,cursor:"auto"}).hide(),ba(l),z.remove(),setTimeout(function(){T=!1,ba(k,J.onClosed)},1)}))},W.element=function(){return a(O)},W.settings=d,U=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+X,"click",U):a("."+X).live("click",U),a(W.init)})(jQuery,document,this);
(function ($) {

Drupal.behaviors.initColorbox = {
  attach: function (context, settings) {
    if (!$.isFunction($.colorbox)) {
      return;
    }
    $('a, area, input', context)
      .filter('.colorbox')
      .once('init-colorbox-processed')
      .colorbox(settings.colorbox);
  }
};

{
  $(document).bind('cbox_complete', function () {
    Drupal.attachBehaviors('#cboxLoadedContent');
  });
}

})(jQuery);
;
(function ($) {

Drupal.behaviors.initColorboxDefaultStyle = {
  attach: function (context, settings) {
    $(document).bind('cbox_complete', function () {
      // Only run if there is a title.
      if ($('#cboxTitle:empty', context).length == false) {
        setTimeout(function () { $('#cboxTitle', context).slideUp() }, 1500);
        $('#cboxLoadedContent img', context).bind('mouseover', function () {
          $('#cboxTitle', context).slideDown();
        });
        $('#cboxOverlay', context).bind('mouseover', function () {
          $('#cboxTitle', context).slideUp();
        });
      }
      else {
        $('#cboxTitle', context).hide();
      }
    });
  }
};

})(jQuery);
;
/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09i
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());;
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * 2005 Albert-Jan Pool published by FSI FontShop International GmbH
 * 
 * Trademark:
 * DIN is a trademark of FSI FontShop International GmbH
 * 
 * Manufacturer:
 * FSI
 * 
 * Designer:
 * Albert-Jan Pool
 * 
 * Vendor URL:
 * http://www.fontfont.com
 * 
 * License information:
 * http://www.fontfont.com/eula/license.html
 */
Cufon.registerFont({"w":543,"face":{"font-family":"DINOT-Bold","font-weight":700,"font-stretch":"normal","units-per-em":"1000","panose-1":"2 11 8 4 2 1 1 2 1 2","ascent":"764","descent":"-236","x-height":"6","bbox":"-23 -806 881 197","underline-thickness":"87","underline-position":"-48","stemh":"124","stemv":"130","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":232},"!":{"d":"273,-712r-33,489r-96,0r-32,-489r161,0xm267,0r-149,0r0,-148r149,0r0,148","w":347},"\"":{"d":"190,-501r-122,0r0,-211r122,0r0,211xm395,-501r-121,0r0,-211r121,0r0,211","w":464,"k":{"A":80}},"#":{"d":"643,-420r-89,0r-16,108r69,0r0,122r-89,0r-30,190r-137,0r31,-190r-116,0r-30,190r-137,0r30,-190r-69,0r0,-122r89,0r16,-108r-70,0r0,-121r89,0r28,-177r137,0r-28,177r116,0r28,-177r136,0r-27,177r69,0r0,121xm417,-420r-115,0r-17,108r116,0","w":691},"$":{"d":"571,-210v0,122,-90,197,-215,212r0,112r-101,0r0,-108v-96,-3,-171,-28,-236,-94r90,-90v42,42,99,58,159,60r0,-181v-132,-11,-221,-67,-221,-203v0,-115,78,-200,208,-214r0,-90r101,0r0,89v81,5,143,30,197,82r-88,87v-33,-32,-82,-45,-123,-48r0,174v141,13,229,69,229,212xm342,-120v87,-2,120,-91,71,-146v-15,-16,-34,-21,-71,-26r0,172xm268,-428r0,-167v-79,9,-114,86,-66,139v15,16,38,24,66,28","w":619},"%":{"d":"198,-429v65,0,50,-86,50,-148v0,-39,-18,-57,-50,-57v-67,0,-51,86,-51,148v0,39,18,57,51,57xm342,-482v0,90,-66,137,-144,137v-79,0,-146,-47,-146,-137r0,-99v0,-90,67,-137,146,-137v78,0,144,47,144,137r0,99xm651,-78v67,0,51,-86,51,-148v0,-38,-18,-57,-51,-57v-67,0,-51,86,-51,149v0,38,18,56,51,56xm796,-131v0,91,-66,137,-145,137v-79,0,-145,-46,-145,-137r0,-99v0,-90,66,-137,145,-137v79,0,145,47,145,137r0,99xm644,-712r-337,712r-102,0r337,-712r102,0","w":848},"&":{"d":"696,0r-165,0r-52,-62v-37,30,-85,68,-184,68v-157,0,-235,-82,-235,-216v0,-91,66,-150,128,-191v-29,-33,-71,-83,-71,-151v0,-97,71,-166,190,-166v112,0,182,71,182,168v0,79,-71,123,-124,161r120,142v23,-31,34,-74,36,-125r123,0v-5,92,-26,165,-76,221xm400,-154r-142,-167v-43,30,-72,58,-72,109v-1,107,150,130,214,58xm366,-549v0,-33,-22,-58,-59,-58v-39,0,-59,25,-59,58v0,26,22,51,47,80v28,-19,72,-42,71,-80","w":721},"'":{"d":"191,-501r-123,0r0,-211r123,0r0,211","w":259},"(":{"d":"194,94v-61,-55,-114,-121,-114,-232r0,-436v-6,-109,53,-178,114,-232r88,88v-40,41,-71,65,-71,150r0,424v-2,85,31,110,71,150","w":336},")":{"d":"142,-806v61,55,114,121,114,232r0,436v7,110,-53,178,-114,232r-88,-88v40,-41,71,-65,71,-150r0,-424v2,-85,-31,-110,-71,-150","w":336},"*":{"d":"440,-460r-46,79r-105,-66r4,125r-92,0r5,-125r-106,66r-45,-79r110,-58r-110,-58r45,-80r106,67r-5,-125r92,0r-4,125r105,-67r46,80r-111,58","w":494,"k":{"A":30}},"+":{"d":"493,-216r-160,0r0,160r-122,0r0,-160r-161,0r0,-122r161,0r0,-160r122,0r0,160r160,0r0,122"},",":{"d":"211,55r-143,110r0,-307r143,0r0,197","w":279,"k":{"Y":80}},"-":{"d":"367,-225r-308,0r0,-121r308,0r0,121","w":426,"k":{"T":40,"Y":40,"X":5}},".":{"d":"217,0r-149,0r0,-148r149,0r0,148","w":285,"k":{"Y":80}},"\/":{"d":"407,-786r-285,860r-122,0r285,-860r122,0","w":403,"k":{"\/":40}},"0":{"d":"488,-206v0,136,-100,212,-216,212v-116,0,-217,-76,-217,-212r0,-300v0,-136,101,-212,217,-212v116,0,216,76,216,212r0,300xm358,-207r0,-297v0,-60,-34,-97,-86,-97v-52,0,-87,37,-87,97r0,297v0,60,35,96,87,96v52,0,86,-36,86,-96"},"1":{"d":"378,0r-130,0r0,-572r-145,126r0,-140r145,-126r130,0r0,712"},"2":{"d":"492,0r-433,0r0,-117r266,-309v62,-57,47,-176,-49,-175v-43,0,-87,22,-87,91r-130,0v0,-130,95,-208,217,-208v126,0,216,79,216,207v0,69,-27,106,-76,163r-199,231r275,0r0,117"},"3":{"d":"495,-206v0,142,-104,212,-226,212v-116,0,-225,-61,-227,-210r130,0v2,64,46,93,97,93v56,0,96,-35,96,-99v0,-65,-44,-104,-119,-98r0,-113v72,6,109,-33,109,-89v0,-60,-40,-91,-87,-91v-49,0,-85,32,-88,86r-130,0v3,-127,98,-203,218,-203v126,0,217,84,217,204v0,77,-35,121,-82,146v51,27,92,76,92,162"},"4":{"d":"512,-101r-65,0r0,101r-125,0r0,-101r-291,0r0,-123r244,-488r142,0r-244,488r149,0r0,-133r125,0r0,133r65,0r0,123"},"5":{"d":"297,-478v140,0,197,124,197,238v0,143,-66,244,-220,246v-142,3,-213,-92,-217,-205r130,0v7,56,33,88,87,88v68,1,90,-56,90,-129v0,-82,-24,-128,-87,-128v-53,0,-77,30,-86,58r-119,0r0,-402r406,0r0,117r-288,0r0,153v19,-18,59,-36,107,-36"},"6":{"d":"492,-216v0,140,-96,222,-222,222v-126,0,-222,-79,-222,-220v0,-65,28,-125,60,-190r150,-308r142,0r-148,294v129,-38,240,52,240,202xm362,-215v0,-63,-37,-104,-92,-104v-53,0,-92,38,-92,104v0,66,39,104,92,104v53,0,92,-38,92,-104"},"7":{"d":"503,-595r-231,595r-141,0r231,-595r-188,0r0,112r-124,0r0,-229r453,0r0,117"},"8":{"d":"500,-207v0,138,-102,213,-228,213v-126,0,-228,-75,-228,-213v0,-87,50,-134,89,-160v-36,-25,-80,-72,-80,-148v0,-126,100,-203,219,-203v119,0,218,77,218,203v0,76,-44,123,-80,148v39,26,90,73,90,160xm370,-209v0,-55,-43,-99,-98,-99v-55,0,-98,44,-98,99v0,55,43,98,98,98v55,0,98,-43,98,-98xm360,-511v0,-51,-37,-90,-88,-90v-51,0,-89,39,-89,90v0,52,38,90,89,90v51,0,88,-38,88,-90"},"9":{"d":"495,-498v0,65,-27,125,-59,190r-151,308r-141,0r148,-294v-129,38,-241,-52,-241,-202v0,-140,96,-222,222,-222v126,0,222,79,222,220xm365,-497v0,-66,-39,-104,-92,-104v-53,0,-92,38,-92,104v0,63,37,104,92,104v53,0,92,-38,92,-104"},":":{"d":"241,-271r-148,0r0,-148r148,0r0,148xm241,0r-148,0r0,-148r148,0r0,148","w":309,"k":{"Y":70,"T":40}},";":{"d":"238,55r-142,110r0,-307r142,0r0,197xm241,-271r-148,0r0,-148r148,0r0,148","w":309},"<":{"d":"475,-42r-406,-187r0,-113r406,-187r0,137r-241,107r241,106r0,137"},"=":{"d":"493,-333r-443,0r0,-122r443,0r0,122xm493,-116r-443,0r0,-122r443,0r0,122"},">":{"d":"475,-229r-406,187r0,-137r241,-106r-241,-107r0,-137r406,187r0,113"},"?":{"d":"487,-518v0,99,-79,157,-123,223v-13,20,-20,41,-18,72r-130,0v-15,-146,141,-176,141,-296v0,-47,-31,-82,-81,-82v-53,0,-80,37,-80,83r-130,0v0,-124,94,-200,210,-200v113,0,211,73,211,200xm350,0r-138,0r0,-133r138,0r0,133","w":523},"@":{"d":"451,-716v157,-7,249,88,249,250r0,466r-121,0r0,-46v-32,35,-65,52,-120,52v-127,0,-173,-89,-173,-237v0,-148,44,-236,172,-236v51,0,88,16,118,49v13,-111,-36,-182,-135,-182r-124,0v-79,-7,-135,57,-135,137r0,289v0,50,11,70,44,99r-90,90v-57,-51,-79,-92,-79,-182r0,-299v-6,-160,89,-257,250,-250r144,0xm576,-231v0,-79,-19,-128,-83,-128v-64,0,-82,49,-82,128v0,79,18,129,82,129v64,0,83,-50,83,-129","w":758},"A":{"d":"633,0r-145,0r-42,-126r-253,0r-43,126r-145,0r259,-712r109,0xm409,-243r-87,-259r-90,259r177,0","w":638,"k":{"y":15,"w":5,"v":15,"V":40,"*":30,"\"":80}},"B":{"d":"599,-205v0,133,-91,205,-218,205r-298,0r0,-712r286,0v139,0,220,78,220,200v0,79,-52,130,-88,147v43,20,98,65,98,160xm460,-212v0,-48,-30,-87,-93,-87r-145,0r0,175r145,0v63,0,93,-40,93,-88xm450,-506v0,-49,-33,-82,-92,-82r-136,0r0,164r136,0v59,0,92,-33,92,-82","w":658,"k":{"Y":20,"X":20,"T":20,"S":5,"J":20,"A":10,"y":5,"V":5}},"C":{"d":"583,-219v-26,149,-129,225,-261,225v-82,0,-142,-27,-191,-75v-71,-71,-72,-151,-72,-287v0,-136,1,-216,72,-287v49,-48,109,-75,191,-75v133,0,235,76,261,225r-142,0v-14,-58,-50,-101,-119,-101v-38,0,-69,14,-89,37v-26,30,-35,65,-35,201v0,136,9,171,35,201v20,23,51,37,89,37v69,0,106,-43,120,-101r141,0","w":620,"k":{"V":10,"C":10,"G":10,"J":20,"O":10,"Q":10,"T":10,"W":10,"Y":10,"A":10,"X":15}},"D":{"d":"600,-356v0,118,-1,191,-45,252v-51,71,-118,104,-215,104r-257,0r0,-712r257,0v97,0,164,33,215,104v44,61,45,134,45,252xm461,-356v0,-112,-5,-155,-29,-188v-38,-52,-124,-44,-210,-44r0,464v86,-1,173,8,210,-44v23,-33,29,-76,29,-188","w":659,"k":{"V":10,"J":40,"T":20,"W":10,"Y":15,"A":10,"X":15}},"E":{"d":"552,0r-469,0r0,-712r469,0r0,124r-330,0r0,167r281,0r0,124r-281,0r0,173r330,0r0,124","w":605,"k":{"J":-5}},"F":{"d":"552,-588r-330,0r0,175r281,0r0,124r-281,0r0,289r-139,0r0,-712r469,0r0,124","w":590,"k":{"z":30,"x":30,"u":30,"s":30,"r":30,"o":30,"n":30,"m":30,"e":30,"d":30,"c":30,"a":30,"S":5,"Q":20,"O":20,"J":140,"G":20,"C":20,"A":60,";":80,":":80,".":90,",":90,"q":30,"p":30,"g":30}},"G":{"d":"321,-118v91,0,139,-65,131,-161r-131,0r0,-117r269,0v1,136,0,252,-68,321v-108,109,-294,103,-391,6v-71,-71,-72,-151,-72,-287v0,-136,1,-216,72,-287v49,-48,109,-75,190,-75v166,0,249,108,268,228r-140,0v-16,-68,-57,-104,-128,-104v-38,0,-68,15,-89,38v-26,30,-34,64,-34,200v0,136,8,171,34,201v21,23,51,37,89,37","w":649,"k":{"V":10,"C":10,"G":10,"J":30,"O":10,"Q":10,"T":20,"W":10,"Y":10,"A":10,"X":20}},"H":{"d":"602,0r-139,0r0,-298r-241,0r0,298r-139,0r0,-712r139,0r0,291r241,0r0,-291r139,0r0,712","w":685},"I":{"d":"222,0r-139,0r0,-712r139,0r0,712","w":305},"J":{"d":"437,-234v6,236,-294,312,-434,167r92,-91v23,23,45,40,91,40v68,0,112,-40,112,-122r0,-472r139,0r0,478","w":511,"k":{"A":10,"x":10}},"K":{"d":"659,0r-162,0r-183,-324r-92,110r0,214r-139,0r0,-712r139,0r0,310r251,-310r169,0r-236,283","w":665,"k":{"y":35,"q":15,"g":15,"C":20,"G":20,"J":-5,"O":20,"Q":20,"A":-10,"c":15,"d":15,"e":15,"o":15}},"L":{"d":"545,0r-462,0r0,-712r139,0r0,588r323,0r0,124","w":575,"k":{"y":60,"w":40,"v":60,"V":70,"*":70,"C":35,"G":35,"J":-5,"O":35,"Q":35,"T":80,"W":40,"Y":80,"U":35}},"M":{"d":"728,0r-139,0r0,-415r-136,270r-94,0r-137,-270r0,415r-139,0r0,-712r137,0r186,385r185,-385r137,0r0,712","w":811},"N":{"d":"628,0r-124,0r-282,-437r0,437r-139,0r0,-712r124,0r282,436r0,-436r139,0r0,712","w":711},"O":{"d":"585,-356v0,136,-5,213,-73,287v-88,96,-293,96,-381,0v-68,-74,-72,-151,-72,-287v0,-136,4,-213,72,-287v88,-96,293,-96,381,0v68,74,73,151,73,287xm446,-356v0,-136,-10,-169,-35,-200v-38,-48,-140,-49,-179,0v-25,31,-34,64,-34,200v0,136,9,168,34,199v39,49,140,50,179,0v24,-31,35,-63,35,-199","w":644,"k":{"V":10,"C":10,"G":10,"J":35,"O":10,"Q":10,"T":20,"W":10,"Y":10,"A":10,"X":20,"x":20,"Z":20,"s":5,"z":10}},"P":{"d":"594,-490v0,121,-87,222,-235,222r-137,0r0,268r-139,0r0,-712r276,0v148,0,235,101,235,222xm455,-490v0,-58,-40,-98,-103,-98r-130,0r0,195r130,0v63,0,103,-39,103,-97","w":628,"k":{"x":5,"s":5,"o":10,"e":10,"d":10,"c":10,"a":10,"X":10,"T":5,"J":120,"H":5,"A":50,";":40,":":40,".":110,",":110,"y":-10,"q":10,"g":10,"M":5,"B":5}},"Q":{"d":"585,-356v0,115,-1,189,-44,252r61,61r-73,73r-64,-62v-38,24,-86,38,-143,38v-82,0,-142,-27,-191,-75v-71,-71,-72,-151,-72,-287v0,-136,4,-213,72,-287v89,-96,293,-96,381,0v68,74,73,151,73,287xm446,-356v0,-136,-10,-169,-35,-200v-38,-48,-140,-49,-179,0v-25,31,-34,64,-34,200v0,136,8,169,34,199v28,33,91,54,136,26r-62,-61r73,-74r54,54v10,-31,13,-72,13,-144","w":643,"k":{"V":10,"C":10,"G":10,"J":35,"O":10,"Q":10,"T":20,"W":10,"Y":10,"A":10,"X":20,"x":20,"Z":20,"s":5,"z":10}},"R":{"d":"622,0r-161,0r-139,-284r-100,0r0,284r-139,0r0,-712r279,0v145,0,231,99,231,218v0,100,-61,162,-130,187xm454,-494v0,-55,-40,-94,-101,-94r-131,0r0,188r131,0v61,0,101,-39,101,-94","w":654,"k":{"q":30,"g":30,"V":5,"J":10,"O":10,"Q":10,"T":15,"Y":5,"c":30,"d":30,"e":30,"o":30,"s":30,"a":10}},"S":{"d":"543,-210v0,138,-114,216,-264,216v-108,0,-190,-23,-260,-94r90,-90v45,45,106,60,171,60v113,0,160,-80,105,-148v-22,-28,-101,-29,-149,-37v-118,-19,-189,-74,-189,-199v0,-127,94,-216,248,-216v98,0,169,24,230,83r-88,87v-44,-43,-99,-49,-146,-49v-97,0,-139,82,-89,141v26,31,99,33,150,40v126,18,191,78,191,206","w":591,"k":{"y":5,"J":10,"Y":10,"S":5}},"T":{"d":"541,-588r-186,0r0,588r-139,0r0,-588r-186,0r0,-124r511,0r0,124","w":571,"k":{"y":30,"w":30,"v":30,"q":65,"p":40,"g":80,"C":10,"G":20,"J":80,"O":20,"Q":20,"W":-10,"Y":-10,"A":70,"x":40,"c":80,"d":65,"e":80,"o":80,"s":65,"z":40,"a":80,"-":40,",":70,".":70,":":40,";":40,"j":20,"m":40,"n":40,"r":50,"u":50}},"U":{"d":"596,-244v0,151,-116,250,-262,250v-146,0,-262,-99,-262,-250r0,-468r139,0r0,463v0,82,48,131,123,131v75,0,124,-49,124,-131r0,-463r138,0r0,468","w":668,"k":{"J":20}},"V":{"d":"578,-712r-236,712r-104,0r-235,-712r144,0r143,464r143,-464r145,0","w":581,"k":{"z":20,"x":20,"u":20,"s":40,"r":20,"o":40,"n":20,"m":20,"e":40,"d":40,"c":40,"a":40,"Q":10,"O":10,"J":60,"G":10,"C":10,"A":40,";":70,":":70,".":80,",":80,"y":10,"q":40,"p":20,"g":40}},"W":{"d":"881,-712r-191,712r-116,0r-131,-432r-131,432r-116,0r-190,-712r145,0r110,449r130,-449r104,0r130,449r111,-449r145,0","w":887,"k":{"q":40,"g":40,"C":10,"G":10,"J":40,"O":10,"Q":10,"A":20,"c":40,"d":40,"e":40,"o":40,"s":40,"z":20,"a":30,",":50,".":50,":":40,";":40,"m":20,"n":20,"u":15}},"X":{"d":"598,0r-159,0r-138,-248r-137,248r-159,0r221,-365r-207,-347r158,0r124,230r125,-230r157,0r-207,347","w":603,"k":{"y":20,"q":10,"g":10,"C":15,"G":20,"J":-5,"O":20,"Q":20,"c":10,"d":10,"e":10,"o":10,"s":10,"-":5}},"Y":{"d":"569,-712r-214,420r0,292r-138,0r0,-292r-214,-420r151,0r133,287r131,-287r151,0","w":572,"k":{"q":65,"p":40,"g":65,"C":10,"G":10,"J":90,"O":10,"Q":10,"T":-10,"A":40,"x":40,"c":65,"d":65,"e":65,"o":65,"s":65,"z":40,"a":60,"-":40,",":80,".":80,":":70,";":70,"m":40,"n":40,"r":40,"u":40}},"Z":{"d":"508,0r-468,0r0,-112r304,-476r-291,0r0,-124r455,0r0,110r-305,478r305,0r0,124","w":548,"k":{"y":10,"w":10}},"[":{"d":"337,74r-257,0r0,-860r257,0r0,117r-127,0r0,626r127,0r0,117","w":378},"\\":{"d":"403,74r-122,0r-281,-847r122,0","w":403,"k":{"j":-60}},"]":{"d":"299,74r-257,0r0,-116r127,0r0,-628r-127,0r0,-116r257,0r0,860","w":378},"^":{"d":"539,-389r-136,0r-102,-188r-102,188r-136,0r178,-330r120,0","w":602},"_":{"d":"602,178r-602,0r0,-87r602,0r0,87","w":602},"`":{"d":"305,-604r-87,0r-114,-170r137,0","w":500},"a":{"d":"212,5v-110,0,-176,-61,-176,-163v0,-83,57,-151,180,-151r121,0v4,-73,-17,-109,-97,-108v-47,0,-72,13,-100,45r-82,-81v51,-56,100,-74,187,-74v147,0,222,62,222,184r0,343r-127,0r0,-45v-35,35,-68,50,-128,50xm240,-101v68,0,107,-36,97,-119v-74,1,-176,-14,-176,60v0,36,25,59,79,59","w":534,"k":{"y":5,"x":5}},"b":{"d":"509,-261v0,88,-4,169,-54,220v-61,62,-200,67,-256,-8r0,49r-126,0r0,-712r130,0r0,237v56,-73,194,-65,252,-5v50,51,54,132,54,219xm379,-261v0,-84,-10,-149,-88,-149v-78,0,-88,65,-88,149v0,84,10,150,88,150v78,0,88,-66,88,-150","w":560,"k":{"x":15}},"c":{"d":"177,-261v0,91,27,150,103,150v34,0,57,-12,84,-41r88,87v-46,48,-100,71,-172,71v-104,0,-233,-56,-233,-267v0,-211,129,-266,233,-266v72,0,126,22,172,70r-88,88v-27,-29,-50,-41,-84,-41v-75,0,-103,59,-103,149","w":480,"k":{"w":5,"q":15,"g":15,"x":10,"c":15,"d":15,"e":15,"o":15,"s":15,"a":5}},"d":{"d":"488,0r-127,0r0,-49v-58,76,-195,69,-256,8v-50,-51,-54,-132,-54,-220v0,-87,4,-168,54,-219v58,-61,197,-67,253,5r0,-237r130,0r0,712xm358,-261v0,-84,-11,-149,-89,-149v-78,0,-88,65,-88,149v0,84,10,150,88,150v78,0,89,-66,89,-150","w":561},"e":{"d":"501,-220r-326,0v0,68,40,116,114,116v57,0,85,-17,118,-49r79,77v-53,54,-104,82,-198,82v-123,0,-241,-56,-241,-267v0,-170,92,-266,227,-266v164,0,241,126,227,307xm373,-309v-2,-64,-34,-110,-99,-110v-65,0,-97,46,-99,110r198,0","w":548,"k":{"y":10,"w":5,"v":10,"x":20}},"f":{"d":"315,-407r-96,0r0,407r-130,0r0,-407r-54,0r0,-99r54,0v-8,-123,19,-206,152,-214r74,0r0,110v-49,-2,-96,-5,-96,47r0,57r96,0r0,99","w":342,"k":{"s":15,"o":15,"e":15,"d":15,"c":15,"a":15,";":50,":":50,".":50,",":50,"q":15,"g":15,"*":-30}},"g":{"d":"51,-275v0,-147,40,-251,178,-252v55,0,91,15,127,55r0,-49r126,0r0,502v0,125,-89,216,-229,216v-80,0,-135,-16,-189,-68r81,-82v29,28,58,40,102,40v100,0,110,-71,105,-161v-34,38,-73,52,-124,52v-137,-1,-177,-107,-177,-253xm352,-275v0,-69,-9,-135,-86,-135v-77,0,-85,66,-85,135v0,69,8,136,85,136v77,0,86,-67,86,-136","w":555},"h":{"d":"330,-527v113,0,176,91,176,194r0,333r-130,0r0,-315v0,-71,-45,-95,-86,-95v-41,0,-87,24,-87,95r0,315r-130,0r0,-712r130,0r0,239v33,-36,77,-54,127,-54","w":573,"k":{"y":5}},"i":{"d":"203,0r-130,0r0,-506r130,0r0,506xm204,-610r-133,0r0,-106r133,0r0,106","w":275},"j":{"d":"203,46v0,74,-45,149,-152,149r-74,0r0,-110v49,1,96,5,96,-47r0,-544r130,0r0,552xm204,-610r-133,0r0,-106r133,0r0,106","w":275},"k":{"d":"547,0r-161,0r-128,-217r-55,62r0,155r-130,0r0,-712r130,0r0,404r173,-213r157,0r-186,210","w":559,"k":{"q":40,"g":40,"c":40,"d":40,"e":40,"o":40,"s":30,"a":10,"-":40}},"l":{"d":"294,0r-74,0v-107,0,-152,-75,-152,-149r0,-563r130,0r0,555v-5,51,47,49,96,47r0,110","w":325,"k":{"y":30,"w":20,"v":40,"q":10,"g":10,"c":10,"d":10,"e":10,"o":10}},"m":{"d":"624,-527v115,0,185,90,185,194r0,333r-130,0r0,-315v0,-71,-45,-95,-86,-95v-40,0,-87,24,-87,92r0,318r-130,0r0,-315v0,-71,-45,-95,-86,-95v-41,0,-87,24,-87,95r0,315r-130,0r0,-521r127,0r0,48v71,-74,210,-73,268,12v44,-46,91,-66,156,-66","w":876},"n":{"d":"330,-527v113,0,176,91,176,194r0,333r-130,0r0,-315v0,-71,-45,-95,-86,-95v-41,0,-87,24,-87,95r0,315r-130,0r0,-521r127,0r0,48v34,-36,82,-54,130,-54","w":573},"o":{"d":"51,-261v0,-167,58,-266,220,-266v77,0,129,29,162,64v47,50,59,108,59,202v0,169,-58,267,-221,267v-77,0,-128,-30,-161,-64v-47,-50,-59,-109,-59,-203xm271,-111v77,0,91,-67,91,-150v0,-81,-14,-149,-91,-149v-76,1,-90,68,-90,149v0,82,14,150,90,150","k":{"y":10,"w":5,"v":10,"x":20}},"p":{"d":"509,-261v0,87,-4,169,-54,220v-59,61,-197,67,-252,-5r0,237r-130,0r0,-712r126,0r0,49v57,-75,194,-70,256,-8v50,51,54,132,54,219xm379,-261v0,-84,-10,-149,-88,-149v-78,0,-88,65,-88,149v0,84,10,150,88,150v78,0,88,-66,88,-150","w":560,"k":{"x":20}},"q":{"d":"488,191r-130,0r0,-237v-57,72,-194,66,-253,5v-50,-51,-54,-133,-54,-220v0,-87,4,-168,54,-219v61,-61,199,-67,256,8r0,-49r127,0r0,712xm358,-261v0,-84,-11,-149,-89,-149v-78,0,-88,65,-88,149v0,84,10,150,88,150v78,0,89,-65,89,-150","w":561},"r":{"d":"454,-478r-98,99v-50,-56,-153,-37,-153,65r0,314r-130,0r0,-521r127,0r0,50v50,-62,193,-82,254,-7","w":455,"k":{"q":30,"g":30,"c":30,"d":30,"e":30,"o":30,"s":10,"a":10,"-":10,",":80,".":80,":":40,";":40}},"s":{"d":"465,-164v0,115,-98,170,-221,170v-82,0,-155,-9,-222,-75r85,-85v42,43,99,49,139,49v45,0,92,-15,92,-54v0,-55,-87,-51,-139,-56v-92,-10,-150,-50,-150,-146v0,-189,289,-208,400,-105r-80,81v-30,-27,-75,-35,-121,-35v-89,0,-103,89,-20,95r82,8v103,10,155,64,155,153","w":501,"k":{"y":5,"v":10,"x":10,"s":5,"t":10}},"t":{"d":"307,0r-71,0v-106,0,-151,-75,-151,-149r0,-258r-55,0r0,-99r55,0r0,-154r130,0r0,154r92,0r0,99r-92,0r0,250v-4,49,44,49,92,47r0,110","w":352,"k":{"q":5,"g":5,"c":5,"d":5,"e":5,"o":5,"s":5,"a":5}},"u":{"d":"243,6v-113,0,-176,-91,-176,-194r0,-333r130,0r0,315v0,71,45,95,86,95v41,0,87,-24,87,-95r0,-315r130,0r0,521r-127,0r0,-48v-34,36,-82,54,-130,54","w":573},"v":{"d":"489,-521r-191,521r-102,0r-192,-521r137,0r106,322r105,-322r137,0","w":493,"k":{"s":10,"o":10,"e":10,"d":10,"c":10,"a":5,";":20,":":20,".":50,",":50,"q":10,"g":10}},"w":{"d":"755,-521r-159,521r-107,0r-109,-327r-109,327r-107,0r-160,-521r138,0r84,322r106,-322r95,0r107,322r84,-322r137,0","w":759,"k":{"q":10,"g":5,"c":5,"d":10,"e":5,"o":5,"s":5,"a":5,",":40,".":40,":":20,";":20}},"x":{"d":"515,0r-156,0r-96,-156r-95,156r-156,0r180,-266r-173,-255r156,0r88,149r89,-149r156,0r-173,255","w":527,"k":{"q":20,"g":20,"c":20,"d":20,"e":20,"o":20,"s":10,"a":15,"u":5}},"y":{"d":"490,-521r-223,605v-26,83,-94,117,-202,107r0,-117v53,1,78,1,95,-47r22,-64r-178,-484r137,0r108,322r104,-322r137,0","w":494,"k":{"q":10,"g":10,"x":-10,"c":10,"d":10,"e":10,"o":10,"s":5,"a":10,",":50,".":50,":":20,";":20}},"z":{"d":"434,0r-397,0r0,-99r231,-305r-218,0r0,-117r384,0r0,99r-234,305r234,0r0,117","w":478},"{":{"d":"288,-256v0,88,-38,228,73,213r53,0r0,117r-102,0v-102,3,-149,-59,-154,-148v-5,-91,32,-228,-69,-224r-46,0r0,-116v71,4,115,-6,115,-79r0,-145v1,-89,52,-148,154,-148r102,0r0,117r-53,0v-112,-14,-73,125,-73,213v0,72,-43,90,-69,100v26,10,69,28,69,100","w":457},"|":{"d":"240,74r-130,0r0,-860r130,0r0,860","w":350},"}":{"d":"299,-638v5,91,-32,228,69,224r46,0r0,116v-71,-4,-115,6,-115,79r0,145v-1,89,-52,148,-154,148r-102,0r0,-117r53,0v112,14,73,-125,73,-213v0,-72,43,-90,69,-100v-26,-10,-69,-28,-69,-100v0,-88,38,-228,-73,-213r-53,0r0,-117r102,0v102,-3,149,59,154,148","w":457},"~":{"d":"201,-379v101,0,194,124,285,16r83,82v-62,62,-104,86,-165,86v-101,0,-195,-124,-285,-16r-82,-82v62,-62,103,-86,164,-86","w":606},"\u00a0":{"w":232}}});
;
(function ($) {
  Drupal.behaviors.cufonReplace = {
    attach: function(context) {
      for (o in Drupal.settings.cufonSelectors) { 
        var s = Drupal.settings.cufonSelectors[o];
        $(s.selector + ':not(.cufon-replace-processed)', context)
          .each(function() {
            Cufon.replace($(this), s.options);
          })
          .addClass('cufon-replace-processed');
      }
    }
  }
})(jQuery);
;

/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);
;
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-06-19 20:25:28 -0500 (Tue, 19 Jun 2007) $
 * $Rev: 2111 $
 *
 * Version 2.1
 */
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery);;
﻿/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(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);;

// This uses Superfish 1.4.8
// (http://users.tpg.com.au/j_birch/plugins/superfish)

// Add Superfish to all Nice menus with some basic options.
(function ($) {
  $(document).ready(function() {
    $('ul.nice-menu').superfish({
      // Apply a generic hover class.
      hoverClass: 'over',
      // Disable generation of arrow mark-up.
      autoArrows: false,
      // Disable drop shadows.
      dropShadows: false,
      // Mouse delay.
      delay: Drupal.settings.nice_menus_options.delay,
      // Animation speed.
      speed: Drupal.settings.nice_menus_options.speed
    // Add in Brandon Aaron’s bgIframe plugin for IE select issues.
    // http://plugins.jquery.com/node/46/release
    }).find('ul').bgIframe({opacity:false});
    $('ul.nice-menu ul').css('display', 'none');
  });
})(jQuery);
;
/*
* qTip2 - Pretty pwoerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: 2.0.0pre
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Dec 13 21:52:07 2010 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
/*global window: false, jQuery: false */

// Munge the primitives - Paul Irish tip
var TRUE = true,
FALSE = false,
NULL = null;

(function($, window, undefined) {

// Option object sanitizer
function sanitizeOptions(opts)
{
var content;

if(!opts) { return FALSE; }

if('object' !== typeof opts.metadata) {
opts.metadata = {
type: opts.metadata
};
}

if('content' in opts) {
if('object' !== typeof opts.content || opts.content.jquery) {
opts.content = {
text: opts.content
};
}

content = opts.content.text || FALSE;
if(!$.isFunction(content) && ((!content && !content.attr) || content.length < 1 || ('object' === typeof content && !content.jquery))) {
content = opts.content.text = FALSE;
}

if('title' in opts.content && 'object' !== typeof opts.content.title) {
opts.content.title = {
text: opts.content.title
};
}
}

if('position' in opts) {
if('object' !== typeof opts.position) {
opts.position = {
my: opts.position,
at: opts.position
};
}

if('object' !== typeof opts.position.adjust) {
opts.position.adjust = {};
}

if('undefined' !== typeof opts.position.adjust.screen) {
opts.position.adjust.screen = !!opts.position.adjust.screen;
}
}

if('show' in opts) {
if('object' !== typeof opts.show) {
opts.show = {
event: opts.show
};
}

if('object' !== typeof opts.show) {
if(opts.show.jquery) {
opts.show = { target: opts.show };
}
else {
opts.show = { event: opts.show };
}
}
}

if('hide' in opts) {
if('object' !== typeof opts.hide) {
if(opts.hide.jquery) {
opts.hide = { target: opts.hide };
}
else {
opts.hide = { event: opts.hide };
}
}
}

if('style' in opts && 'object' !== typeof opts.style) {
opts.style = {
classes: opts.style
};
}

// Sanitize plugin options
$.each($.fn.qtip.plugins, function() {
if(this.sanitize) { this.sanitize(opts); }
});

return opts;
}

/*
* Core plugin implementation
*/
function QTip(target, options, id)
{
// Declare this reference
var self = this,

// Shortcut vars
uitooltip = 'ui-tooltip',
selector = '.qtip.'+uitooltip;

// Setup class attributes
self.id = id;
self.rendered = FALSE;
self.elements = { target: target };
self.cache = { event: {}, target: NULL, disabled: FALSE, position: NULL };
self.timers = { img: [] };
self.options = options;
self.plugins = {};

/*
* Private core functions
*/
function convertNotation(notation)
{
var i, obj,

// Split notation into array
actual = notation.split('.'),

// Locate required option
option = options[ actual[0] ];

// Loop through
for(i = 1; i < actual.length; i+=1) {
obj = option[ actual[i] ];
if(typeof obj === 'object' && !obj.jquery && !obj.precedance) {
option = option[ actual[i] ];
}
else { break; }
}

return actual[i] !== undefined ? [option, actual[i] ] : [options, actual[0]];
}

function offset(elem, container) {
var pos = { left: 0, top: 0 },
addScroll = !$.fn.qtip.plugins.iOS,
offsetParent, parentIsContainer;

if(container) {
pos = offset(container);
pos.left *= -1; pos.top *= -1;
}

if(elem.offsetParent) {
do {
offsetParent = elem.offsetParent;
parentIsContainer = offsetParent === container;

pos.left += elem.offsetLeft - (addScroll && offsetParent && !parentIsContainer ? offsetParent.scrollLeft : 0);
pos.top += elem.offsetTop - (addScroll && offsetParent && !parentIsContainer ? offsetParent.scrollTop : 0);
}
while(elem = offsetParent);
}

return pos;
}

function calculate(detail, fluid)
{
var tooltip = self.elements.tooltip,
accessible = uitooltip + '-accessible ' + (fluid ? uitooltip + '-accessible-fluid' : ''),
show = !tooltip.is(':visible'),
returned = FALSE;

// Make sure tooltip is rendered and if not, return
if(!self.rendered) { return FALSE; }

// Show and hide tooltip to make sure properties are returned correctly
if(show) { tooltip.addClass(accessible); }
switch(detail)
{
case 'dimensions':
// Find initial dimensions
returned = {
height: tooltip.outerHeight(),
width: tooltip.outerWidth()
};
break;

case 'position':
returned = offset(tooltip[0], options.position.container);
break;
}
if(show) { tooltip.removeClass(accessible); }

return returned;
}

function removeTitle()
{
var elems = self.elements;

if(elems.title) {
elems.titlebar.remove();
elems.titlebar = elems.title = elems.button = NULL;
elems.tooltip.removeAttr('aria-labelledby');
}
}

function createButton()
{
var elems = self.elements,
button = options.content.title.button;

if(elems.button) { elems.button.remove(); }

// Use custom button if one was supplied by user, else use default
if(button.jquery) {
elems.button = button;
}
else if('string' === typeof button) {
elems.button = $('<a />', { 'html': button });
}
else {
elems.button = $('<a />', {
'class': 'ui-state-default',
'text': 'Close tooltip',
'title': 'Close tooltip',
'css': { 'text-indent': '-10000em' }
})
.prepend(
$('<span />', { 'class': (options.style.widget ? 'ui' : uitooltip) + '-icon ui-icon-close' })
);
}

// Create button and setup attributes
elems.button
.prependTo(elems.titlebar)
.attr('role', 'button')
.addClass(uitooltip + '-close')
.hover(function(event){ $(this).toggleClass('ui-state-hover', event.type === 'mouseenter'); })
.click(function() {
if(!elems.tooltip.hasClass('ui-state-disabled')) { self.hide(); }
return FALSE;
})
.bind('mousedown keydown mouseup keyup mouseout', function(event) {
$(this).toggleClass('ui-state-active ui-state-focus', (/down$/i).test(event.type));
});

// Redraw the tooltip when we're done
self.redraw();
}

function createTitle()
{
var elems = self.elements;

// Destroy previous title element, if present
if(elems.titlebar) { removeTitle(); }

// Create title bar and title elements
elems.titlebar = $('<div />', {
'class': uitooltip + '-titlebar ' + (options.style.widget ? 'ui-widget-header' : '')
})
.append(
elems.title = $('<div />', {
'id': uitooltip + '-'+id+'-title',
'class': uitooltip + '-title',
'html': options.content.title.text
})
)
.prependTo(elems.wrapper);

// Create button if enabled
if(options.content.title.button) { createButton(); }

// Redraw the tooltip dimensions if it's rendered
else if(self.rendered === TRUE){ self.redraw(); }
}

function updateButton(button)
{
var elem = self.elements.button,
title = self.elements.title;

// Make sure tooltip is rendered and if not, return
if(!self.rendered) { return FALSE; }

if(!button) {
elem.remove();
}
else {
if(!title) {
createTitle();
}
createButton();
}
}

function updateTitle(content)
{
// Make sure tooltip is rendered and if not, return
if(!self.rendered) { return FALSE; }

// If title isn't already created, create it now
if(!self.elements.title && content) {
createTitle();
self.reposition();
}
else if(!content) {
removeTitle();
}
else {
// Set the new content
self.elements.title.html(content);
}
}

function updateContent(content)
{
var elements = self.elements;

// Make sure tooltip is rendered and content is defined. If not return
if(!self.rendered || !content) { return FALSE; }

// Use function to parse content
if($.isFunction(content)) {
content = content.call(target);
}

// Append new content if its a DOM array and show it if hidden
if(content.jquery && content.length > 0) {
elements.content.empty().append(content.css({ display: 'block' }));
}

// Content is a regular string, insert the new content
else {
elements.content.html(content);
}

// Insert into 'fx' queue our image dimension checker which will halt the showing of the tooltip until image dimensions can be detected
elements.tooltip.queue('fx', function(next) {
// Find all content images without dimensions
var images = $('img:not([height]):not([width])', self.elements.content);

// Update tooltip width and position when all images are loaded
function imageLoad(img) {
// Remove the image from the array
images = images.not(img);

// If queue is empty, update tooltip and continue the queue
if(images.length === 0) {
self.redraw();
if(self.rendered === TRUE) {
self.reposition(self.cache.event);
}

next();
}
}

// Apply the callback to img events and height checker method to ensure queue continues no matter what!
images.each(function(i, elem) {
// Apply the imageLoad to regular events to make sure the queue continues
var events = ['abort','error','load','unload',''].join('.qtip-image ');
$(this).bind(events, function() {
clearTimeout(self.timers.img[i]);
imageLoad(this);
});

// Apply a recursive method that polls the image for dimensions every 20ms
(function timer(){
// When the dimensions are found, remove the image from the queue
if(elem.height) {
return imageLoad(elem);
}

self.timers.img[i] = setTimeout(timer, 20);
}());

return TRUE;
});

// If no images were found, continue with queue
if(images.length === 0) { imageLoad(images); }
});

return self;
}

function assignEvents(show, hide, tooltip, doc)
{
var namespace = '.qtip-'+id,
posOptions = options.position,
targets = {
show: options.show.target,
hide: options.hide.target,
tooltip: self.elements.tooltip,
container: posOptions.container[0] === document.body ? document : posOptions.container
},
events = { show: String(options.show.event).split(' '), hide: String(options.hide.event).split(' ') },
IE6 = $.browser.msie && parseInt($.browser.version, 10) === 6;

// Define show event method
function showMethod(event)
{
if(targets.tooltip.hasClass('ui-state-disabled')) { return FALSE; }

// If set, hide tooltip when inactive for delay period
targets.show.trigger('qtip-'+id+'-inactive');

// Clear hide timers
clearTimeout(self.timers.show);
clearTimeout(self.timers.hide);

// Start show timer
var callback = function(){ self.show(event); };
if(options.show.delay > 0) {
self.timers.show = setTimeout(callback, options.show.delay);
}
else{ callback(); }
}

// Define hide method
function hideMethod(event)
{
if(targets.tooltip.hasClass('ui-state-disabled')) { return FALSE; }

// Check if new target was actually the tooltip element
var ontoTooltip = $(event.relatedTarget || event.target).parents(selector)[0] === targets.tooltip[0],
ontoTarget = $(event.relatedTarget || event.target)[0] === targets.show[0];

// Clear timers and stop animation queue
clearTimeout(self.timers.show);
clearTimeout(self.timers.hide);

// Prevent hiding if tooltip is fixed and event target is the tooltip. Or if mouse positioning is enabled and cursor momentarily overlaps
if(options.hide.fixed && ((posOptions.target === 'mouse' && ontoTooltip) || ((/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))))
{
// Prevent default and popagation
event.stopPropagation();
event.preventDefault();
return FALSE;
}

// If tooltip has displayed, start hide timer
targets.tooltip.stop(1, 1);

if(options.hide.delay > 0) {
self.timers.hide = setTimeout(function(){ self.hide(event); }, options.hide.delay);
}
else{ self.hide(event); }
}

// Define inactive method
function inactiveMethod(event)
{
if(targets.tooltip.hasClass('ui-state-disabled')) { return FALSE; }

// Clear timer
clearTimeout(self.timers.inactive);
self.timers.inactive = setTimeout(function(){ self.hide(event); }, options.hide.inactive);
}

function repositionMethod(event) {
if(self.cache.processing) { return; }

// Only update position if tooltip is visible
self.cache.processing = 1;
if(self.elements.tooltip.is(':visible')) { self.reposition(event); }
self.cache.processing = 0;
}

// Catch remove events on target element to destroy tooltip
target.bind('remove.qtip', function(){ self.destroy(); });

// Check if the tooltip is 'fixed'
if(tooltip && options.hide.fixed)
{
// Add tooltip as a hide target
targets.hide = targets.hide.add(targets.tooltip);

// Clear hide timer on tooltip hover to prevent it from closing
targets.tooltip.bind('mouseover'+namespace, function() {
if(!targets.tooltip.hasClass('ui-state-disabled')) {
clearTimeout(self.timers.hide);
}
});
}

// Assign hide events
if(hide) {
// Check if the tooltip hides when inactive
if('number' === typeof options.hide.inactive)
{
// Bind inactive method to target as a custom event
targets.show.bind('qtip-'+id+'-inactive', inactiveMethod);

// Define events which reset the 'inactive' event handler
$.each($.fn.qtip.inactiveEvents, function(index, type){
targets.hide.add(self.elements.tooltip).bind(type+namespace+'-inactive', inactiveMethod);
});
}

// Apply hide events
$.each(events.hide, function(index, type) {
var showIndex = $.inArray(type, events.show);

// Both events and targets are identical, apply events using a toggle
if((showIndex > -1 && $(targets.hide).add(targets.show).length === $(targets.hide).length) || type === 'unfocus')
{
targets.show.bind(type+namespace, function(event)
{
if(targets.tooltip.is(':visible')) { hideMethod(event); }
else{ showMethod(event); }
});

// Don't bind the event again
delete events.show[ showIndex ];
}

// Events are not identical, bind normally
else{ targets.hide.bind(type+namespace, hideMethod); }
});
}

// Apply show events
if(show) {
$.each(events.show, function(index, type) {
targets.show.bind(type+namespace, showMethod);
});

// Focus the tooltip on mouseover
targets.tooltip.bind('mouseover'+namespace, function(){ self.focus(); });
}

// Apply document events
if(doc) {
// Adjust positions of the tooltip on window resize if enabled
if(posOptions.adjust.resize || posOptions.adjust.screen) {
$($.event.special.resize ? targets.container : window).bind('resize'+namespace, repositionMethod);
}

// Adjust tooltip position on scroll if screen adjustment is enabled
if(posOptions.adjust.screen || (IE6 && targets.tooltip.css('position') === 'fixed')) {
$(targets.container).bind('scroll'+namespace, repositionMethod);
}

// Hide tooltip on document mousedown if unfocus events are enabled
if((/unfocus/i).test(options.hide.event)) {
$(document).bind('mousedown'+namespace, function(event) {
var tooltip = self.elements.tooltip;

if($(event.target).parents(selector).length === 0 && $(event.target).add(target).length > 1 &&
tooltip.is(':visible') && !tooltip.hasClass('ui-state-disabled')) {
self.hide();
}
});
}

// If mouse is the target, update tooltip position on document mousemove
if(posOptions.target === 'mouse') {
$(document).bind('mousemove'+namespace, function(event) {
// Update the tooltip position only if the tooltip is visible and adjustment is enabled
if(posOptions.adjust.mouse && !targets.tooltip.hasClass('ui-state-disabled') && targets.tooltip.is(':visible')) {
self.reposition(event || $.fn.qtip.mouse);
}
});
}
}
}

function unassignEvents(show, hide, tooltip, doc)
{
doc = parseInt(doc, 10) !== 0;
var namespace = '.qtip-'+id,
targets = {
show: show ? options.show.target : NULL,
hide: hide ? options.hide.target : NULL,
tooltip: tooltip ? self.elements.tooltip : NULL,
content: tooltip ? self.elements.content : NULL,
container: doc ? options.position.container[0] === document.body ? document : options.position.container : NULL,
window: doc ? window : NULL
};

// Check if tooltip is rendered
if(self.rendered)
{
$([]).pushStack(
$.grep(
[ targets.show, targets.hide, targets.tooltip, targets.container, targets.content, targets.window ],
function(){ return this !== null; }
)
)
.unbind(namespace);
}

// Tooltip isn't yet rendered, remove render event
else if(show) { targets.show.unbind(namespace+'-create'); }
}

/*
* Public API methods
*/
$.extend(self, {
render: function(show)
{
var elements = self.elements, callback = $.Event('tooltiprender');

// If tooltip has already been rendered, exit
if(self.rendered) { return FALSE; }

// Call API method and set rendered status
self.rendered = show ? -2 : -1; // -1: rendering -2: rendering and show when done

// Create initial tooltip elements
elements.tooltip = $('<div/>')
.attr({
'id': uitooltip + '-'+id,
'role': 'tooltip',
'class': uitooltip + ' qtip ui-tooltip-accessible ui-helper-reset ' + options.style.classes
})
.css('z-index', $.fn.qtip.zindex + $(selector).length)
.toggleClass('ui-widget', options.style.widget)
.toggleClass('ui-state-disabled', self.cache.disabled)
.data('qtip', self)
.appendTo(options.position.container);

// Append to container element
elements.wrapper = $('<div />', { 'class': uitooltip + '-wrapper' }).appendTo(elements.tooltip);
elements.content = $('<div />', {
'class': uitooltip + '-content ' + (options.style.widget ? 'ui-widget-content' : ''),
'id': uitooltip + '-' + id + '-content'
})
.appendTo(elements.wrapper);

// Setup content and title (if enabled)
if(options.content.title.text) {
createTitle();
}
updateContent(options.content.text);

// Initialize 'render' plugins
$.each($.fn.qtip.plugins, function() {
if(this.initialize === 'render') { this(self); }
});

// Set rendered status to TRUE
self.rendered = TRUE;

// Assign events
assignEvents(1, 1, 1, 1);
$.each(options.events, function(name, callback) {
if(callback) { elements.tooltip.bind('tooltip'+name, callback); }
});

/* Queue this part of the render process in our fx queue so we can
* load images before the tooltip renders fully.
*
* See: updateContent method
*/
elements.tooltip.queue('fx', function(next) {
// Remove accessible class
elements.tooltip.removeClass('ui-tooltip-accessible');

// Trigger tooltiprender event and pass original triggering event as original
callback.originalEvent = self.cache.event;
elements.tooltip.trigger(callback, [self]);

// Update tooltip position and show tooltip if needed
if(options.show.ready || show) {
elements.tooltip.hide();
self.show(self.cache.event);
}

next(); // Move on
});

return self;
},

get: function(notation)
{
var result, o;

switch(notation.toLowerCase())
{
case 'offset':
result = calculate('position');
break;

case 'dimensions':
result = calculate('dimensions');
break;

default:
o = convertNotation(notation.toLowerCase());
result = (o[0].precedance) ? o[0].string() : (o[0].jquery) ? o[0] : o[0][ o[1] ];
break;
}

return result;
},

set: function(notation, value)
{
notation = notation.toLowerCase();
var option = convertNotation(notation),
elems = self.elements,
tooltip = elems.tooltip,
previous,
category, rule,
checks = {
builtin: {
// Core checks
'id': function(obj, opt, val, prev) {
var id = value === TRUE ? $.fn.qtip.nextid : value,
idStr = uitooltip + '-' + id;

if(id !== FALSE && id.length > 0 && !$('#ui-tooltip-'+id).length) {
tooltip[0].id = idStr;
elems.content[0].id = idStr + '-content';
elems.title[0].id = idStr + '-title';
}
},

// Content checks
'^content.text': function(){ updateContent(value); },
'^content.title.text': function(){ updateTitle(value); },
'^content.title.button': function(){ updateButton(value); },

// Position checks
'^position.(my|at)$': function(){
// Parse new corner value into Corner objecct
var corner = (/my$/i).test(notation) ? 'my' : 'at';

if('string' === typeof value) {
options.position[corner] = new $.fn.qtip.plugins.Corner(value);
}
},
'^position.(my|at|adjust|target)': function(){ if(self.rendered) { self.reposition(); } },
'^position.container$': function(){
if(self.rendered === TRUE) {
tooltip.appendTo(value);
self.reposition();
}
},

// Show & hide checks
'^(show|hide).(event|target|fixed|delay|inactive)': function(obj, opt, val, prev) {
var args = notation.search(/fixed/i) > -1 ? [0, [0,1,1,1]] : [notation.substr(0,3), notation.charAt(0) === 's' ? [1,0,0,0] : [0,1,0,0]];

if(args[0]) { obj[opt] = prev; }
unassignEvents.apply(self, args[1]);

if(args[0]) { obj[opt] = val; }
assignEvents.apply(self, args[1]);
},
'^show.ready$': function() { if(self.rendered === FALSE) { self.show(); } },

// Style checks
'^style.classes$': function() { self.elements.tooltip.attr('class', uitooltip + ' qtip ui-helper-reset ' + value); },
'^style.widget$': function() {
var trigger = !!value;

tooltip.toggleClass('ui-widget', trigger);
elems.titlebar.toggleClass('ui-widget-header', trigger);
elems.content.toggleClass('ui-widget-content', trigger);
elems.button.children('span').toggleClass(uitooltip+'-icon', !trigger).toggleClass('ui-icon', trigger);
},

// Events check
'^events.(render|show|move|hide|focus|blur)': function(obj, opt, val, prev) {
elems.tooltip[($.isFunction(value) ? '' : 'un') + 'bind']('tooltip'+opt, val);
}
}
};

// Merge active plugin checks
$.each(self.plugins, function(name) {
if('object' === typeof this.checks) {
checks[name] = this.checks;
}
});

// Set new option value
previous = option[0][ option[1] ];
option[0][ option[1] ] = value.nodeType ? $(value) : value;

// Re-sanitize options
sanitizeOptions(options);

// Execute any valid callbacks
for(category in checks) {
for(rule in checks[category]) {
if((new RegExp(rule, 'i')).test(notation)) {
checks[category][rule].call(self, option[0], option[1], value, previous);
}
}
}

return self;
},

toggle: function(state, event)
{
if(self.rendered === FALSE) { return FALSE; }

var type = state ? 'show' : 'hide',
tooltip = self.elements.tooltip,
opts = options[type],
visible = tooltip.is(':visible'),
callback;

// Detect state if valid one isn't provided
if((typeof state).search('boolean|number')) { state = !tooltip.is(':visible'); }

// Return if element is already in correct state
if((!visible && !state) || tooltip.is(':animated')) { return self; }

// Try to prevent flickering when tooltip overlaps show element
if(event) {
if((/over|enter/).test(event.type) && (/out|leave/).test(self.cache.event.type) &&
event.target === options.show.target[0] && tooltip.has(event.relatedTarget).length){
return self;
}

// Cache event
self.cache.event = $.extend({}, event);
}

// Define after callback
function after()
{
var elem = $(this),
attr = state ? 'attr' : 'removeAttr',
opacity = (/^1|0$/).test(elem.css('opacity')),
ieStyle = this.style;

// Apply ARIA attributes when tooltip is shown
if(self.elements.title){ target[attr]('aria-labelledby', uitooltip + '-'+id+'-title'); }
target[attr]('aria-describedby', uitooltip + '-'+id+'-content');

// Prevent antialias from disappearing in IE7 by removing filter and opacity attribute
if(state) {
if($.browser.msie && ieStyle && opacity) {
ieStyle.removeAttribute('filter');
ieStyle.removeAttribute('opacity');
}
}

// Otherwise just hide
else if(opacity) { elem.hide(); }
}

// Call API methods
callback = $.Event('tooltip'+type);
callback.originalEvent = event ? self.cache.event : NULL;
tooltip.trigger(callback, [self, 90]);
if(callback.isDefaultPrevented()){ return self; }

// Execute state specific properties
if(state) {
self.focus(); // Focus the tooltip before show to prevent visual stacking
self.reposition(event); // Update tooltip position

// Hide other tooltips if tooltip is solo
if(opts.solo) { $(selector).qtip('hide'); }
}

// Clear show timer if we're hiding
else { clearTimeout(self.timers.show); }

// Set ARIA hidden status attribute
tooltip.attr('aria-hidden', Boolean(!state));

// Clear animation queue
tooltip.stop(1, 1);

// Use custom function if provided
if($.isFunction(opts.effect)) {
opts.effect.call(tooltip, self);
tooltip.queue(function(){ after.call(this); $(this).dequeue(); });
}

// If no effect type is supplied, use a simple toggle
else if(opts.effect === FALSE) {
tooltip[ type ]();
after.call(tooltip);
}

// Use basic fade function by default
else { tooltip.fadeTo(90, state ? 1 : 0, after); }

// If inactive hide method is set, active it
if(state) { opts.target.trigger('qtip-'+id+'-inactive'); }

return self;
},

show: function(event){ self.toggle(TRUE, event); },

hide: function(event){ self.toggle(FALSE, event); },

focus: function(event)
{
if(self.rendered === FALSE) { return FALSE; }

var tooltip = self.elements.tooltip,
qtips = $(selector),
curIndex = parseInt(tooltip[0].style.zIndex, 10),
newIndex = $.fn.qtip.zindex + qtips.length,
focusClass = uitooltip + '-focus',
cachedEvent = $.extend({}, event),
callback;

// Only update the z-index if it has changed and tooltip is not already focused
if(!tooltip.hasClass(focusClass) && curIndex !== newIndex)
{
// Reduce our z-index's and keep them properly ordered
qtips.each(function() {
this.style.zIndex = this.style.zIndex - 1;
});

// Fire blur event for focussed tooltip
$(selector + '.' + focusClass).each(function() {
var self = $(this), api = self.qtip(), blur;

if(!api || api.rendered === FALSE) { return TRUE; }

// Set focused status to FALSE
self.removeClass(focusClass);

// Trigger blur event
blur = $.Event('tooltipblur');
blur.originalEvent = cachedEvent;
self.trigger(blur, [api, newIndex]);
});

// Call API method
callback = $.Event('tooltipfocus');
callback.originalEvent = cachedEvent;
tooltip.trigger(callback, [self, newIndex]);

// Set the new z-index and set focus status to TRUE if callback wasn't FALSE
if(!callback.isDefaultPrevented()) {
tooltip.addClass(focusClass)[0].style.zIndex = newIndex;
}
}

return self;
},

reposition: function(event)
{
if(self.rendered === FALSE) { return FALSE; }

var target = options.position.target,
tooltip = self.elements.tooltip,
posOptions = options.position,
my = posOptions.my,
at = posOptions.at,
adjust = posOptions.adjust,
elemWidth = self.elements.tooltip.width(),
elemHeight = self.elements.tooltip.height(),
targetWidth = 0,
targetHeight = 0,
callback = $.Event('tooltipmove'),
fixed = tooltip.css('position') === 'fixed',
viewport = posOptions.container[0] !== document.body ? posOptions.container : $(window),
position = { left: 0, top: 0 },
readjust = {
left: function(posLeft) {
var viewportScroll = viewport.scrollLeft,
myWidth = my.x === 'left' ? elemWidth : my.x === 'right' ? -elemWidth : -elemWidth / 2,
atWidth = at.x === 'left' ? targetWidth : at.x === 'right' ? -targetWidth : -targetWidth / 2,
adjustX = (my.x === my.y ? 1 : -2) * adjust.x,
overflowLeft = viewportScroll - posLeft,
overflowRight = posLeft + elemWidth - viewport.width - viewportScroll,
offset = myWidth - adjustX - (my.precedance === 'x' || my.x === my.y ? atWidth : 0);

if(overflowLeft > 0 && (my.x !== 'left' || overflowRight > 0)) {
position.left -= offset;
}
else if(overflowRight > 0 && (my.x !== 'right' || overflowLeft > 0) ) {
position.left -= (my.x === 'center' ? -1 : 1) * offset;
}

if(position.left < 0) { position.left = posLeft; }

return position.left - posLeft;
},
top: function(posTop) {
var viewportScroll = viewport.scrollTop,
myHeight = my.y === 'top' ? elemHeight : my.y === 'bottom' ? -elemHeight : -elemHeight / 2,
atHeight = at.y === 'top' ? targetHeight : at.y === 'bottom' ? -targetHeight : -targetHeight / 2,
adjustY = (my.y === my.x ? 1 : -2) * adjust.y,
overflowTop = viewportScroll - posTop,
overflowBottom = posTop + elemHeight - viewport.height - viewportScroll + adjust.y,
offset = myHeight - adjustY - (my.precedance === 'y' || my.x === my.y ? atHeight : 0);

if(overflowTop > 0 && (my.y !== 'top' || overflowBottom > 0)) {
position.top -= offset;
}
else if(overflowBottom > 0 && (my.y !== 'bottom' || overflowTop > 0) ) {
position.top -= (my.y === 'center' ? -1 : 1) * offset;
}

if(position.top < 0) { position.top = posTop; }

return position.top - posTop;
}
};

// Cache our viewport details
viewport = {
elem: viewport,
height: viewport[ (viewport[0] === window ? 'h' : 'outerH') + 'eight' ](),
width: viewport[ (viewport[0] === window ? 'w' : 'outerW') + 'idth' ](),
scrollLeft: viewport.scrollLeft(),
scrollTop: viewport.scrollTop()
};

// Check if mouse was the target
if(target === 'mouse') {
// Force left top to allow flipping
at = { x: 'left', y: 'top' };

// Use cached event if one isn't available for positioning
event = event && (event.type === 'resize' || event.type === 'scroll') ? self.cache.event :
adjust.mouse || !event || !event.pageX ? $.extend({}, $.fn.qtip.mouse) : event;

// Use event coordinates for position
position = { top: event.pageY, left: event.pageX };
}
else {
// Check if event targetting is being used
if(target === 'event') {
if(event && event.target && event.type !== 'scroll' && event.type !== 'resize') {
target = self.cache.target = $(event.target);
}
else {
target = self.cache.target;
}
}

// Parse the target into a jQuery object and make sure there's an element present
target = $(target).eq(0);
if(target.length === 0) { return self; }

// Check if window or document is the target
else if(target[0] === document || target[0] === window) {
targetWidth = target.width();
targetHeight = target.height();

if(target[0] === window) {
position = {
top: fixed ? 0 : viewport.scrollTop,
left: fixed ? 0 : viewport.scrollLeft
};
}
}

// Use Imagemap plugin if target is an AREA element
else if(target.is('area') && $.fn.qtip.plugins.imagemap) {
position = $.fn.qtip.plugins.imagemap(target, at);
targetWidth = position.width;
targetHeight = position.height;
position = position.offset;
}

else {
targetWidth = target.outerWidth();
targetHeight = target.outerHeight();

position = offset(target[0], posOptions.container[0]);
}

// Adjust position relative to target
position.left += at.x === 'right' ? targetWidth : at.x === 'center' ? targetWidth / 2 : 0;
position.top += at.y === 'bottom' ? targetHeight : at.y === 'center' ? targetHeight / 2 : 0;
}

// Adjust position relative to tooltip
position.left += adjust.x + (my.x === 'right' ? -elemWidth : my.x === 'center' ? -elemWidth / 2 : 0);
position.top += adjust.y + (my.y === 'bottom' ? -elemHeight : my.y === 'center' ? -elemHeight / 2 : 0);

// Calculate collision offset values
if(adjust.screen && target[0] !== window && target[0] !== document.body) {
position.adjusted = { left: readjust.left(position.left), top: readjust.top(position.top) };
}
else {
position.adjusted = { left: 0, top: 0 };
}

// Set tooltip position class
tooltip.attr('class', function(i, val) {
return $(this).attr('class').replace(/ui-tooltip-pos-\w+/i, '');
})
.addClass(uitooltip + '-pos-' + my.abbreviation());


// Call API method
callback.originalEvent = $.extend({}, event);
tooltip.trigger(callback, [self, position, viewport.elem]);
if(callback.isDefaultPrevented()){ return self; }
delete position.adjusted;

// Use custom function if provided
if(tooltip.is(':visible') && $.isFunction(posOptions.effect)) {
posOptions.effect.call(tooltip, self, position);
tooltip.queue(function() {
var elem = $(this);
// Reset attributes to avoid cross-browser rendering bugs
elem.css({ opacity: '', height: '' });
if($.browser.msie && this.style) { this.style.removeAttribute('filter'); }
elem.dequeue();
});
}
else if(!isNaN(position.left, position.top)) {
tooltip.css(position);
}

return self;
},

// IE max/min height/width simulartor function
redraw: function()
{
// Make sure tooltip is rendered and the browser needs the redraw
if(!self.rendered || !($.browser.msie && parseInt($.browser.version.charAt(0), 10) < 9)) { return FALSE; }

var tooltip = self.elements.tooltip,
style = tooltip.attr('style'),
dimensions;

// Determine actual dimensions using our calculate function
tooltip.css({ width: 'auto', height: 'auto' });
dimensions = calculate('dimensions', 1);

// Determine actual width
$.each(['width', 'height'], function(i, prop) {
// Parse our max/min properties
var max = parseInt(tooltip.css('max-'+prop), 10) || 0,
min = parseInt(tooltip.css('min-'+prop), 10) || 0;

// Determine new dimension size based on max/min/current values
dimensions[prop] = max + min ? Math.min( Math.max( dimensions[prop], min ), max ) : dimensions[prop];
});

// Set the newly calculated dimensions
tooltip.css(dimensions);
},

disable: function(state)
{
var tooltip = self.elements.tooltip;

if(self.rendered) {
tooltip.toggleClass('ui-state-disabled', state);
}
else {
self.cache.disabled = !!state;
}

return self;
},

destroy: function()
{
var elements = self.elements,
oldtitle = elements.target.data('oldtitle');

// Destroy any associated plugins when rendered
if(self.rendered) {
$.each(self.plugins, function() {
if(this.initialize === 'render') { this.destroy(); }
});
}

// Remove bound events
unassignEvents(1, 1, 1, 1);

// Remove api object and tooltip
target.removeData('qtip');
if(self.rendered) { elements.tooltip.remove(); }

// Reset old title attribute if removed and reset describedby attribute
if(oldtitle) {
target.attr('title', oldtitle);
}
target.removeAttr('aria-describedby');

return target;
}
});
}

// Initialization method
function init(id, opts)
{
var obj, posOptions,

// Setup element references
elem = $(this),
docBody = $(document.body),

// Use document body instead of document element if needed
newTarget = this === document ? docBody : elem,

// Grab metadata from element if plugin is present
metadata = (elem.metadata) ? elem.metadata(opts.metadata) : NULL,

// Check if the metadata returned is in HTML5 form and grab 'name' from the object instead
metadata5 = metadata && opts.metadata.type === 'html5' ? metadata[opts.metadata.name] : NULL,

// Merge in our sanitized metadata and remove metadata object so we don't interfere with other metadata calls
config = $.extend(TRUE, {}, $.fn.qtip.defaults, opts, sanitizeOptions(metadata5 || metadata));
elem.removeData('metadata');

// Re-grab our positioning options now we've merged our metadata
posOptions = config.position;

// Setup missing content if none is detected
if('boolean' === typeof config.content.text) {

// Grab from supplied attribute if available
if(config.content.attr !== FALSE && elem.attr(config.content.attr)) {
config.content.text = elem.attr(config.content.attr);
}

// No valid content was found, abort render
else {
return FALSE;
}
}

// Setup target options
if(posOptions.container === FALSE) { posOptions.container = docBody; }
if(posOptions.target === FALSE) { posOptions.target = newTarget; }
if(config.show.target === FALSE) { config.show.target = newTarget; }
if(config.hide.target === FALSE) { config.hide.target = newTarget; }

// Convert position corner values into x and y strings
posOptions.at = new $.fn.qtip.plugins.Corner(posOptions.at);
posOptions.my = new $.fn.qtip.plugins.Corner(posOptions.my);

// Destroy previous tooltip if overwrite is enabled, or skip element if not
if(elem.data('qtip')) {
if(config.overwrite) {
elem.qtip('destroy');
}
else if(config.overwrite === FALSE) {
return FALSE;
}
}

// Remove title attribute and store it if present
if(elem.attr('title')) {
elem.data('oldtitle', elem.attr('title')).removeAttr('title');
}

// Initialize the tooltip and add API reference
obj = new QTip(elem, config, id);
elem.data('qtip', obj);

return obj;
}

// jQuery $.fn extension method
$.fn.qtip = function(options, notation, newValue)
{
var command = String(options).toLowerCase(), // Parse command
returned = NULL,
args = command === 'disable' ? [TRUE] : $.makeArray(arguments).slice(1, 10),
event = args[args.length - 1],
opts;

// Check for API request
if((!arguments.length && this.data('qtip')) || command === 'api') {
opts = this.data('qtip');
return opts ? opts : undefined;
}

// Execute API command if present
else if('string' === typeof options)
{
this.each(function()
{
var api = $(this).data('qtip');
if(!api) { return TRUE; }

// Call APIcommand
if((/option|set/).test(command) && notation) {
if(newValue !== undefined) {
api.set(notation, newValue);
}
else {
returned = api.get(notation);
}
}
else {
// Render tooltip if not already rendered when tooltip is to be shown
if(!api.rendered && (command === 'show' || command === 'toggle')) {
if(event && event.timeStamp) { api.cache.event = event; }
api.render(1);
}

// Check for disable/enable commands
else if(command === 'enable') {
command = 'disable'; args = [FALSE];
}

// Execute API command
if(api[command]) {
api[command].apply(api[command], args);
}
}
});

return returned !== NULL ? returned : this;
}

// No API commands. validate provided options and setup qTips
else if('object' === typeof options || !arguments.length)
{
opts = sanitizeOptions($.extend(TRUE, {}, options));

// Bind the qTips
return $.fn.qtip.bind.call(this, opts, event);
}
};

// $.fn.qtip Bind method
$.fn.qtip.bind = function(opts, event)
{
return this.each(function(i) {
var options, targets, events,

// Find next available ID, or use custom ID if provided
id = opts.id = (!opts.id || opts.id === FALSE || opts.id.length < 1 || $('#ui-tooltip-'+opts.id).length) ? $.fn.qtip.nextid++ : opts.id,

// Setup events namespace
namespace = '.qtip-'+id+'-create',

// Initialize the qTip and re-grab newly sanitized options
self = init.call(this, id, opts);
if(self === FALSE) { return TRUE; }
options = self.options;

// Initialize plugins
$.each($.fn.qtip.plugins, function() {
if(this.initialize === 'initialize') { this(self); }
});

// Determine hide and show targets
targets = { show: options.show.target, hide: options.hide.target };
events = {
show: String(options.show.event).replace(' ', namespace+' ') + namespace,
hide: String(options.hide.event).replace(' ', namespace+' ') + namespace
};

// Define hoverIntent function
function hoverIntent(event) {
function render() {
// Cache mouse coords,render and render the tooltip
self.render(typeof event === 'object' || options.show.ready);

// Unbind show and hide event
targets.show.unbind(events.show);
targets.hide.unbind(events.hide);
}

// Only continue if tooltip isn't disabled
if(self.cache.disabled) { return FALSE; }

// Cache the event data
self.cache.event = $.extend({}, event);

// Start the event sequence
if(options.show.delay > 0) {
clearTimeout(self.timers.show);
self.timers.show = setTimeout(render, options.show.delay);
if(events.show !== events.hide) {
targets.hide.bind(events.hide, function() { clearTimeout(self.timers.show); });
}
}
else { render(); }
}

// Bind show events to target
targets.show.bind(events.show, hoverIntent);

// Prerendering is enabled, create tooltip now
if(options.show.ready || options.prerender) { hoverIntent(event); }
});
};

// Override some of the core jQuery methods for library-specific purposes
$.each({
/* Allow other plugins to successfully retrieve the title of an element with a qTip applied */
attr: function(attr) {
var self = $(this), api = self.data('qtip');
return (arguments.length === 1 && attr === 'title' && api && api.rendered === TRUE) ? self.data('oldtitle') : NULL;
},

/*
* Taken directly from jQuery 1.8.2 widget source code
* Trigger 'remove' event on all elements on removal if jQuery UI isn't present
*/
remove: $.ui ? NULL : function( selector, keepData ) {
$(this).each(function() {
if (!keepData) {
if (!selector || $.filter( selector, [ this ] ).length) {
$('*', this).add(this).each(function() {
$(this).triggerHandler('remove');
});
}
}
});
}
},
function(name, func) {
if(!func) { return TRUE; }
$.fn['Old'+name] = $.fn[name];
$.fn[name] = function() {
return func.apply(this, arguments) || $.fn['Old'+name].apply(this, arguments);
};
});

/*
* Add ARIA role attribute to document body if not already present
* http://wiki.jqueryui.com/Tooltip - 4.3 Accessibility recommendation
*/
$(document.body).attr('role', function(i, val) { return !val ? 'application' : val; });

// Cache mousemove events for positioning purposes
$(document).bind('mousemove.qtip', function(event) {
$.fn.qtip.mouse = { pageX: event.pageX, pageY: event.pageY };
});

// Set global qTip properties
$.fn.qtip.version = '2.0.0pre';
$.fn.qtip.nextid = 0;
$.fn.qtip.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
$.fn.qtip.zindex = 15000;

// Setup base plugins
$.fn.qtip.plugins = {
// Corner object parser
Corner: function(corner) {
corner = String(corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, 'center').toLowerCase();
this.x = (corner.match(/left|right/i) || corner.match(/center/) || ['inherit'])[0].toLowerCase();
this.y = (corner.match(/top|bottom|center/i) || ['inherit'])[0].toLowerCase();

this.precedance = (corner.charAt(0).search(/^(t|b)/) > -1) ? 'y' : 'x';
this.string = function() { return this.precedance === 'y' ? this.y+this.x : this.x+this.y; };
this.abbreviation = function() {
var x = this.x.substr(0,1), y = this.y.substr(0,1);
return x === y ? x : (x === 'c' || (x !== 'c' && y !== 'c')) ? y + x : x + y;
};
},

/*
* iOS 4.0 and below scroll fix detection used in offset() function.
*/
iOS: parseFloat(((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)) || [0,'4_2'])[1].replace('_','.')) < 4.1
};

// Define configuration defaults
$.fn.qtip.defaults = {
prerender: FALSE,
id: FALSE,
overwrite: TRUE,
metadata: {
type: 'class'
},
content: {
text: TRUE,
attr: 'title',
title: {
text: FALSE,
button: FALSE
}
},
position: {
my: 'top left',
at: 'bottom right',
target: FALSE,
container: FALSE,
adjust: {
x: 0, y: 0,
mouse: TRUE,
screen: FALSE,
resize: TRUE
},
effect: TRUE
},
show: {
target: FALSE,
event: 'mouseenter',
effect: TRUE,
delay: 90,
solo: FALSE,
ready: FALSE
},
hide: {
target: FALSE,
event: 'mouseleave',
effect: TRUE,
delay: 0,
fixed: FALSE,
inactive: FALSE
},
style: {
classes: '',
widget: FALSE
},
events: {
render: NULL,
move: NULL,
show: NULL,
hide: NULL,
focus: NULL,
blur: NULL
}
};function Ajax(qTip)
{
var self = this;

self.checks = {
'^content.ajax': function() { this.plugins.ajax.load(this.options.content.ajax); }
};

$.extend(self, {

init: function()
{
// Grab ajax options
var ajax = qTip.options.content.ajax;

// Bind render event to load initial content
qTip.elements.tooltip.bind('tooltiprender.ajax', function() {
self.load(ajax);

// Bind show event
qTip.elements.tooltip.bind('tooltipshow.ajax', function() {
// Update content if content.ajax.once is FALSE and the tooltip is rendered
if(ajax.once === FALSE && qTip.rendered === TRUE) { self.load(ajax); }
});
});
},

load: function(ajax)
{
// Define success and error handlers
function successHandler(content, status)
{
// Call user-defined success handler if present
if($.isFunction(ajax.success)) {
var result = ajax.success.call(qTip, content, status);
if(result === FALSE){ return; }
}

// Update content
qTip.set('content.text', content);

}
function errorHandler(xhr, status, error)
{
var content = status || error, result;

// Call user-defined success handler if present
if($.isFunction(ajax.error)) {
result = ajax.error.call(qTip, xhr, status, error);
if(result === FALSE){ return; }
}

// Update tooltip content to indicate error
qTip.set('content.text', content);
}

// Setup $.ajax option object and process the request
$.ajax( $.extend(TRUE, {}, ajax, { success: successHandler, error: errorHandler }) );

return self;
},

destroy: function()
{
// Remove bound events
qTip.elements.tooltip.unbind('tooltipshow.ajax');
}
});

self.init();
}


$.fn.qtip.plugins.ajax = function(qTip)
{
var api = qTip.plugins.ajax,
opts = qTip.options.content.ajax;

// Make sure the qTip uses the $.ajax functionality
if(opts && opts.url) {
// An API is already present, return it
if(api) {
return api;
}
// No API was found, create new instance
else {
qTip.plugins.ajax = new Ajax(qTip);
return qTip.plugins.ajax;
}
}
};

$.fn.qtip.plugins.ajax.initialize = 'render';

// Setup plugin sanitization
$.fn.qtip.plugins.ajax.sanitize = function(options)
{
var content = options.content, opts;
if(content && 'ajax' in content) {
opts = content.ajax;
if(typeof opts !== 'object') { opts = options.content.ajax = { url: opts }; }
if('boolean' !== typeof opts.once && opts.once) { opts.once = !!opts.once; }
}
};

// Extend original qTip defaults
$.extend(TRUE, $.fn.qtip.defaults, {
content: {
ajax: {
once: TRUE
}
}
});// Tip coordinates calculator
function calculateTip(corner, width, height)
{
var width2 = Math.floor(width / 2), height2 = Math.floor(height / 2),

// Define tip coordinates in terms of height and width values
tips = {
bottomright: [[0,0], [width,height], [width,0]],
bottomleft: [[0,0], [width,0], [0,height]],
topright: [[0,height], [width,0], [width,height]],
topleft: [[0,0], [0,height], [width,height]],
topcenter: [[0,height], [width2,0], [width,height]],
bottomcenter: [[0,0], [width,0], [width2,height]],
rightcenter: [[0,0], [width,height2], [0,height]],
leftcenter: [[width,0], [width,height], [0,height2]]
};

// Set common side shapes
tips.lefttop = tips.bottomright; tips.righttop = tips.bottomleft;
tips.leftbottom = tips.topright; tips.rightbottom = tips.topleft;

return tips[corner];
}

function Tip(qTip, command)
{
var self = this,
opts = qTip.options.style.tip,
elems = qTip.elements,
tooltip = elems.tooltip,
wrapper = elems.wrapper,
cache = {
top: 0,
left: 0,
corner: { string: function(){} }
},
size = {
width: opts.width,
height: opts.height
},
color = { },
border = opts.border || 0,
method = opts.method || FALSE;

self.corner = NULL;
self.mimic = NULL;
self.checks = {
'^position.my|style.tip.(corner|mimic|method|border)': function() {
// Re-determine tip type and update
border = opts.border;

// Make sure a tip can be drawn
if(!self.init()) {
self.destroy();
}

// Only update the position if mouse isn't the target
else if(this.get('position.target') !== 'mouse') {
this.reposition();
}
},
'^style.tip.(height|width)': function() {
// Re-set dimensions and redraw the tip
size = {
width: opts.width,
height: opts.height
};
self.create();
self.update();

// Reposition the tooltip
qTip.reposition();
},
'^style.(classes|widget)$': function() {
self.detectColours();
self.update();
}
};

// Tip position method
function position(corner)
{
var tip = elems.tip,
corners = ['left', 'right'],
offset = opts.offset,
precedance, precedanceOp;

// Return if tips are disabled or tip is not yet rendered
if(opts.corner === FALSE || !tip) { return FALSE; }

// Inherit corner if not provided
corner = corner || self.corner;

// Cache precedances
precedance = corner.precedance;
precedanceOp = precedance === 'y' ? 'x' : 'y';

// Setup corners to be adjusted
corners[ precedance === 'y' ? 'push' : 'unshift' ]('top', 'bottom');

// Calculate offset adjustments
offset = Math.max(corner[ precedanceOp ] === 'center' ? offset : 0, offset);

// Reet initial position
tip.css({ top: '', bottom: '', left: '', right: '', margin: '' });

// Adjust primary corners
switch(corner[ precedance === 'y' ? 'x' : 'y' ])
{
case 'center':
tip.css(corners[0], '50%').css('margin-'+corners[0], -Math.floor(size[ (precedance === 'y') ? 'width' : 'height' ] / 2) + offset);
break;

case corners[0]:
tip.css(corners[0], offset);
break;

case corners[1]:
tip.css(corners[1], offset);
break;
}

// Determine secondary adjustments
offset = size[ (precedance === 'x') ? 'width' : 'height' ];
if(border) {
tooltip.toggleClass('ui-tooltip-accessible', !tooltip.is(':visible'));
offset -= parseInt(wrapper.css('border-' + corner[ precedance ] + '-width'), 10) || 0;
tooltip.removeClass('ui-tooltip-accessible');
}

// VML adjustments
if(method === 'vml' && (/bottom|right/).test(corner[ corner.precedance ])) {
offset += border ? 1 : -1;
}

// Adjust secondary corners
tip.css(corner[precedance], -offset);
}

function reposition(event, api, pos, viewport) {
if(!elems.tip) { return; }

var newCorner = $.extend({}, self.corner),
precedance = newCorner.precedance === 'y' ? ['y', 'top', 'left', 'height', 'x'] : ['x', 'left', 'top', 'width', 'y'],
adjusted = pos.adjusted,
offset = [0, 0];

// Make sure our tip position isn't fixed e.g. doesn't adjust with adjust.screen
if(self.corner.fixed !== TRUE) {
// Adjust tip corners
if(adjusted.left) {
newCorner.x = newCorner.x === 'center' ? (adjusted.left > 0 ? 'left' : 'right') : (newCorner.x === 'left' ? 'right' : 'left');
}
if(adjusted.top) {
newCorner.y = newCorner.y === 'center' ? (adjusted.top > 0 ? 'top' : 'bottom') : (newCorner.y === 'top' ? 'bottom' : 'top');
}

// Update and redraw the tip if needed
if(newCorner.string() !== cache.corner.string() && (cache.top !== adjusted.top || cache.left !== adjusted.left)) {
self.update(newCorner);
}
}

// Setup offset adjustments
offset[0] = border ? parseInt(wrapper.css('border-' + newCorner[ precedance[0] ] + '-width'), 10) || 0 : (method === 'vml' ? 1 : 0);
offset[1] = Math.max(newCorner[ precedance[4] ] === 'center' ? opts.offset : 0, opts.offset);

// Adjust tooltip position in relation to tip element
pos[ precedance[1] ] += (newCorner[ precedance[0] ] === precedance[1] ? 1 : -1) * (size[ precedance[3] ] - offset[0]);
pos[ precedance[2] ] -= (newCorner[ precedance[4] ] === precedance[2] || newCorner[ precedance[4] ] === 'center' ? 1 : -1) * offset[1];

// Cache details
cache.left = adjusted.left;
cache.top = adjusted.top;
cache.corner = newCorner;
}

$.extend(self, {
init: function()
{
var ie = $.browser.msie,
enabled = self.detectCorner(),
center = self[self.mimic ? 'mimic' : 'corner'].string().indexOf('center') > -1;

// Determine tip corner and type
if(enabled) {
// Check if rendering method is possible and if not fall back
if(method === TRUE) {
method = $('<canvas />')[0].getContext ? 'canvas' : ie && (center || size.height !== size.width) ? 'vml' : 'polygon';
}
else {
if(method === 'canvas') {
method = ie ? 'vml' : !$('<canvas />')[0].getContext ? 'polygon' : 'canvas';
}
else if(method === 'polygon') {
method = ie && center ? 'vml' : method;
}
}

// Create a new tip
self.create();
self.detectColours();
self.update();

// Bind update events
tooltip.unbind('.qtip-tip').bind('tooltipmove.qtip-tip', reposition);
}

return enabled;
},

detectCorner: function()
{
var corner = opts.corner,
at = qTip.options.position.at,
my = qTip.options.position.my;
if(my.string) { my = my.string(); }

// Detect corner and mimic properties
if(corner === FALSE || (my === FALSE && at === FALSE)) {
return FALSE;
}
else {
if(corner === TRUE) {
self.corner = new $.fn.qtip.plugins.Corner(my);
}
else if(!corner.string) {
self.corner = new $.fn.qtip.plugins.Corner(corner);
self.corner.fixed = TRUE;
}
}

return self.corner.string() !== 'centercenter';
},

detectColours: function() {
var tip = elems.tip,
corner = self.corner,
precedance = self.corner[ self.corner.precedance ],
borderSide = 'border-' + precedance + '-color',
invalid = /rgba?\(0, 0, 0(, 0)?\)|transparent/i,
isTitleTop = elems.titlebar && corner.y === 'top',
isWidget = qTip.options.style.widget,
elemFill = isWidget ? elems.content : isTitleTop ? elems.titlebar : elems.wrapper,
elemBorder = !isWidget ? elems.wrapper : isTitleTop ? elems.titlebar : elems.content;

// Detect tip colours from CSS styles
color.fill = tip.css({ backgroundColor: '', border: '' }).css('background-color') || 'transparent';
color.border = tip.get(0).style ? tip.get(0).style['border' + precedance.charAt(0) + precedance.substr(1) + 'Color'] : tip.css(borderSide) || 'transparent';

// Make sure colours are valid and reset background and border properties
if(invalid.test(color.fill)) {
color.fill = border ? elemFill.css('background-color') : elemBorder.css(borderSide);
}
if(!color.border || invalid.test(color.border)) {
color.border = elemBorder.css(borderSide) || color.fill;
}

// Reset background and border colours
$('*', tip).add(tip).css('background-color', 'transparent').css('border', 0);
},

create: function()
{
var width = size.width,
height = size.height;

// Create tip element and prepend to the tooltip if needed
if(elems.tip){ elems.tip.remove(); }
elems.tip = $('<div class="ui-tooltip-tip" />')
.toggleClass('ui-widget-content', qTip.options.style.widget)
.css(size).prependTo(tooltip);

// Create tip element
switch(method)
{
case 'canvas':
// save() as soon as we create the canvas element so FF2 doesn't bork on our first restore()!
$('<canvas height="'+height+'" width="'+width+'" />').appendTo(elems.tip)[0].getContext('2d').save();
break;

case 'vml':
elems.tip.html('<vml:shape coordorigin="0 0" coordsize="'+width+' '+height+'" stroked="' + !!border + '" ' +
' style="behavior:url(#default#VML); display:inline-block; antialias:TRUE; position: absolute; ' +
' top:0; left:0; width:'+width+'px; height:'+height+'px; vertical-align:'+self.corner.y+';">' +

'<vml:stroke weight="' + (border-2) + 'px" joinstyle="miter" miterlimit="10" ' +
' style="behavior:url(#default#VML); display:inline-block;" />' +

'</vml:shape>');
break;

case 'polygon':
elems.tip.append('<div class="ui-tooltip-tip-inner" />').append(border ? '<div class="ui-tooltip-tip-border" />' : '');
break;
}

return self;
},

update: function(corner)
{
var tip = elems.tip,
width = size.width,
height = size.height,
regular = 'px solid ',
transparent = 'px dashed transparent', // Dashed IE6 border-transparency hack. Awesome!
i = border > 0 ? 0 : 1,
translate = Math.ceil(border / 2 + 0.5),
mimic = opts.mimic,
factor, context, path, coords, inner, round;

// Re-determine tip if not already set
if(!corner) { corner = self.corner; }

// Use corner property if we detect an invalid mimic value
if(mimic === FALSE) { mimic = corner; }

// Otherwise inherit mimic properties from the corner object as necessary
else {
mimic = new $.fn.qtip.plugins.Corner(mimic);
mimic.precedance = corner.precedance;

if(mimic.x === 'inherit') { mimic.x = corner.x; }
else if(mimic.y === 'inherit') { mimic.y = corner.y; }
else if(mimic.x === mimic.y) {
mimic[ corner.precedance ] = corner[ corner.precedance ];
}
}

// Determine what type of rounding to use so we get pixel perfect precision!
round = Math[ /b|r/.test(mimic[ mimic.precedance === 'y' ? 'x' : 'y' ]) ? 'ceil' : 'floor' ];

// Find inner child of tip element
inner = tip.children();

// Create tip element
switch(method)
{
case 'canvas':
// Grab canvas context and clear it
context = inner.get(0).getContext('2d');
if(context.restore) { context.restore(); }
context.clearRect(0,0,3000,3000);

// Grab tip coordinates
coords = calculateTip(mimic.string(), width, height);

// Draw the canvas tip (Delayed til after DOM creation)
for(i; i < 2; i++) {
// Save and translate canvas origin
if(i) {
context.save();
context.translate(
round((mimic.x === 'left' ? 1 : mimic.x === 'right' ? -1 : 0) * (border + 1) * (mimic.precedance === 'y' ? 0.5 : 1)),
round((mimic.y === 'top' ? 1 : mimic.y === 'bottom' ? -1 : 0) * (border + 1) * (mimic.precedance === 'x' ? 0.5 : 1))
);
}

context.beginPath();
context.moveTo(coords[0][0], coords[0][1]);
context.lineTo(coords[1][0], coords[1][1]);
context.lineTo(coords[2][0], coords[2][1]);
context.closePath();
context.fillStyle = color[ i ? 'fill' : 'border' ];
context.fill();
}
break;

case 'vml':
// Determine tip coordinates based on dimensions
coords = calculateTip(mimic.string(), width, height);

// Create coordize and tip path using tip coordinates
path = 'm' + coords[0][0] + ',' + coords[0][1] + ' l' + coords[1][0] +
',' + coords[1][1] + ' ' + coords[2][0] + ',' + coords[2][1] + ' xe';

inner.attr({ 'path': path, 'fillcolor': color.fill });

if(border) {
inner.children().attr('color', color.border);

if(mimic.precedance === 'y') {
inner.css('top', (mimic.y === 'top' ? 1 : -1) * (border - 2));
inner.css('left', (mimic.x === 'left' ? 1 : -2));
}
else {
inner.css('left', (mimic.x === 'left' ? 1 : -1) * (border - 2));
inner.css('top', (mimic.y === 'top' ? 1 : -2));
}

}
break;

case 'polygon':
// Determine border translations
if(mimic.precedance === 'y') {
factor = width > height ? 1.5 : width < height ? 5 : 2.2;
translate = [
mimic.x === 'left' ? translate : mimic.x === 'right' ? -translate : 0,
Math.floor(factor * translate * (mimic.y === 'bottom' ? -1 : 1) * (mimic.x === 'center' ? 0.8 : 1))
];
}
else {
factor = width < height ? 1.5 : width > height ? 5 : 2.2;
translate = [
Math.floor(factor * translate * (mimic.x === 'right' ? -1 : 1) * (mimic.y === 'center' ? 0.9 : 1)),
mimic.y === 'top' ? translate : mimic.y === 'bottom' ? -translate : 0
];
}

inner.removeAttr('style').each(function(i) {
// Determine what border corners/colors to set
var toSet = {
x: mimic.precedance === 'x' ? (mimic.x === 'left' ? 'right' : 'left') : mimic.x,
y: mimic.precedance === 'y' ? (mimic.y === 'top' ? 'bottom' : 'top') : mimic.y
},
path = mimic.x === 'center' ? ['left', 'right', toSet.y, height, width] : ['top', 'bottom', toSet.x, width, height],
col = color[!i && border ? 'border' : 'fill'];

if(i) {
$(this).css({ 'position': 'absolute', 'z-index': 1, 'left': translate[0], 'top': translate[1] });
}

// Setup borders based on corner values
if(mimic.x === 'center' || mimic.y === 'center') {
$(this).css('border-' + path[2], path[3] + regular + col)
.css('border-' + path[0], Math.floor(path[4] / 2) + transparent)
.css('border-' + path[1], Math.floor(path[4] / 2) + transparent);
}
else {
$(this).css('border-width', Math.floor(height / 2) + 'px ' + Math.floor(width / 2) + 'px')
.css('border-' + toSet.x, Math.floor(width / 2) + regular + col)
.css('border-' + toSet.y, Math.floor(height / 2) + regular + col);
}
});
break;
}

// Update position
position(corner);

return self;
},

destroy: function()
{
// Remove previous tip if present
if(elems.tip) {
elems.tip.remove();
}

// Remove bound events
tooltip.unbind('.qtip-tip');
}
});
}

$.fn.qtip.plugins.tip = function(qTip)
{
var api = qTip.plugins.tip,
opts = qTip.options.style.tip;

// Make sure tip options are present
if(opts && opts.corner) {
// An API is already present,
if(api) {
return api;
}
// No API was found, create new instance
else {
qTip.plugins.tip = new Tip(qTip);
qTip.plugins.tip.init();

return qTip.plugins.tip;
}
}
};

// Initialize tip on render
$.fn.qtip.plugins.tip.initialize = 'render';

// Setup plugin sanitization options
$.fn.qtip.plugins.tip.sanitize = function(options)
{
var style = options.style, opts;
if(style && 'tip' in style) {
opts = options.style.tip;
if(typeof opts !== 'object'){ options.style.tip = { corner: opts }; }
if(!(/string|boolean/i).test(typeof opts.corner)) { opts.corner = true; }
if(typeof opts.method !== 'string'){ opts.method = TRUE; }
if(!(/canvas|polygon/i).test(opts.method)){ opts.method = TRUE; }
if(typeof opts.width !== 'number'){ delete opts.width; }
if(typeof opts.height !== 'number'){ delete opts.height; }
if(typeof opts.border !== 'number'){ delete opts.border; }
if(typeof opts.offset !== 'number'){ delete opts.offset; }
}
};

// Extend original qTip defaults
$.extend(TRUE, $.fn.qtip.defaults, {
style: {
tip: {
corner: TRUE,
mimic: FALSE,
method: TRUE,
width: 9,
height: 9,
border: 0,
offset: 0
}
}
});$.fn.qtip.plugins.imagemap = function(area, corner)
{
var shape = area.attr('shape').toLowerCase(),
baseCoords = area.attr('coords').split(','),
coords = [],
image = $('img[usemap="#'+area.parent('map').attr('name')+'"]'),
imageOffset = image.offset(),
result = {
width: 0, height: 0,
offset: { top: 1e10, right: 0, bottom: 0, left: 1e10 }
},
i = 0, next = 0;

// POLY area coordinate calculator
// Special thanks to Ed Cradock for helping out with this.
// Uses a binary search algorithm to find suitable coordinates.
function polyCoordinates(result, coords)
{
var i = 0,
compareX = 1, compareY = 1,
realX = 0, realY = 0,
newWidth = result.width,
newHeight = result.height;

// Use a binary search algorithm to locate most suitable coordinate (hopefully)
while(newWidth > 0 && newHeight > 0 && compareX > 0 && compareY > 0)
{
newWidth = Math.floor(newWidth / 2);
newHeight = Math.floor(newHeight / 2);

if(corner.x === 'left'){ compareX = newWidth; }
else if(corner.x === 'right'){ compareX = result.width - newWidth; }
else{ compareX += Math.floor(newWidth / 2); }

if(corner.y === 'top'){ compareY = newHeight; }
else if(corner.y === 'bottom'){ compareY = result.height - newHeight; }
else{ compareY += Math.floor(newHeight / 2); }

i = coords.length; while(i--)
{
if(coords.length < 2){ break; }

realX = coords[i][0] - result.offset.left;
realY = coords[i][1] - result.offset.top;

if((corner.x === 'left' && realX >= compareX) ||
(corner.x === 'right' && realX <= compareX) ||
(corner.x === 'center' && (realX < compareX || realX > (result.width - compareX))) ||
(corner.y === 'top' && realY >= compareY) ||
(corner.y === 'bottom' && realY <= compareY) ||
(corner.y === 'center' && (realY < compareY || realY > (result.height - compareY)))) {
coords.splice(i, 1);
}
}
}

return { left: coords[0][0], top: coords[0][1] };
}

// Make sure we account for padding and borders on the image
imageOffset.left += Math.ceil((image.outerWidth() - image.width()) / 2);
imageOffset.top += Math.ceil((image.outerHeight() - image.height()) / 2);

// Parse coordinates into proper array
if(shape === 'poly') {
i = baseCoords.length; while(i--)
{
next = [ parseInt(baseCoords[--i], 10), parseInt(baseCoords[i+1], 10) ];

if(next[0] > result.offset.right){ result.offset.right = next[0]; }
if(next[0] < result.offset.left){ result.offset.left = next[0]; }
if(next[1] > result.offset.bottom){ result.offset.bottom = next[1]; }
if(next[1] < result.offset.top){ result.offset.top = next[1]; }

coords.push(next);
}
}
else {
coords = $.map(baseCoords, function(coord){ return parseInt(coord, 10); });
}

// Calculate details
switch(shape)
{
case 'rect':
result = {
width: Math.abs(coords[2] - coords[0]),
height: Math.abs(coords[3] - coords[1]),
offset: { left: coords[0], top: coords[1] }
};
break;

case 'circle':
result = {
width: coords[2] + 2,
height: coords[2] + 2,
offset: { left: coords[0], top: coords[1] }
};
break;

case 'poly':
$.extend(result, {
width: Math.abs(result.offset.right - result.offset.left),
height: Math.abs(result.offset.bottom - result.offset.top)
});

if(corner.string() === 'centercenter') {
result.offset = {
left: result.offset.left + (result.width / 2),
top: result.offset.top + (result.height / 2)
};
}
else {
result.offset = polyCoordinates(result, coords.slice());
}

result.width = result.height = 0;
break;
}

// Add image position to offset coordinates
result.offset.left += imageOffset.left;
result.offset.top += imageOffset.top;

return result;
};

function Modal(qTip, options)
{
var self = this,
elems = qTip.elements,
tooltip = elems.tooltip,
namespace = '.qtipmodal',
events = 'tooltipshow'+namespace+' tooltiphide'+namespace;

// See if overlay is already present
elems.overlay = $('#qtip-overlay');

$.extend(self, {
init: function()
{
// Check if the tooltip is modal
tooltip.bind(events, function(event, api, duration) {
var type = event.type.replace('tooltip', '');

if($.isFunction(options[type])) {
options[type].call(elems.overlay, duration, api);
}
else {
self[type](duration);
}
});

// Create the overlay if needed
if(!elems.overlay.length) {
self.create();
}

// Hide tooltip on overlay click if enabled
if(options.blur === TRUE) {
elems.overlay.bind('click'+namespace+qTip.id, function(){ qTip.hide.call(qTip); });
}
},

create: function()
{
// Create document overlay
elems.overlay = $('<div />', {
id: 'qtip-overlay',
css: {
position: 'absolute',
top: 0,
left: 0,
display: 'none'
}
})
.appendTo(document.body);

// Update position on window resize or scroll
$(window).bind('resize'+namespace, function() {
elems.overlay.css({
height: Math.max( $(window).height(), $(document).height() ),
width: Math.max( $(window).width(), $(document).width() )
});
})
.trigger('resize');
},

toggle: function(state)
{
var overlay = elems.overlay,
effect = qTip.options.show.modal.effect,
type = state ? 'show': 'hide';

// Setop all animations
overlay.stop(TRUE, FALSE);

// Use custom function if provided
if($.isFunction(effect)) {
effect.call(overlay, state);
}

// If no effect type is supplied, use a simple toggle
else if(effect === FALSE) {
overlay[ type ]();
}

// Use basic fade function
else {
overlay.fadeTo(90, state ? 0.7 : 0, function() {
if(!state) { $(this).hide(); }
});
}
},

show: function() { self.toggle(TRUE); },
hide: function() { self.toggle(FALSE); },

destroy: function()
{
var delBlanket = TRUE;

// Check if any other modal tooltips are present
$('*').each(function() {
var api = $(this).data('qtip');
if(api && api.id !== qTip.id && api.options.show.modal) {
// Another modal tooltip was present, leave overlay
delBlanket = FALSE;
return FALSE;
}
});

// Remove overlay if needed
if(delBlanket) {
elems.overlay.remove();
$(window).unbind('scroll'+namespace+' resize'+namespace);
}
else {
elems.overlay.unbind('click'+namespace+qTip.id);
}

// Remove bound events
tooltip.unbind(events);
}
});

self.init();
}

$.fn.qtip.plugins.modal = function(qTip)
{
var api = qTip.plugins.modal,
opts = qTip.options.show.modal;

// An API is already present,
if(api) {
return api;
}
// No API was found, create new instance
else if(opts && opts.on === TRUE) {
qTip.plugins.modal = new Modal(qTip, opts);
return qTip.plugins.modal;
}
};

// Plugin needs to be initialized on render
$.fn.qtip.plugins.modal.initialize = 'render';

// Setup sanitiztion rules
$.fn.qtip.plugins.modal.sanitize = function(opts) {
if(opts.show) {
if(typeof opts.show.modal !== 'object') { opts.show.modal = { on: !!opts.show.modal }; }
else if(typeof opts.show.modal.on === 'undefined') { opts.show.modal.on = TRUE; }
}
};

// Extend original qTip defaults
$.extend(TRUE, $.fn.qtip.defaults, {
show: {
modal: {
on: FALSE,
effect: TRUE,
blur: TRUE
}
}
});/* BGIFrame adaption (http://plugins.jquery.com/project/bgiframe) - Special thanks to Brandon Aaron */
function BGIFrame(qTip)
{
var self = this,
elems = qTip.elements,
tooltip = elems.tooltip,
namespace = '.bgiframe-' + qTip.id,
events = 'tooltipmove'+namespace+' tooltipshow'+namespace;

$.extend(self, {
init: function()
{
// Create the BGIFrame element
elems.bgiframe = $('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' +
' style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0);"></iframe>');

// Append the new element to the tooltip
elems.bgiframe.appendTo(tooltip);

// Update BGIFrame on tooltip move
tooltip.bind(events, self.adjust);
},

adjust: function()
{
var dimensions = qTip.get('dimensions'), // Determine current tooltip dimensions
plugin = qTip.plugins.tip,
tip = qTip.elements.tip,
tipAdjust, offset;

// Adjust border offset
offset = parseInt(tooltip.css('border-left-width'), 10) || 0;
offset = { left: -offset, top: -offset };

// Adjust for tips plugin
if(plugin && tip) {
tipAdjust = (plugin.corner.precedance === 'x') ? ['width', 'left'] : ['height', 'top'];
offset[ tipAdjust[1] ] -= tip[ tipAdjust[0] ]();
}

// Update bgiframe
elems.bgiframe.css(offset).css(dimensions);
},

destroy: function()
{
// Remove iframe
self.iframe.remove();

// Remove bound events
tooltip.unbind(events);
}
});

self.init();
}

$.fn.qtip.plugins.bgiframe = function(qTip)
{
// Proceed only if the browser is IE6 and offending elements are present
if(!($.browser.msie && (/^6\.[0-9]/).test($.browser.version) && $('select, object').length)) {
return FALSE;
}

// Retrieve previous API object
var api = qTip.plugins.bgiframe;

// An API is already present,
if(api) {
return api;
}
// No API was found, create new instance
else {
qTip.plugins.bgiframe = new BGIFrame(qTip);
return qTip.plugins.bgiframe;
}
};

// Plugin needs to be initialized on render
$.fn.qtip.plugins.bgiframe.initialize = 'render';

}(jQuery, window));;
// $Id: qtip.js,v 1.4 2010/12/15 22:56:58 bocaj Exp $
(function ($) {
Drupal.behaviors.qtip = {
  attach: function(context) {

    // Set delay on click to immediate
    if (Drupal.settings.qtip.show_event_type == 'click') {
      show_delay = 0;
    }
    else {
      show_delay = 140; // This is the default qTip value, set for hover links
    }

    // Determine how to position the tooltip
    if (Drupal.settings.qtip.show_speech_bubble_tip) {
      // Set the proper qtip speech-bubble tip position
      if (Drupal.settings.qtip.show_speech_bubble_tip_side) {
        switch_position = Drupal.settings.qtip.tooltip_position.split('_');
        // We do not want to put tooltip on it's side if it is being displayed
        // in the center or side of an element
        if (switch_position[1] == 'center') {
          tip_position = Drupal.settings.qtip.tooltip_position;
        }
        else {
          tip_position = switch_position[1] + ' ' + switch_position[0];
        }
      }
      // Otherwise just set it to the same value as the tooltip
      else {
        tip_position = Drupal.settings.qtip.tooltip_position;
      }
    }
    else {
      tip_position = false;
    }
    
    // Is a custom style declared by the admin?
    if(Drupal.settings.qtip.color == 'custom-color') {
      Drupal.settings.qtip.color = Drupal.settings.qtip.custom_color;
    }

    // Do we want a shadow to show under the tooltip?
    if(Drupal.settings.qtip.show_shadow) {
      style_classes = 'ui-tooltip-shadow ' + Drupal.settings.qtip.color;
    }
    else {
      style_classes = Drupal.settings.qtip.color;
    }
    
    // Do we want to show the tooltips with rounded corners?
    if(Drupal.settings.qtip.rounded_corners) {
      style_classes += ' ui-tooltip-rounded';
    }
    
    //Do we want a solid tip to display
    if (Drupal.settings.qtip.show_speech_bubble_tip_solid) {
      solid_tip = false;
    }
    else {
      solid_tip = 5;
    }

/*** Standard Settings ***/
    $('.qtip-link').each(function() {
      if(Drupal.settings.qtip.show_event_type == 'click') {
        $(this).addClass('ui-tooltip-click');
      }
      
      // if there is a title associated with this qtip...
      if ($(this).children('.qtip-header').length) {
        tooltip_title = $(this).children('.qtip-header').html();
      }
      // if there isn't we don't want a blank title area to show on the qtip...
      else {
        tooltip_title = false;
      }
      
      build_qtip(this, 'node');
    });
    
/*** Additional Elements ***/
    if(Drupal.settings.qtip.additional_elements) {
      $(Drupal.settings.qtip.additional_elements).each(function() {
        $(this).addClass('qtip-additional-element');
        if(Drupal.settings.qtip.show_event_type == 'click') {
          $(this).addClass('ui-tooltip-click');
        }
        
        // if there is a title associated with this qtip...
        if ($(this).children('.qtip-header').length) {
          tooltip_title = $(this).children('.qtip-header').html();
        }
        // if there isn't we don't want a blank title area to show on the qtip...
        else {
          tooltip_title = false;
        }
        
        build_qtip(this, 'node');
      });
    }

/*** Webform Settings ***/
    // Does the admin even want the descriptions to show up in a tooltip?
    if (Drupal.settings.qtip.show_webform_descriptions) {
      /*
       form-text - works well
       form-textarea - works, but width can throw off the tooltip
       form-radios - works, but the radios element wrapper is 100% width, so throws off tooltip like form-textarea
       form-select - works well - should maybe have something like mouseenter or something for usability
      */
      // Elements where description is a sibling to the selected element
      $('form.webform-client-form .form-text,' +
        'form.webform-client-form .form-select').each(function() {
        description = $(this).siblings('.description');
        description.css('display', 'none');
        tooltip_title = false;
        show_delay = 1;
        build_qtip(this, 'form', description.html());
      });
  
      // Elements where description is a sibling to the PARENT of the selected element
      $('form.webform-client-form .form-radios,' +
        'form.webform-client-form .form-textarea').each(function() {
        description = $(this).parent().siblings('.description');
        description.css('display', 'none');
        tooltip_title = false;
        show_delay = 1;
        
        build_qtip(this, 'form', description.html());
      });
    }
    
    
    
    function build_qtip(el, type, desc) {
      if (type == 'form') {
        show_text = desc;
        // By default, the description text is wrapped inside <p>
        // Since we are putting this in a tooltip we want to remove this
        // and any other tags that might possibly get set
        show_text = show_text.replace(/(<.*?>)/ig,"");
        set_my = 'left_center';
        tip_position = 'left_center';
        set_at = 'right_center';
        show_event = 'focus';
        hide_event = 'blur';
      }
      else { // "Normal" tooltip
        show_text = $(el).children('.qtip-tooltip');
        set_my = Drupal.settings.qtip.tooltip_position;
        set_at = Drupal.settings.qtip.target_position;
        show_event = Drupal.settings.qtip.show_event_type;
        hide_event = Drupal.settings.qtip.hide_event_type;
      }
      $(el).qtip({
        content: {
          text: show_text,
          title: {
            text: tooltip_title
          }
        },
        position: {
          my: set_my, // my = speech bubble position on tooltip
          at: set_at, // at = where on link text tooltip will appear
          adjust: {
            screen: true // Keeps tooltip within visible window
          }
        },
        style: {
          classes: style_classes,
          tip: {
            corner: tip_position, // Position of speech bubble tip...false will not display tip
            border: solid_tip, // parseInt(Drupal.settings.qtip.border_width)
            width: parseInt(Drupal.settings.qtip.speech_bubble_size),
            height: parseInt(Drupal.settings.qtip.speech_bubble_size)
          }
        },
        show: {
          event: show_event,
          solo: true, // Determines whether or not the tooltip will hide all others when the show.event is triggered on the show.target. 
          delay: show_delay
        },
        hide: {
          event: hide_event,
          fixed: true //When set to true, the tooltip will not hide if moused over, allowing the contents to be clicked and interacted with.
        }
      });
    }
  }
};
})(jQuery);;
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.99 (12-MAR-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function($){var ver="2.99";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){$.fn.cycle.debug&&log(s);}function log(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "));}$.expr[":"].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="none"?0:opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length){opts.after[0].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=0;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!="none"&&(t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=="undefined"){opts.cssBefore.opacity=1;}opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(!rev===true?1:0));$(next).css("zIndex",opts.slideCount+(!rev===true?0:1));});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display="block";opts.cssAfter.zIndex=0;};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h;};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w;};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0;};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0;};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width="show";opts.animOut.width=0;};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height="show";opts.animOut.height=0;};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.height=0;opts.animIn.top=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});$.extend(opts.cssBefore,{top:0,left:0,width:0});opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});$.extend(opts.animOut,{width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2});});opts.cssFirst.top=0;opts.cssFirst.left=0;opts.cssBefore.width=0;opts.cssBefore.height=0;};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});});opts.cssBefore.width=0;opts.cssBefore.height=0;opts.animOut.opacity=0;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=w;opts.animIn.top=0;opts.animIn.left=0;opts.animOut.top=h;opts.animOut.left=w;};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn.top=0;opts.animIn.height=this.cycleH;opts.animOut.top=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=curr.cycleW/2;opts.animOut.width=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn.top=0;opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH/2;opts.animOut.height=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){$.extend(opts.animOut,{left:w*2,top:-h/2,opacity:0});}else{opts.animOut.opacity=0;}});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.animIn.left=0;};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;
(function($) {
  Drupal.behaviors.field_slideshow = {
    attach: function(context) {

      for (i in Drupal.settings.field_slideshow) {
        var settings = Drupal.settings.field_slideshow[i];
        var slideshow = $('.' + i);

        if (!slideshow.hasClass('field-slideshow-processed')) {
          slideshow.addClass('field-slideshow-processed');

          // Add padding if needed
          var max_outerWidth = 0;
          var max_outerHeight = 0;
          $('.field-slideshow-slide', slideshow).each(function() {
            $this = $(this);
            max_outerWidth = Math.max(max_outerWidth, $this.outerWidth(true));
            max_outerHeight = Math.max(max_outerHeight, $this.outerHeight(true));
          });
          slideshow.css({
            'padding-right': (max_outerWidth - parseInt(slideshow.css('width'))) + 'px',
            'padding-bottom': (max_outerHeight - parseInt(slideshow.css('height'))) + 'px'
          });

          // Add options
          var options = {
            resizing: 0,
            fx: settings.fx,
            speed: settings.speed,
            timeout: parseInt(settings.timeout)
          }

          if (settings.speed == "0" && settings.timeout == "0") options.fastOnEvent = true;
          if (settings.controls) {
            options.prev = "#" + i + "-controls .prev";
            options.next = "#" + i + "-controls .next";
          }
          if (settings.pause) options.pause = true;

          if (settings.pager != '') {
            options.pager = "#" + i + "-pager";
            if (settings.pager == 'image' || settings.pager == 'carousel') {
              options.pagerAnchorBuilder = function(idx, slide) {
                return '#' + i + '-pager li:eq(' + idx + ') a';
              };
              if (settings.pager == 'carousel') {
                var carouselops = { 
                  btnNext:  "#" + i + "-carousel-wrapper .carousel-next",
                  btnPrev:  "#" + i + "-carousel-wrapper .carousel-prev",
                  visible:  parseInt(settings.carousel_visible),
                  scroll:   parseInt(settings.carousel_scroll),
                  speed:    parseInt(settings.carousel_speed),
                  vertical: settings.carousel_vertical,
                  circular: false
                };
                $("#" + i + "-carousel").jCarouselLite(carouselops)
              }
            }
          }

          // Cycle!
          slideshow.cycle(options); 

        }

      }

    }
  }
})(jQuery);;

