// Debug
window.DEBUG=true;(function(a){a.fn.debug=function(){return this.each(function(){a.log(this);});};a.log=function(d){if(window.DEBUG){var b=d;try{if(window.console){if(typeof(d)=="object"){b="&lt;";b+=d.nodeName.toLowerCase();for(var c=0;c<d.attributes.length;c++){b+=" "+d.attributes[c].nodeName.toLowerCase()+'="'+d.attributes[c].nodeValue+'"';}b+="&gt;";}console.debug(d);}}catch(f){}}};})(jQuery);

// getTag - Copyright (c) 2010 Heiko Pfefferkorn (http://www.cenlou.com)
(function(a){a.fn.getTag=function(){var b=null;if(1<=this.length){b=[];this.each(function(c,d){b[c]=a(d).context.nodeName.toLowerCase();});}else{b=a(this[0]).context.nodeName.toLowerCase();}return b;};})(jQuery);

// BgIframe - Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild);}});}:function(){return this;});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c;}})(jQuery);

// hoverIntent by Brian Cherne
(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY;};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g]);}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f);},l.interval);}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g]);};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode;}catch(q){o=this;}}if(o==this){return false;}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f);},l.interval);}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f);},l.timeout);}}};return this.mouseover(b).mouseout(b);};})(jQuery);

// easing v1.3 - Copyright (c) 2008 George McGinley Smith (http://gsgd.co.uk/sandbox/jquery/easing/)
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g);},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a;},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a;},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a;}return -h/2*((--f)*(f-2)-1)+a;},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a;},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a;},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a;}return h/2*((f-=2)*f*f+2)+a;},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a;},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a;},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a;}return -h/2*((f-=2)*f*f*f-2)+a;},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a;},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a;},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a;}return h/2*((f-=2)*f*f*f*f+2)+a;},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a;},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a;},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a;},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a;},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a;},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a;}if(f==g){return a+h;}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a;}return h/2*(-Math.pow(2,-10*--f)+2)+a;},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a;},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a;},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a;}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a;},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k)==1){return e+l;}if(!j){j=k*0.3;}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e;},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k)==1){return e+l;}if(!j){j=k*0.3;}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e;},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e;}if((h/=k/2)==2){return e+l;}if(!j){j=k*(0.3*1.5);}if(g<Math.abs(l)){g=l;var i=j/4;}else{var i=j/(2*Math.PI)*Math.asin(l/g);}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e;}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e;},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}return i*(f/=h)*f*((g+1)*f-g)+a;},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a;},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a;},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a;},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a;}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a;}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a;}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a;}});

// mousewheel 3.0.4 - Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false);}}else{this.onmousewheel=b;}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false);}}else{this.onmousewheel=null;}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel");},unmousewheel:function(d){return this.unbind("mousewheel",d);}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120;}if(i.detail){j=-i.detail/3;}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j;}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120;}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120;}f.unshift(i,j,e,d);return c.event.handle.apply(this,f);}})(jQuery);

// Metadata - Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan
(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata";}var data=$.data(elem,settings.single);if(data){return data;}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1];}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return undefined;}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML);}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr;}}}}if(data.indexOf("{")<0){data="{"+data+"}";}data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);

// UI-Zebra (simple) - Copyright (c) 2011 Heiko Pfefferkorn (http://www.cenlou.com)
(function(a){a.fn.ui_zebra=function(b){var c={evenClass:"even",oddClass:"odd"};return this.each(function(){if(b){c=a.extend(true,{},c,b);}if(a(this).context.nodeName.toLowerCase()=="table"){a(this).find(">tbody > tr:odd, >tbody > tr > *:odd").addClass(c.oddClass);a(this).find(">tbody > tr:even, >tbody > tr > *:even").addClass(c.evenClass);}else{a(this).children(":odd").addClass(c.oddClass);a(this).children(":even").addClass(c.evenClass);}});};})(jQuery);

// qtip v1.0.0-rc3 - Copyright (c) 2009 Craig Thompson (http://craigsworks.com)
(function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current];}else{if(B=="interfaces"){return f(this).data("qtip").interfaces;}}}else{if(!B){B={};}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content};}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title};}if(typeof B.position!=="object"){B.position={corner:B.position};}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner};}if(typeof B.show!=="object"){B.show={when:B.show};}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when};}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect};}if(typeof B.hide!=="object"){B.hide={when:B.hide};}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when};}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect};}if(typeof B.style!=="object"){B.style={name:B.style};}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B);}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy();}}else{if(u!==true){A=[f(this).qtip("api")];}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy();}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show();}else{if(w=="hide"){A[y].hide();}else{if(w=="focus"){A[y].focus();}else{if(w=="disable"){A[y].disable(true);}else{if(w=="enable"){A[y].disable(false);}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body);}if(v.position.target===false){v.position.target=f(this);}if(v.show.when.target===false){v.show.when.target=f(this);}if(v.hide.when.target===false){v.hide.when.target=f(this);}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break;}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length;}f(this).data("qtip").interfaces.push(x);}else{f(this).data("qtip",{current:0,interfaces:[x]});}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event);});}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x);}}});};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show");}if(s.elements.tooltip.css("display")!=="none"){return s;}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s;}function w(){if(s.options.position.type!=="static"){s.focus();}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter");}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0));}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo);}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip);}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide();}});}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue();});}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true);}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break;}s.elements.tooltip.addClass(s.options.style.classes.active);}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show");},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide");}else{if(s.elements.tooltip.css("display")==="none"){return s;}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s;}function w(){s.onHide.call(s,y);}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue();});}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break;}s.elements.tooltip.removeClass(s.options.style.classes.active);}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide");},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition");}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition");}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C]);}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C];}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C]);}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C];}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C]);}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break;}G.dimensions.width-=2;G.dimensions.height-=2;}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()};}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position;}else{G.position=s.options.position.target.offset();}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()};}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width;}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height;}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2);}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2);}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1};}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width;}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height;}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2);}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2);}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius;}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius;}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius;}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius;}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I;}else{if(L.corner.search(/bottom/)!==-1){y.top+=I;}}if(L.corner.search(/left/)!==-1){y.left-=I;}else{if(L.corner.search(/right/)!==-1){y.left+=I;}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1;}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L);}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel");}else{K=s.options.position.corner.tooltip;}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6;}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s);}});}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s;}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false;});}else{s.elements.tooltip.css(y);}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition");}}return s;},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth");}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth");}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value;}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"});}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max;}if(w<s.options.style.width.min){w=s.options.style.width.min;}}}}if(w%2!==0){w-=1;}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2));});}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height);}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth");},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle");}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle");}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true));}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color);}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color);}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color);});}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color);});}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle");},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent");}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent");}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z;}else{if(z===false){return;}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"});}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show();}else{s.elements.content.html(A);}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B();}});});}else{B();}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true);}if(s.options.style.tip.corner!==false){n.call(s);}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent");},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent");}y=s.beforeContentLoad.call(s);if(y===false){return s;}if(A=="post"){f.post(w,z,x);}else{f.get(w,z,x);}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B);}return s;},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle");}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle");}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s;}if(s.elements.button){s.elements.button=s.elements.button.clone(true);}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button);}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle");},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus");}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus");}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s;}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1});}f(this).qtip("api").status.focused=false;}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus");}return s;},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable");}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable");}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable");}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable");}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable");}}return s;},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s;}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove();}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create");}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1);}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1;}else{s.elements.target.removeData("qtip");}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target;},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition");}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show();}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide();}return x;},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions");}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show();}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide();}return x;}});}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1});}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true);}if(typeof s.options.style.width.value=="number"){s.updateWidth();}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s);}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});}if(s.options.style.tip.corner!==false){e.call(s);}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render");}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text;}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","");}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","");}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render");}}}if(s.options.content.title.text!==false){j.call(s);}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show();}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y);}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render");}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>';}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';}}u[z]+="</div>";}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x);});}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"});}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill();}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove();}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return;}else{if(!v){v=t.options.style.tip.corner;}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>';}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative");}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s);}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4});}n.call(t,v);}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill();}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return;}if(!u){u=t.elements.tip.attr("rel");}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1;}else{positionAdjust=(u.search(/top/)!==-1)?1:2;}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)});}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w});}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w});}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust});}else{t.elements.tip.css({bottom:positionAdjust});}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2);}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)});}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w});}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w});}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust});}else{t.elements.tip.css({right:positionAdjust});}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v});}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove();}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text);}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t);}});}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip);}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return;}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive");});t.hide(z);},t.options.hide.delay);}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return;}clearTimeout(t.timers.hide);});}}function x(z){if(t.status.disabled===true){return;}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y);});y();}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z);},t.options.show.delay);}function w(z){if(t.status.disabled===true){return;}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false;}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z);},t.options.hide.delay);}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z);}else{w(z);}});}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w);}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus);}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z);}});}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position;}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width;}else{s.left=z.cache.mouse.x;}y.x="Left";}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width;}else{s.left=z.cache.mouse.x-A.dimensions.width;}y.x="Right";}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height;}else{s.top=z.cache.mouse.y;}y.y="top";}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height;}else{s.top=z.cache.mouse.y-A.dimensions.height;}y.y="bottom";}}if(s.left<0){s.left=u.left;y.x=false;}if(s.top<0){s.top=u.top;y.y=false;}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x);}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y);}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner);}}return s;}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s];}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s];}}}return v;}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip};}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size};}if(typeof s.border!=="object"){s.border={width:s.border};}if(typeof s.width!=="object"){s.width={value:s.width};}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"));}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"));}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x;}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y;}return s;}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t]);}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]));}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1;}if(v.tip.size.height%2>0){v.tip.size.height+=1;}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip;}return v;}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v];}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]};}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]};}}return t;}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first");}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("resize scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()};}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height();}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll"||u.options.position.adjust.resize&&t.type==="resize")){u.updatePosition(t,true);}}},100);});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t);}});}});});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this;}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}};})(jQuery);

// FancyBox - Copyright (c) 2008 - 2010 Janis Skarnelis (http://fancybox.net)
// Modifications by Heiko Pfefferkorn (2011, http://ifabrik.de)
(function(B){var L,T,Q,M,d,m,J,A,O,z,C=0,H={},j=[],e=0,G={},y=[],f=null,o=new Image(),i=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,p,N=1,h=0,t="",b,c,P=false,s=B.extend(B("<div/>")[0],{prop:0}),S=B.browser.msie&&B.browser.version<7&&!window.XMLHttpRequest,r=function(){T.hide();o.onerror=o.onload=null;if(f){f.abort();}L.empty();},x=function(){if(false===H.onError(j,C,H)){T.hide();P=false;return;}H.titleShow=false;H.width="auto";H.height="auto";L.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');n();},w=function(){var Z=j[C],W,Y,ab,aa,V,X;r();H=B.extend({},B.fn.fancybox.defaults,(typeof B(Z).data("fancybox")=="undefined"?H:B(Z).data("fancybox")));X=H.onStart(j,C,H);if(X===false){P=false;return;}else{if(typeof X=="object"){H=B.extend(H,X);}}ab=H.title||(Z.nodeName?B(Z).attr("title"):Z.title)||"";if(Z.nodeName&&!H.orig){H.orig=B(Z).children("img:first").length?B(Z).children("img:first"):B(Z);}if(ab===""&&H.orig&&H.titleFromAlt){ab=H.orig.attr("alt");}W=H.href||(Z.nodeName?B(Z).attr("href"):Z.href)||null;if((/^(?:javascript)/i).test(W)||W=="#"){W=null;}if(H.type){Y=H.type;if(!W){W=H.content;}}else{if(H.content){Y="html";}else{if(W){if(W.match(i)){Y="image";}else{if(W.match(k)){Y="swf";}else{if(B(Z).hasClass("iframe")){Y="iframe";}else{if(W.indexOf("#")===0){Y="inline";}else{Y="ajax";}}}}}}}if(!Y){x();return;}if(Y=="inline"){Z=W.substr(W.indexOf("#"));Y=B(Z).length>0?"inline":"ajax";}H.type=Y;H.href=W;H.title=ab;if(H.autoDimensions){if(H.type=="html"||H.type=="inline"||H.type=="ajax"){H.width="auto";H.height="auto";}else{H.autoDimensions=false;}}if(H.modal){H.overlayShow=true;H.hideOnOverlayClick=false;H.hideOnContentClick=false;H.enableEscapeButton=false;H.showCloseButton=false;}H.padding=parseInt(H.padding,10);H.margin=parseInt(H.margin,10);L.css("padding",(H.padding+H.margin));B(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){B(this).replaceWith(m.children());});switch(Y){case"html":L.html(H.content);n();break;case"inline":if(B(Z).parent().is("#fancybox-content")===true){P=false;return;}B('<div class="fancybox-inline-tmp" />').hide().insertBefore(B(Z)).bind("fancybox-cleanup",function(){B(this).replaceWith(m.children());}).bind("fancybox-cancel",function(){B(this).replaceWith(L.children());});B(Z).appendTo(L);n();break;case"image":P=false;B.fancybox.showActivity();o=new Image();o.onerror=function(){x();};o.onload=function(){P=true;o.onerror=o.onload=null;F();};o.src=W;break;case"swf":H.scrolling="no";aa='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+H.width+'" height="'+H.height+'"><param name="movie" value="'+W+'"></param>';V="";B.each(H.swf,function(ac,ad){aa+='<param name="'+ac+'" value="'+ad+'"></param>';V+=" "+ac+'="'+ad+'"';});aa+='<embed src="'+W+'" type="application/x-shockwave-flash" width="'+H.width+'" height="'+H.height+'"'+V+"></embed></object>";L.html(aa);n();break;case"ajax":P=false;B.fancybox.showActivity();H.ajax.win=H.ajax.success;f=B.ajax(B.extend({},H.ajax,{url:W,data:H.ajax.data||{},error:function(ac,ae,ad){if(ac.status>0){x();}},success:function(ad,af,ac){var ae=typeof ac=="object"?ac:f;if(ae.status==200){if(typeof H.ajax.win=="function"){X=H.ajax.win(W,ad,af,ac);if(X===false){T.hide();return;}else{if(typeof X=="string"||typeof X=="object"){ad=X;}}}L.html(ad);n();}}}));break;case"iframe":E();break;}},n=function(){var V=H.width,W=H.height;if(V.toString().indexOf("%")>-1){V=parseInt((B(window).width()-(H.margin*2))*parseFloat(V)/100,10)+"px";}else{V=V=="auto"?"auto":V+"px";}if(W.toString().indexOf("%")>-1){W=parseInt((B(window).height()-(H.margin*2))*parseFloat(W)/100,10)+"px";}else{W=W=="auto"?"auto":W+"px";}L.wrapInner('<div style="width:'+V+";height:"+W+";overflow: "+(H.scrolling=="auto"?"auto":(H.scrolling=="yes"?"scroll":"hidden"))+';position:relative;"></div>');H.width=L.width();H.height=L.height();E();},F=function(){H.width=o.width;H.height=o.height;B("<img />").attr({id:"fancybox-img",src:o.src,alt:H.title}).appendTo(L);E();},E=function(){var W,V;T.hide();if(M.is(":visible")&&false===G.onCleanup(y,e,G)){B.event.trigger("fancybox-cancel");P=false;return;}P=true;B(m.add(Q)).unbind();B(window).unbind("resize.fb scroll.fb");B(document).unbind("keydown.fb");if(M.is(":visible")&&G.titlePosition!=="outside"){M.css("height",M.height());}y=j;e=C;G=H;if(G.overlayShow){Q.css({"background-color":G.overlayColor,opacity:G.overlayOpacity,cursor:G.hideOnOverlayClick?"pointer":"auto",height:B(document).height()});if(!Q.is(":visible")){if(S){B("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden";}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit";});}Q.show();}}else{Q.hide();}c=R();l();if(M.is(":visible")){O.addClass("fancybox-left_disabled");z.addClass("fancybox-right_disabled");B(J.add(O).add(z)).hide();W=M.position(),b={top:W.top,left:W.left,width:M.width(),height:M.height()};V=(b.width==c.width&&b.height==c.height);m.fadeTo(G.changeFade,0.3,function(){var X=function(){m.html(L.contents()).fadeTo(G.changeFade,1,v);};B.event.trigger("fancybox-change");m.empty().removeAttr("filter").css({"border-width":G.padding,width:c.width-G.padding*2,height:H.autoDimensions?"auto":c.height-h-G.padding*2});if(V){X();}else{s.prop=0;B(s).animate({prop:1},{duration:G.changeSpeed,easing:G.easingChange,step:U,complete:X});}});return;}M.removeAttr("style");m.css("border-width",G.padding);if(G.transitionIn=="elastic"){b=I();m.html(L.contents());M.show();if(G.opacity){c.opacity=0;}s.prop=0;B(s).animate({prop:1},{duration:G.speedIn,easing:G.easingIn,step:U,complete:v});return;}if(G.titlePosition=="inside"&&h>0){A.show();}m.css({width:c.width-G.padding*2,height:H.autoDimensions?"auto":c.height-h-G.padding*2}).html(L.contents());M.css(c).fadeIn(G.transitionIn=="none"?0:G.speedIn,v);},D=function(V){if(V&&V.length){if(G.titlePosition=="float"){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+V+'</td><td id="fancybox-title-float-right"></td></tr></table>';}return'<div id="fancybox-title-'+G.titlePosition+'">'+V+"</div>";}return false;},l=function(){t=G.title||"";h=0;A.empty().removeAttr("style").removeClass();if(G.titleShow===false){A.hide();return;}t=B.isFunction(G.titleFormat)?G.titleFormat(t,y,e,G):D(t);if(!t||t===""){A.hide();return;}A.addClass("fancybox-title-"+G.titlePosition).html(t).appendTo("body").show();switch(G.titlePosition){case"inside":A.css({width:c.width-(G.padding*2),marginLeft:G.padding,marginRight:G.padding});h=A.outerHeight(true);A.appendTo(d);c.height+=h;break;case"over":A.css({marginLeft:G.padding,width:c.width-(G.padding*2),bottom:G.padding}).appendTo(d);break;case"float":A.css("left",parseInt((A.width()-c.width-40)/2,10)*-1).appendTo(M);break;default:A.css({width:c.width-(G.padding*2),paddingLeft:G.padding,paddingRight:G.padding}).appendTo(M);break;}A.hide();},g=function(){if(G.enableEscapeButton||G.enableKeyboardNav){B(document).bind("keydown.fb",function(V){if(V.keyCode==27&&G.enableEscapeButton){V.preventDefault();B.fancybox.close();}else{if((V.keyCode==37||V.keyCode==39)&&G.enableKeyboardNav&&V.target.tagName!=="INPUT"&&V.target.tagName!=="TEXTAREA"&&V.target.tagName!=="SELECT"){V.preventDefault();B.fancybox[V.keyCode==37?"prev":"next"]();}}});}if(!G.showNavArrows){O.addClass("fancybox-left_disabled").hide();z.addClass("fancybox-right_disabled").hide();return;}if((G.cyclic&&y.length>1)||e!==0){O.removeClass("fancybox-left_disabled").show();}if((G.cyclic&&y.length>1)||e!=(y.length-1)){z.removeClass("fancybox-right_disabled").show();}},v=function(){if(!B.support.opacity){m.get(0).style.removeAttribute("filter");M.get(0).style.removeAttribute("filter");}if(H.autoDimensions){m.css("height","auto");}M.css("height","auto");if(t&&t.length){A.show();}if(G.showCloseButton){J.show();}g();if(G.hideOnContentClick){m.bind("click",B.fancybox.close);}if(G.hideOnOverlayClick){Q.bind("click",B.fancybox.close);}B(window).bind("resize.fb",B.fancybox.resize);if(G.centerOnScroll){B(window).bind("scroll.fb",B.fancybox.center);}if(G.type=="iframe"){B('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" '+(B.browser.msie?'allowtransparency="true""':"")+' scrolling="'+H.scrolling+'" src="'+G.href+'"></iframe>').appendTo(m);}M.show();P=false;B.fancybox.center();G.onComplete(y,e,G);K();},K=function(){var V,W;if((y.length-1)>e){V=y[e+1].href;if(typeof V!=="undefined"&&V.match(i)){W=new Image();W.src=V;}}if(e>0){V=y[e-1].href;if(typeof V!=="undefined"&&V.match(i)){W=new Image();W.src=V;}}},U=function(W){var V={width:parseInt(b.width+(c.width-b.width)*W,10),height:parseInt(b.height+(c.height-b.height)*W,10),top:parseInt(b.top+(c.top-b.top)*W,10),left:parseInt(b.left+(c.left-b.left)*W,10)};if(typeof c.opacity!=="undefined"){V.opacity=W<0.5?0.5:W;}M.css(V);m.css({width:V.width-G.padding*2,height:V.height-(h*W)-G.padding*2});},u=function(){return[B(window).width()-(G.margin*2),B(window).height()-(G.margin*2),B(document).scrollLeft()+G.margin,B(document).scrollTop()+G.margin];},R=function(){var V=u(),Z={},W=G.autoScale,X=G.padding*2,Y;if(G.width.toString().indexOf("%")>-1){Z.width=parseInt((V[0]*parseFloat(G.width))/100,10);}else{Z.width=G.width+X;}if(G.height.toString().indexOf("%")>-1){Z.height=parseInt((V[1]*parseFloat(G.height))/100,10);}else{Z.height=G.height+X;}if(W&&(Z.width>V[0]||Z.height>V[1])){if(H.type=="image"||H.type=="swf"){Y=(G.width)/(G.height);if((Z.width)>V[0]){Z.width=V[0];Z.height=parseInt(((Z.width-X)/Y)+X,10);}if((Z.height)>V[1]){Z.height=V[1];Z.width=parseInt(((Z.height-X)*Y)+X,10);}}else{Z.width=Math.min(Z.width,V[0]);Z.height=Math.min(Z.height,V[1]);}}Z.top=parseInt(Math.max(V[3]-20,V[3]+((V[1]-Z.height-40)*0.5)),10);Z.left=parseInt(Math.max(V[2]-20,V[2]+((V[0]-Z.width-40)*0.5)),10);return Z;},q=function(V){var W=V.offset();W.top+=parseInt(V.css("paddingTop"),10)||0;W.left+=parseInt(V.css("paddingLeft"),10)||0;W.top+=parseInt(V.css("border-top-width"),10)||0;W.left+=parseInt(V.css("border-left-width"),10)||0;W.width=V.width();W.height=V.height();return W;},I=function(){var Y=H.orig?B(H.orig):false,X={},W,V;if(Y&&Y.length){W=q(Y);X={width:W.width+(G.padding*2),height:W.height+(G.padding*2),top:W.top-G.padding-20,left:W.left-G.padding-20};}else{V=u();X={width:G.padding*2,height:G.padding*2,top:parseInt(V[3]+V[1]*0.5,10),left:parseInt(V[2]+V[0]*0.5,10)};}return X;},a=function(){if(!T.is(":visible")){clearInterval(p);return;}B("div",T).css("top",(N*-40)+"px");N=(N+1)%12;};B.fn.fancybox=function(V){if(!B(this).length){return this;}B(this).data("fancybox",B.extend({},V,(B.metadata?B(this).metadata():{}))).unbind("click.fb").bind("click.fb",function(X){X.preventDefault();if(P){return;}P=true;B(this).blur();j=[];C=0;var W=B(this).attr("rel")||"";if(!W||W==""||W==="nofollow"){j.push(this);}else{j=B("a[rel="+W+"], area[rel="+W+"]");C=j.index(this);}w();return;});return this;};B.fancybox=function(Y){var X;if(P){return;}P=true;X=typeof arguments[1]!=="undefined"?arguments[1]:{};j=[];C=parseInt(X.index,10)||0;if(B.isArray(Y)){for(var W=0,V=Y.length;W<V;W++){if(typeof Y[W]=="object"){B(Y[W]).data("fancybox",B.extend({},X,Y[W]));}else{Y[W]=B({}).data("fancybox",B.extend({content:Y[W]},X));}}j=jQuery.merge(j,Y);}else{if(typeof Y=="object"){B(Y).data("fancybox",B.extend({},X,Y));}else{Y=B({}).data("fancybox",B.extend({content:Y},X));}j.push(Y);}if(C>j.length||C<0){C=0;}w();};B.fancybox.showActivity=function(){clearInterval(p);T.show();p=setInterval(a,66);};B.fancybox.hideActivity=function(){T.hide();};B.fancybox.next=function(){return B.fancybox.pos(e+1);};B.fancybox.prev=function(){return B.fancybox.pos(e-1);};B.fancybox.pos=function(V){if(P){return;}V=parseInt(V);j=y;if(V>-1&&V<y.length){C=V;w();}else{if(G.cyclic&&y.length>1){C=V>=y.length?0:y.length-1;w();}}return;};B.fancybox.cancel=function(){if(P){return;}P=true;B.event.trigger("fancybox-cancel");r();H.onCancel(j,C,H);P=false;};B.fancybox.close=function(){if(P||M.is(":hidden")){return;}P=true;if(G&&false===G.onCleanup(y,e,G)){P=false;return;}r();O.addClass("fancybox-left_disabled");z.addClass("fancybox-right_disabled");B(J.add(O).add(z)).hide();B(m.add(Q)).unbind();B(window).unbind("resize.fb scroll.fb");B(document).unbind("keydown.fb");m.find("iframe").attr("src",S&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");if(G.titlePosition!=="inside"){A.empty();}M.stop();function V(){Q.fadeOut("fast");A.empty().hide();M.hide();B.event.trigger("fancybox-cleanup");m.empty();G.onClosed(y,e,G);y=H=[];e=C=0;G=H={};P=false;}if(G.transitionOut=="elastic"){b=I();var W=M.position();c={top:W.top,left:W.left,width:M.width(),height:M.height()};if(G.opacity){c.opacity=1;}A.empty().hide();s.prop=1;B(s).animate({prop:0},{duration:G.speedOut,easing:G.easingOut,step:U,complete:V});}else{M.fadeOut(G.transitionOut=="none"?0:G.speedOut,V);}};B.fancybox.resize=function(){if(Q.is(":visible")){Q.css("height",B(document).height());}B.fancybox.center(true);};B.fancybox.center=function(){var V,W;if(P){return;}W=arguments[0]===true?1:0;V=u();if(!W&&(M.width()>V[0]||M.height()>V[1])){return;}M.stop().animate({top:parseInt(Math.max(V[3],V[3]+((V[1]-m.height())*0.5)-G.padding)),left:parseInt(Math.max(V[2],V[2]+((V[0]-m.width())*0.5)-G.padding))},typeof arguments[0]=="number"?arguments[0]:200);};B.fancybox.init=function(){if(B("#fancybox-wrap").length){return;}B("body").append(L=B('<div id="fancybox-tmp"></div>'),T=B('<div id="fancybox-loading"><div></div></div>'),Q=B('<div id="fancybox-overlay"></div>'),M=B('<div id="fancybox-wrap"></div>'));d=B('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(M);d.append(m=B('<div id="fancybox-content"></div>'),J=B('<a id="fancybox-close"><span>&nbsp;</span></a>'),A=B('<div id="fancybox-title"></div>'),O=B('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico">&nbsp;</span></a>'),z=B('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico">&nbsp;</span></a>'));J.click(B.fancybox.close);T.click(B.fancybox.cancel);O.click(function(V){V.preventDefault();if(!B(this).hasClass("fancybox-left_disabled")){B.fancybox.prev();}});z.click(function(V){V.preventDefault();if(!B(this).hasClass("fancybox-right_disabled")){B.fancybox.next();}});if(B.fn.mousewheel){M.bind("mousewheel.fb",function(V,W){if(P){V.preventDefault();}else{if(B(V.target).get(0).clientHeight==0||B(V.target).get(0).scrollHeight===B(V.target).get(0).clientHeight){V.preventDefault();B.fancybox[W>0?"prev":"next"]();}}});}if(!B.support.opacity){M.addClass("fancybox-ie");}if(S){T.addClass("fancybox-ie6");M.addClass("fancybox-ie6");B('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(d);}};B.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};B(document).ready(function(){B.fancybox.init();});})(jQuery);

// carouFredSel 4.4.3 - Copyright (c) 2010 Fred Heusschen (http://caroufredsel.frebsite.nl)
(function($){if($.fn.carouFredSel){return;}$.fn.carouFredSel=function(o){if(this.length==0){debug(true,'No element found for "'+this.selector+'".');return this;}if(this.length>1){return this.each(function(){$(this).carouFredSel(o);});}var $cfs=this,$tt0=this[0];$cfs.init=function(o,setOrig,start){var obs=["items","scroll","auto","prev","next","pagination"];o=getObject($tt0,o);for(var a=0,l=obs.length;a<l;a++){o[obs[a]]=getObject($tt0,o[obs[a]]);}if(typeof o.scroll=="number"){if(o.scroll<=50){o.scroll={items:o.scroll};}else{o.scroll={duration:o.scroll};}}else{if(typeof o.scroll=="string"){o.scroll={easing:o.scroll};}}if(typeof o.items=="number"){o.items={visible:o.items};}else{if(o.items=="variable"){o.items={visible:o.items,width:o.items,height:o.items};}}if(setOrig){opts_orig=$.extend(true,{},$.fn.carouFredSel.defaults,o);}opts=$.extend(true,{},$.fn.carouFredSel.defaults,o);opts.d={};opts.variableVisible=false;opts.visibleAdjust=false;if(opts.items.start==0&&typeof start=="number"){opts.items.start=start;}direction=(opts.direction=="up"||opts.direction=="left")?"next":"prev";var dims=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]];var dn=dims[0].length,dx=(opts.direction=="right"||opts.direction=="left")?0:1;for(var d=0;d<dn;d++){opts.d[dims[0][d]]=dims[dx][d];}var all_itm=getItems($cfs),lrgst_b=getTrueLargestSize(all_itm,opts,"outerHeight",false);if(opts.padding=="auto"){debug(true,'The option "padding: auto" is deprecated, use "align: center".');opts.padding=false;opts.align="center";}if(opts[opts.d.height]=="auto"){opts[opts.d.height]=lrgst_b;opts.items[opts.d.height]=lrgst_b;}if(!opts.items[opts.d.width]){opts.items[opts.d.width]=(hasVariableSizes(all_itm,opts,"outerWidth"))?"variable":all_itm[opts.d.outerWidth](true);}if(!opts.items[opts.d.height]){opts.items[opts.d.height]=(hasVariableSizes(all_itm,opts,"outerHeight"))?"variable":all_itm[opts.d.outerHeight](true);}if(!opts[opts.d.height]){opts[opts.d.height]=opts.items[opts.d.height];}switch(opts.items.visible){case"+1":case"-1":case"odd":case"odd+":case"even":case"even+":opts.visibleAdjust=opts.items.visible;opts.items.visible=false;break;}if(!opts.items.visible){if(opts.items[opts.d.width]=="variable"){opts.items.visible="variable";}else{if(typeof opts[opts.d.width]=="number"){opts.items.visible=Math.floor(opts[opts.d.width]/opts.items[opts.d.width]);}else{var maxS=getTrueInnerSize($wrp.parent(),opts,"innerWidth");opts.items.visible=Math.floor(maxS/opts.items[opts.d.width]);opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width];if(!opts.visibleAdjust){opts.align=false;}}if(opts.items.visible=="Infinity"||opts.items.visible<0){debug(true,'Not a valid number of visible items: Set to "1".');opts.items.visible=1;}opts.items.visible=getVisibleItemsAdjust(opts.items.visible,opts);}}if(!opts[opts.d.width]){if(opts.items.visible!="variable"&&opts.items[opts.d.width]!="variable"){opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width];opts.align=false;}else{opts[opts.d.width]="variable";}}if(opts.items.visible=="variable"){opts.variableVisible=true;opts.maxDimention=(opts[opts.d.width]=="variable")?getTrueInnerSize($wrp.parent(),opts,"innerWidth"):opts[opts.d.width];if(opts.align===false){opts[opts.d.width]="variable";}opts.items.visible=getVisibleItemsNext(all_itm,opts,0);}if(typeof opts.padding=="undefined"){opts.padding=0;}if(typeof opts.align=="undefined"){opts.align=(opts[opts.d.width]=="variable")?false:"center";}opts.items.oldVisible=opts.items.visible;opts.usePadding=false;opts.padding=getPadding(opts.padding);if(opts.align=="top"){opts.align="left";}if(opts.align=="bottom"){opts.align="right";}switch(opts.align){case"center":case"left":case"right":if(opts[opts.d.width]!="variable"){var p=getAlignPadding(getCurrentItems(all_itm,opts),opts);opts.usePadding=true;opts.padding[opts.d[1]]=p[1];opts.padding[opts.d[3]]=p[0];}break;default:opts.align=false;opts.usePadding=(opts.padding[0]==0&&opts.padding[1]==0&&opts.padding[2]==0&&opts.padding[3]==0)?false:true;break;}if(typeof opts.items.minimum!="number"){opts.items.minimum=(opts.variableVisible)?1:opts.items.visible;}if(typeof opts.scroll.items!="number"){opts.scroll.items=(opts.variableVisible)?"variable":opts.items.visible;}if(typeof opts.scroll.duration!="number"){opts.scroll.duration=500;}opts.auto=getNaviObject($tt0,opts.auto,false,true);opts.prev=getNaviObject($tt0,opts.prev);opts.next=getNaviObject($tt0,opts.next);opts.pagination=getNaviObject($tt0,opts.pagination,true);opts.auto=$.extend(true,{},opts.scroll,opts.auto);opts.prev=$.extend(true,{},opts.scroll,opts.prev);opts.next=$.extend(true,{},opts.scroll,opts.next);opts.pagination=$.extend(true,{},opts.scroll,opts.pagination);if(typeof opts.pagination.keys!="boolean"){opts.pagination.keys=false;}if(typeof opts.pagination.anchorBuilder!="function"){opts.pagination.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder;}if(typeof opts.auto.play!="boolean"){opts.auto.play=true;}if(typeof opts.auto.nap!="boolean"){opts.auto.nap=true;}if(typeof opts.auto.delay!="number"){opts.auto.delay=0;}if(typeof opts.auto.pauseDuration!="number"){opts.auto.pauseDuration=(opts.auto.duration<10)?2500:opts.auto.duration*5;}if(opts.synchronise){opts.synchronise=getSynchArr(opts.synchronise);}if(opts.debug){debug(true,"Carousel width: "+opts.width);debug(true,"Carousel height: "+opts.height);debug(true,"Item widths: "+opts.items.width);debug(true,"Item heights: "+opts.items.height);debug(true,"Number of items visible: "+opts.items.visible);if(opts.auto.play){debug(true,"Number of items scrolled automatically: "+opts.auto.items);}if(opts.prev.button){debug(true,"Number of items scrolled backward: "+opts.prev.items);}if(opts.next.button){debug(true,"Number of items scrolled forward: "+opts.next.items);}}};$cfs.build=function(){if($cfs.css("position")=="absolute"||$cfs.css("position")=="fixed"){debug(opts.debug,'Carousels CSS-attribute "position" should be "static" or "relative".');}$wrp.css({position:"relative",overflow:"hidden",marginTop:$cfs.css("marginTop"),marginRight:$cfs.css("marginRight"),marginBottom:$cfs.css("marginBottom"),marginLeft:$cfs.css("marginLeft")});$cfs.data("cfs_origCss",{width:$cfs.css("width"),height:$cfs.css("height"),marginTop:$cfs.css("marginTop"),marginRight:$cfs.css("marginRight"),marginBottom:$cfs.css("marginBottom"),marginLeft:$cfs.css("marginLeft"),"float":$cfs.css("float"),position:$cfs.css("position"),top:$cfs.css("top"),left:$cfs.css("left")}).css({marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,"float":"none",position:"absolute"});if(opts.usePadding){getItems($cfs).each(function(){var m=parseInt($(this).css(opts.d.marginRight));if(isNaN(m)){m=0;}$(this).data("cfs_origCssMargin",m);});}};$cfs.bind_events=function(){$cfs.unbind_events();$cfs.bind("stop.cfs"+serial,function(e){e.stopPropagation();$cfs.trigger("pause");opts.auto.play=false;isPaused="stopped";});$cfs.bind("pause.cfs"+serial,function(e,g){e.stopPropagation();if(typeof g=="boolean"){debug(true,'Pause a carousel globally is deprecated, use the "stop" custom event.');$cfs.trigger("stop");return;}isPaused=true;if(autoTimeout!=null){clearTimeout(autoTimeout);}if(autoInterval!=null){clearInterval(autoInterval);}if(timerInterval!=null){clearInterval(timerInterval);}var dur1=opts.auto.pauseDuration-pauseTimePassed,perc=100-Math.ceil(dur1*100/opts.auto.pauseDuration);if(perc!=0){if(opts.auto.onPausePause){opts.auto.onPausePause.call($tt0,perc,dur1);}}});$cfs.bind("play.cfs"+serial,function(e,dir,dla,sta){e.stopPropagation();$cfs.trigger("pause");var v=[dir,dla,sta],t=["string","number","boolean"],a=sortParams(v,t);var dir=a[0],dla=a[1],sta=a[2];if(dir!="prev"&&dir!="next"){dir=direction;}if(typeof dla!="number"){dla=0;}if(sta){opts.auto.play=true;}if(!opts.auto.play){e.stopImmediatePropagation();return;}isPaused=false;var dur1=opts.auto.pauseDuration-pauseTimePassed,dur2=dur1+dla;perc=100-Math.ceil(dur1*100/opts.auto.pauseDuration);autoTimeout=setTimeout(function(){if($cfs.is(":animated")){$cfs.trigger("play",dir);}else{pauseTimePassed=0;$cfs.trigger(dir,opts.auto);}},dur2);if(opts.auto.pauseOnHover==="resume"){autoInterval=setInterval(function(){pauseTimePassed+=50;},50);}if(opts.auto.onPauseEnd&&perc==0){opts.auto.onPauseEnd.call($tt0,perc,dur1);}if(opts.auto.onPauseStart){timerInterval=setTimeout(function(){opts.auto.onPauseStart.call($tt0,perc,dur1);},dla);}});$cfs.bind("prev.cfs next.cfs"+serial,function(e,obj,num,clb){e.stopPropagation();if(typeof force!="boolean"){force=false;}if(isPaused=="stopped"||$cfs.is(":hidden")){return;}var v=[obj,num,clb],t=["object","number","function"],a=sortParams(v,t);var obj=a[0],num=a[1],clb=a[2];if(typeof obj!="object"||obj==null){obj=opts[e.type];}if(typeof clb=="function"){obj.onAfter=clb;}if(typeof num!="number"){if(typeof obj.items=="number"){num=obj.items;}else{if(typeof opts[e.type].items=="number"){num=opts[e.type].items;}else{num=opts.items.visible;}}}if(obj.duration>0){if($cfs.is(":animated")){if(obj.queue){$cfs.trigger("queue",[e.type,[obj,num,clb]]);}return;}if(opts.items.minimum>=totalItems){debug(opts.debug,"Not enough items: not scrolling.");return;}}pauseTimePassed=0;if(typeof num!="number"){return debug(opts.debug,"Not a valid number: "+num+". Not scrolling");}if(obj.conditions&&!obj.conditions.call($tt0)){return debug(opts.debug,'Callback "conditions" returned false.');}$cfs.trigger("slide_"+e.type,[obj,num]);if(opts.synchronise){var s=opts.synchronise;oI=num;for(var j=0,l=s.length;j<l;j++){var d=e.type;if(!s[j][1]){a[0]=s[j][0].triggerHandler("configuration",e.type);}if(!s[j][2]){d=(d=="prev")?"next":"prev";}a[1]=oI+s[j][3];s[j][0].trigger("slide_"+d,a);}}});$cfs.bind("slide_prev.cfs"+serial,function(e,sO,nI){e.stopPropagation();if(opts.variableVisible){oI=nI;opts.items.oldVisible=opts.items.visible;var a_itm=getItems($cfs);if(opts.usePadding){resetMargin(a_itm,opts);}opts.items.visible=getVisibleItemsPrev(a_itm,opts,oI);nI=opts.items.visible-opts.items.oldVisible+oI;if(nI<=0){opts.items.visible=getVisibleItemsNext(a_itm,opts,totalItems-oI);nI=oI;}if(opts.usePadding){resetMargin(a_itm,opts,true);}}if(!opts.circular){var nulItem=totalItems-firstItem;if(nulItem-nI<0){nI=nulItem;}if(firstItem==0){nI=0;}}firstItem+=nI;if(firstItem>=totalItems){firstItem-=totalItems;}if(!opts.circular){if(firstItem==0&&nI!=0&&sO.onEnd){sO.onEnd.call($tt0);}if(opts.infinite){if(nI==0){$cfs.trigger("next",totalItems-opts.items.visible);return;}}else{enableNavi(opts,firstItem);}}if(nI==0){e.stopImmediatePropagation();return;}getItems($cfs).slice(totalItems-nI).prependTo($cfs);if(totalItems<opts.items.visible+nI){getItems($cfs).slice(0,(opts.items.visible+nI)-totalItems).clone(true).appendTo($cfs);}var a_itm=getItems($cfs),c_old=getOldItemsPrev(a_itm,opts,nI),c_new=getNewItemsPrev(a_itm,opts),l_cur=a_itm.eq(nI-1),l_old=c_old.last(),l_new=c_new.last();if(opts.usePadding){resetMargin(l_old,opts);resetMargin(c_new,opts);}if(opts.align){var p=getAlignPadding(c_new,opts);}if(sO.fx=="directscroll"&&opts.items.oldVisible<nI){var hiddenitems=a_itm.slice(opts.items.oldVisible,nI).hide(),orgW=opts.items[opts.d.width];opts.items[opts.d.width]="variable";}else{var hiddenitems=false;}var i_siz=getTotalSize(a_itm.slice(0,nI),opts,"width"),w_siz=mapWrapperSizes(getSizes(c_new,opts,true),opts,!opts.usePadding);if(hiddenitems){opts.items[opts.d.width]=orgW;}if(opts.usePadding){resetMargin(l_old,opts,opts.padding[opts.d[1]]);resetMargin(l_cur,opts,opts.padding[opts.d[3]]);}if(opts.align){opts.padding[opts.d[1]]=p[1];opts.padding[opts.d[3]]=p[0];}var a_cfs={},a_new={},a_cur={},a_old={},a_dur=sO.duration;if(sO.fx=="none"){a_dur=0;}else{if(a_dur=="auto"){a_dur=opts.scroll.duration/opts.scroll.items*nI;}else{if(a_dur<=0){a_dur=0;}else{if(a_dur<10){a_dur=i_siz/a_dur;}}}}var a_conf={duration:a_dur,easing:sO.easing};if(sO.onBefore){sO.onBefore.call($tt0,c_old,c_new,w_siz,a_dur);}if(opts.usePadding){var new_m=opts.padding[opts.d[3]];a_cur[opts.d.marginRight]=l_cur.data("cfs_origCssMargin");a_new[opts.d.marginRight]=l_new.data("cfs_origCssMargin")+opts.padding[opts.d[1]];a_old[opts.d.marginRight]=l_old.data("cfs_origCssMargin");l_cur.stop().animate(a_cur,a_conf);l_new.stop().animate(a_new,a_conf);l_old.stop().animate(a_old,a_conf);}else{var new_m=0;}a_cfs[opts.d.left]=new_m;if(opts[opts.d.width]=="variable"||opts[opts.d.height]=="variable"){$wrp.stop().animate(w_siz,a_conf);}switch(sO.fx){case"crossfade":case"cover":case"uncover":var $cf2=$cfs.clone().appendTo($wrp);break;}switch(sO.fx){case"uncover":getItems($cf2).slice(0,nI).remove();case"crossfade":case"cover":getItems($cf2).slice(opts.items.visible).remove();break;}switch(sO.fx){case"fade":fx_fade(sO,$cfs,0,a_dur);break;case"crossfade":$cf2.css({opacity:0});fx_fade(sO,$cf2,1,a_dur);fx_fade(sO,$cfs,1,a_dur,function(){$cf2.remove();});break;case"cover":fx_cover(sO,$cfs,$cf2,opts,a_dur,true);break;case"uncover":fx_uncover(sO,$cfs,$cf2,opts,a_dur,true,nI);break;}switch(sO.fx){case"fade":case"crossfade":case"cover":case"uncover":f_dur=a_dur;a_dur=0;break;}var c_nI=nI;$cfs.css(opts.d.left,-i_siz);$cfs.animate(a_cfs,{duration:a_dur,easing:sO.easing,complete:function(){var overFill=opts.items.visible+c_nI-totalItems;if(overFill>0){getItems($cfs).slice(totalItems).remove();c_old=getItems($cfs).slice(totalItems-(c_nI-overFill)).get().concat(getItems($cfs).slice(0,overFill).get());}if(hiddenitems){hiddenitems.show();}if(opts.usePadding){var l_itm=getItems($cfs).eq(opts.items.visible+c_nI-1);l_itm.css(opts.d.marginRight,l_itm.data("cfs_origCssMargin"));}var fn=function(){if(sO.onAfter){sO.onAfter.call($tt0,c_old,c_new,w_siz);}if(queue.length){setTimeout(function(){$cfs.trigger(queue[0][0],queue[0][1]);queue.shift();},1);}};switch(sO.fx){case"fade":case"uncover":fx_fade(sO,$cfs,1,f_dur,fn);break;default:fn();break;}}});$cfs.trigger("updatePageStatus",[false,w_siz]).trigger("play",a_dur);});$cfs.bind("slide_next.cfs"+serial,function(e,sO,nI){e.stopPropagation();if(opts.variableVisible){opts.items.oldVisible=opts.items.visible;var a_itm=getItems($cfs);if(opts.usePadding){resetMargin(a_itm,opts);}opts.items.visible=getVisibleItemsNext(a_itm,opts,nI);if(opts.items.oldVisible-nI>=opts.items.visible){opts.items.visible=getVisibleItemsNext(a_itm,opts,++nI);}if(opts.usePadding){resetMargin(a_itm,opts,true);}}if(!opts.circular){if(firstItem==0){if(nI>totalItems-opts.items.visible){nI=totalItems-opts.items.visible;}}else{if(firstItem-nI<opts.items.visible){nI=firstItem-opts.items.visible;}}}firstItem-=nI;if(firstItem<0){firstItem+=totalItems;}if(!opts.circular){if(firstItem==opts.items.visible&&nI!=0&&sO.onEnd){sO.onEnd.call($tt0);}if(opts.infinite){if(nI==0){$cfs.trigger("prev",totalItems-opts.items.visible);return;}}else{enableNavi(opts,firstItem);}}if(nI==0){return;}if(totalItems<opts.items.visible+nI){getItems($cfs).slice(0,(opts.items.visible+nI)-totalItems).clone(true).appendTo($cfs);}var a_itm=getItems($cfs),c_old=getOldItemsNext(a_itm,opts),c_new=getNewItemsNext(a_itm,opts,nI),l_cur=c_old.eq(nI-1),l_old=c_old.last(),l_new=c_new.last();if(opts.usePadding){resetMargin(l_old,opts);resetMargin(l_new,opts);}if(opts.align){var p=getAlignPadding(c_new,opts);}if(sO.fx=="directscroll"&&opts.items.oldVisible<nI){var hiddenitems=a_itm.slice(opts.items.oldVisible,nI).hide(),orgW=opts.items[opts.d.width];opts.items[opts.d.width]="variable";}else{var hiddenitems=false;}var i_siz=getTotalSize(a_itm.slice(0,nI),opts,"width"),w_siz=mapWrapperSizes(getSizes(c_new,opts,true),opts,!opts.usePadding);if(hiddenitems){opts.items[opts.d.width]=orgW;}if(opts.usePadding){resetMargin(l_old,opts,opts.padding[opts.d[1]]);resetMargin(l_new,opts,opts.padding[opts.d[1]]);}if(opts.align){opts.padding[opts.d[1]]=p[1];opts.padding[opts.d[3]]=p[0];}var a_cfs={},a_old={},a_cur={},a_dur=sO.duration;if(sO.fx=="none"){a_dur=0;}else{if(a_dur=="auto"){a_dur=opts.scroll.duration/opts.scroll.items*nI;}else{if(a_dur<=0){a_dur=0;}else{if(a_dur<10){a_dur=i_siz/a_dur;}}}}var a_conf={duration:a_dur,easing:sO.easing};if(sO.onBefore){sO.onBefore.call($tt0,c_old,c_new,w_siz,a_dur);}if(opts.usePadding){a_old[opts.d.marginRight]=l_old.data("cfs_origCssMargin");a_cur[opts.d.marginRight]=l_cur.data("cfs_origCssMargin")+opts.padding[opts.d[3]];l_new.css(opts.d.marginRight,l_new.data("cfs_origCssMargin")+opts.padding[opts.d[1]]);l_old.stop().animate(a_old,a_conf);l_cur.stop().animate(a_cur,a_conf);}a_cfs[opts.d.left]=-i_siz;if(opts[opts.d.width]=="variable"||opts[opts.d.height]=="variable"){$wrp.stop().animate(w_siz,a_conf);}switch(sO.fx){case"crossfade":case"cover":case"uncover":var $cf2=$cfs.clone().appendTo($wrp);break;}switch(sO.fx){case"crossfade":case"cover":getItems($cf2).slice(0,nI).remove();getItems($cf2).slice(opts.items.visible).remove();break;case"uncover":getItems($cf2).slice(opts.items.oldVisible).remove();break;}switch(sO.fx){case"fade":fx_fade(sO,$cfs,0,a_dur);break;case"crossfade":$cf2.css({opacity:0});fx_fade(sO,$cf2,1,a_dur);fx_fade(sO,$cfs,1,a_dur,function(){$cf2.remove();});break;case"cover":fx_cover(sO,$cfs,$cf2,opts,a_dur,false);break;case"uncover":fx_uncover(sO,$cfs,$cf2,opts,a_dur,false,nI);break;}switch(sO.fx){case"fade":case"crossfade":case"cover":case"uncover":f_dur=a_dur;a_dur=0;break;}var c_nI=nI;$cfs.animate(a_cfs,{duration:a_dur,easing:sO.easing,complete:function(){var overFill=opts.items.visible+c_nI-totalItems,new_m=(opts.usePadding)?opts.padding[opts.d[3]]:0;$cfs.css(opts.d.left,new_m);if(overFill>0){getItems($cfs).slice(totalItems).remove();}var l_itm=getItems($cfs).slice(0,c_nI).appendTo($cfs).last();if(overFill>0){c_new=getCurrentItems(getItems($cfs),opts);}if(hiddenitems){hiddenitems.show();}if(opts.usePadding){if(totalItems<opts.items.visible+c_nI){var l_cur=getItems($cfs).eq(opts.items.visible-1);l_cur.css(opts.d.marginRight,l_cur.data("cfs_origCssMargin")+opts.padding[opts.d[3]]);}l_itm.css(opts.d.marginRight,l_itm.data("cfs_origCssMargin"));}var fn=function(){if(sO.onAfter){sO.onAfter.call($tt0,c_old,c_new,w_siz);}if(queue.length){setTimeout(function(){$cfs.trigger(queue[0][0],queue[0][1]);queue.shift();},1);}};switch(sO.fx){case"fade":case"uncover":fx_fade(sO,$cfs,1,f_dur,fn);break;default:fn();break;}}});$cfs.trigger("updatePageStatus",[false,w_siz]).trigger("play",a_dur);});$cfs.bind("slideTo.cfs"+serial,function(e,num,dev,org,obj,dir){e.stopPropagation();var v=[num,dev,org,obj,dir],t=["string/number/object","number","boolean","object","string"],a=sortParams(v,t);var obj=a[3],dir=a[4];num=getItemIndex(a[0],a[1],a[2],firstItem,totalItems,$cfs);if(num==0){return;}if(typeof obj!="object"){obj=false;}if($cfs.is(":animated")&&obj.duration>0){return;}if(dir!="prev"&&dir!="next"){if(opts.circular){if(num<=totalItems/2){dir="next";}else{dir="prev";}}else{if(firstItem==0||firstItem>num){dir="next";}else{dir="prev";}}}if(dir=="prev"){$cfs.trigger("prev",[obj,totalItems-num]);}else{$cfs.trigger("next",[obj,num]);}});$cfs.bind("jumpToStart.cfs"+serial,function(e){if(firstItem>0){$cfs.prepend(getItems($cfs).slice(firstItem));}});$cfs.bind("synchronise.cfs"+serial,function(e,s){if(s){s=getSynchArr(s);}else{if(opts.synchronise){s=opts.synchronise;}else{return debug(opts.debug,"No carousel to synchronise.");}}var n=$cfs.triggerHandler("currentPosition");for(var j=0,l=s.length;j<l;j++){s[j][0].trigger("slideTo",[n,s[j][3],true]);}});$cfs.bind("queue.cfs"+serial,function(e,dir,opt){if(typeof dir=="undefined"){return queue;}else{if(typeof dir=="function"){dir.call($tt0,queue);}else{if(is_array(dir)){queue=dir;}else{queue.push([dir,opt]);}}}});$cfs.bind("insertItem.cfs"+serial,function(e,itm,num,org,dev){e.stopPropagation();var v=[itm,num,org,dev],t=["string/object","string/number/object","boolean","number"],a=sortParams(v,t);var itm=a[0],num=a[1],org=a[2],dev=a[3];if(typeof itm=="object"&&typeof itm.jquery=="undefined"){itm=$(itm);}if(typeof itm=="string"){itm=$(itm);}if(typeof itm!="object"||typeof itm.jquery=="undefined"||itm.length==0){return debug(opts.debug,"Not a valid object.");}if(typeof num=="undefined"){num="end";}if(opts.usePadding){itm.each(function(){var m=parseInt($(this).css(opts.d.marginRight));if(isNaN(m)){m=0;}$(this).data("cfs_origCssMargin",m);});}var orgNum=num,before="before";if(num=="end"){if(org){if(firstItem==0){num=totalItems-1;before="after";}else{num=firstItem;firstItem+=itm.length;}if(num<0){num=0;}}else{num=totalItems-1;before="after";}}else{num=getItemIndex(num,dev,org,firstItem,totalItems,$cfs);}if(orgNum!="end"&&!org){if(num<firstItem){firstItem+=itm.length;}}if(firstItem>=totalItems){firstItem-=totalItems;}var $cit=getItems($cfs).eq(num);if($cit.length){$cit[before](itm);}else{$cfs.append(itm);}totalItems=getItems($cfs).length;$cfs.trigger("linkAnchors");var sz=setSizes($cfs,opts);showNavi(opts,totalItems);enableNavi(opts,firstItem);$cfs.trigger("updatePageStatus",[true,sz]);});$cfs.bind("removeItem.cfs"+serial,function(e,num,org,dev){e.stopPropagation();var v=[num,org,dev],t=["string/number/object","boolean","number"],a=sortParams(v,t);var num=a[0],org=a[1],dev=a[2];if(typeof num=="undefined"||num=="end"){getItems($cfs).last().remove();}else{num=getItemIndex(num,dev,org,firstItem,totalItems,$cfs);var $cit=getItems($cfs).eq(num);if($cit.length){if(num<firstItem){firstItem-=$cit.length;}$cit.remove();}}totalItems=getItems($cfs).length;var sz=setSizes($cfs,opts);showNavi(opts,totalItems);enableNavi(opts,firstItem);$cfs.trigger("updatePageStatus",[true,sz]);});$cfs.bind("currentPosition.cfs"+serial,function(e,fn){e.stopPropagation();if(firstItem==0){var val=0;}else{var val=totalItems-firstItem;}if(typeof fn=="function"){fn.call($tt0,val);}return val;});$cfs.bind("currentPage.cfs"+serial,function(e,fn){e.stopPropagation();var max=Math.ceil(totalItems/opts.items.visible-1);if(firstItem==0){var nr=0;}else{if(firstItem<totalItems%opts.items.visible){var nr=0;}else{if(firstItem==opts.items.visible&&!opts.circular){var nr=max;}else{var nr=Math.round((totalItems-firstItem)/opts.items.visible);}}}if(nr<0){nr=0;}if(nr>max){nr=max;}if(typeof fn=="function"){fn.call($tt0,nr);}return nr;});$cfs.bind("currentVisible.cfs"+serial,function(e,fn){e.stopPropagation();$i=getCurrentItems(getItems($cfs),opts);if(typeof fn=="function"){fn.call($tt0,$i);}return $i;});$cfs.bind("isPaused.cfs"+serial,function(e,fn){e.stopPropagation();if(typeof fn=="function"){fn.call($tt0,isPaused);}return isPaused;});$cfs.bind("configuration.cfs"+serial,function(e,a,b,c){e.stopPropagation();var reInit=false;if(typeof a=="function"){a.call($tt0,opts);}else{if(typeof a=="object"){opts_orig=$.extend(true,{},opts_orig,a);if(b!==false){reInit=true;}else{opts=$.extend(true,{},opts,a);}}else{if(typeof a!="undefined"){if(typeof b=="function"){var val=eval("opts."+a);if(typeof val=="undefined"){val="";}b.call($tt0,val);}else{if(typeof b!="undefined"){if(typeof c!=="boolean"){c=true;}if($cfs.is(":animated")){setTimeout(function(){$cfs.trigger("configuration",[a,b,c]);},100);return debug(opts.debug,"carousel animated, configuration timeout.");}eval("opts_orig."+a+" = b");if(c!==false){reInit=true;}else{eval("opts."+a+" = b");}}else{return eval("opts."+a);}}}}}if(reInit){resetMargin(getItems($cfs),opts);$cfs.init(opts_orig);setSizes($cfs,opts);}return opts;});$cfs.bind("linkAnchors.cfs"+serial,function(e,$con,sel){e.stopPropagation();if(typeof $con=="undefined"||$con.length==0){$con=$("body");}else{if(typeof $con=="string"){$con=$($con);}}if(typeof $con!="object"){return debug(opts.debug,"Not a valid object.");}if(typeof sel!="string"||sel.length==0){sel="a.caroufredsel";}$con.find(sel).each(function(){var h=this.hash||"";if(h.length>0&&getItems($cfs).index($(h))!=-1){$(this).unbind("click").click(function(e){e.preventDefault();$cfs.trigger("slideTo",h);});}});});$cfs.bind("updatePageStatus.cfs"+serial,function(e,build,sizes){e.stopPropagation();if(!opts.pagination.container){return;}if(typeof build=="boolean"&&build){getItems(opts.pagination.container).remove();for(var a=0,l=Math.ceil(totalItems/opts.items.visible);a<l;a++){var i=getItems($cfs).eq(getItemIndex(a*opts.items.visible,0,true,firstItem,totalItems,$cfs));opts.pagination.container.append(opts.pagination.anchorBuilder(a+1,i));}getItems(opts.pagination.container).unbind("click").each(function(a){$(this).click(function(e){e.preventDefault();$cfs.trigger("slideTo",[a*opts.items.visible,0,true,opts.pagination]);});});}$cfs.trigger("currentPage",function(nr){getItems(opts.pagination.container).removeClass("selected").eq(nr).addClass("selected");});});$cfs.bind("destroy.cfs"+serial,function(e,orgOrder){e.stopPropagation();if(orgOrder){$cfs.trigger("jumpToStart");}if(opts.usePadding){resetMargin(getItems($cfs),opts);}$cfs.trigger("pause").css($cfs.data("cfs_origCss"));$cfs.unbind_events();$cfs.unbind_buttons();$wrp.replaceWith($cfs);});$cfs.bind("slidePrev.cfs"+serial,function(e,sO,nI){e.stopPropagation();debug(true,'The custom event "slidePrev" is deprecated, use "slide_prev".');$cfs.trigger("slide_prev",[sO,nI]);});$cfs.bind("slideNext.cfs"+serial,function(e,sO,nI){e.stopPropagation();debug(true,'The custom event "slideNext" is deprecated, use "slide_next".');$cfs.trigger("slide_next",[sO,nI]);});};$cfs.unbind_events=function(){$cfs.unbind(".cfs"+serial);};$cfs.bind_buttons=function(){$cfs.unbind_buttons();showNavi(opts,totalItems);enableNavi(opts,firstItem);if(opts.auto.pauseOnHover){$wrp.bind("mouseenter.cfs"+serial,function(){$cfs.trigger("pause");});$wrp.bind("mouseleave.cfs"+serial,function(){$cfs.trigger("play");});}if(opts.prev.button){opts.prev.button.bind("click.cfs"+serial,function(e){e.preventDefault();$cfs.trigger("prev");});if(opts.prev.pauseOnHover){opts.prev.button.bind("mouseenter.cfs"+serial,function(){$cfs.trigger("pause");});opts.prev.button.bind("mouseleave.cfs"+serial,function(){$cfs.trigger("play");});}}if(opts.next.button){opts.next.button.bind("click.cfs"+serial,function(e){e.preventDefault();$cfs.trigger("next");});if(opts.next.pauseOnHover){opts.next.button.bind("mouseenter.cfs"+serial,function(){$cfs.trigger("pause");});opts.next.button.bind("mouseleave.cfs"+serial,function(){$cfs.trigger("play");});}}if($.fn.mousewheel){if(opts.prev.mousewheel){$wrp.mousewheel(function(e,delta){if(delta>0){e.preventDefault();num=(typeof opts.prev.mousewheel=="number")?opts.prev.mousewheel:"";$cfs.trigger("prev",num);}});}if(opts.next.mousewheel){$wrp.mousewheel(function(e,delta){if(delta<0){e.preventDefault();num=(typeof opts.next.mousewheel=="number")?opts.next.mousewheel:"";$cfs.trigger("next",num);}});}}if(opts.pagination.container){if(opts.pagination.pauseOnHover){opts.pagination.container.bind("mouseenter.cfs"+serial,function(){$cfs.trigger("pause");});opts.pagination.container.bind("mouseleave.cfs"+serial,function(){$cfs.trigger("play");});}}if(opts.next.key||opts.prev.key){$(document).bind("keyup.cfs"+serial,function(e){var k=e.keyCode;if(k==opts.next.key){e.preventDefault();$cfs.trigger("next");}if(k==opts.prev.key){e.preventDefault();$cfs.trigger("prev");}});}if(opts.pagination.keys){$(document).bind("keyup.cfs"+serial,function(e){var k=e.keyCode;if(k>=49&&k<58){k=(k-49)*opts.items.visible;if(k<=totalItems){e.preventDefault();$cfs.trigger("slideTo",[k,0,true,opts.pagination]);}}});}if(opts.auto.play){$cfs.trigger("play",opts.auto.delay);if($.fn.nap&&opts.auto.nap){$cfs.nap("pause","play");}}};$cfs.unbind_buttons=function(){$(document).unbind(".cfs"+serial);$wrp.unbind(".cfs"+serial);if(opts.prev.button){opts.prev.button.unbind(".cfs"+serial);}if(opts.next.button){opts.next.button.unbind(".cfs"+serial);}if(opts.pagination.container){opts.pagination.container.unbind(".cfs"+serial);}showNavi(opts,"hide");enableNavi(opts,"removeClass");if(opts.pagination.container){getItems(opts.pagination.container).remove();}};$cfs.configuration=function(a,b){debug(true,'The "configuration" public method is deprecated, use the "configuration" custom event.');var cr=false;var fn=function(val){cr=val;};if(!a){a=fn;}if(!b){b=fn;}$cfs.trigger("configuration",[a,b]);return cr;};$cfs.current_position=function(){debug(true,'The "current_position" public method is deprecated, use the "currentPosition" custom event.');var cp=false;$cfs.trigger("currentPosition",function(val){cp=val;});return cp;};$cfs.destroy=function(){debug(true,'The "destroy" public method is deprecated, use the "destroy" custom event.');$cfs.trigger("destroy");return $cfs;};$cfs.link_anchors=function($c,se){debug(true,'The "link_anchors" public method is deprecated, use the "linkAnchors" custom event.');$cfs.trigger("linkAnchors",[$c,se]);return $cfs;};if($cfs.parent().is(".caroufredsel_wrapper")){var strt=$cfs.triggerHandler("currentPosition");$cfs.trigger("destroy",true);}else{var strt=false;}var $wrp=$cfs.wrap('<div class="caroufredsel_wrapper" />').parent(),opts={},opts_orig=o,totalItems=getItems($cfs).length,firstItem=0,autoTimeout=null,autoInterval=null,timerInterval=null,pauseTimePassed=0,isPaused=true,direction="next",queue=[],serial=$.fn.carouFredSel.serial++;$cfs.init(opts_orig,true,strt);$cfs.build();$cfs.bind_events();$cfs.bind_buttons();if(opts.items.start!=0){var s=opts.items.start;if(s===true){s=window.location.hash;if(!s.length){s=0;}}else{if(s==="random"){s=Math.floor(Math.random()*totalItems);}}$cfs.trigger("slideTo",[s,0,true,{duration:0},"next"]);}var siz=setSizes($cfs,opts,false),itm=getCurrentItems(getItems($cfs),opts);if(opts.onCreate){opts.onCreate.call($tt0,itm,siz);}$cfs.trigger("updatePageStatus",[true,siz]);$cfs.trigger("linkAnchors");return this;};$.fn.carouFredSel.serial=0;$.fn.carouFredSel.defaults={debug:false,synchronise:false,infinite:true,circular:true,direction:"left",items:{start:0},scroll:{easing:"swing",pauseOnHover:false,mousewheel:false,queue:false}};$.fn.carouFredSel.pageAnchorBuilder=function(nr,itm){return'<a href="#"><span>'+nr+"</span></a>";};function fx_fade(sO,c,x,d,f){var o={duration:d,easing:sO.easing};if(typeof f=="function"){o.complete=f;}c.animate({opacity:x},o);}function fx_cover(sO,c1,c2,o,d,prev){var old_w=getSizes(getOldItemsNext(getItems(c1),o),o,true)[0],new_w=getSizes(getItems(c2),o,true)[0],cur_l=(prev)?-new_w:old_w,css_o={},ani_o={};css_o[o.d.width]=new_w;css_o[o.d.left]=cur_l;ani_o[o.d.left]=0;c1.animate({opacity:"+=0"},d);c2.css(css_o).animate(ani_o,{duration:d,easing:sO.easing,complete:function(){$(this).remove();}});}function fx_uncover(sO,c1,c2,o,d,prev,n){var new_w=getSizes(getNewItemsNext(getItems(c1),o,n),o,true)[0],old_w=getSizes(getItems(c2),o,true)[0],cur_l=(prev)?-old_w:new_w,css_o={},ani_o={};css_o[o.d.width]=old_w;css_o[o.d.left]=0;ani_o[o.d.left]=cur_l;c2.css(css_o).animate(ani_o,{duration:d,easing:sO.easing,complete:function(){$(this).remove();}});}function showNavi(o,t){if(t=="show"||t=="hide"){var f=t;}else{if(o.items.minimum>=t){debug(o.debug,"Not enough items: not scrolling");var f="hide";}else{var f="show";}}if(o.prev.button){o.prev.button[f]();}if(o.next.button){o.next.button[f]();}if(o.pagination.container){o.pagination.container[f]();}}function enableNavi(o,f){if(o.circular||o.infinite){return;}var fx=(f=="removeClass"||f=="addClass")?f:false;if(o.next.button){var fn=fx||(f==o.items.visible)?"addClass":"removeClass";o.next.button[fn]("disabled");}if(o.prev.button){var fn=fx||(f==0)?"addClass":"removeClass";o.prev.button[fn]("disabled");}}function sortParams(vals,typs){var _arr=[];for(var a=0,l1=vals.length;a<l1;a++){for(var b=0,l2=typs.length;b<l2;b++){if(typs[b].indexOf(typeof vals[a])>-1&&!_arr[b]){_arr[b]=vals[a];break;}}}return _arr;}function getSynchArr(s){if(!is_array(s)){s=[[s]];}if(!is_array(s[0])){s=[s];}for(var j=0,l=s.length;j<l;j++){if(typeof s[j][0]=="string"){s[j][0]=$(s[j][0]);}if(typeof s[j][1]!="boolean"){s[j][1]=true;}if(typeof s[j][2]!="boolean"){s[j][2]=true;}if(typeof s[j][3]!="number"){s[j][3]=0;}}return s;}function getKeyCode(k){if(k=="right"){return 39;}if(k=="left"){return 37;}if(k=="up"){return 38;}if(k=="down"){return 40;}return -1;}function getObject($tt,obj){if(typeof obj=="function"){obj=obj.call($tt);}if(typeof obj=="undefined"){obj={};}return obj;}function getNaviObject($tt,obj,pagi,auto){if(typeof pagi!="boolean"){pagi=false;}if(typeof auto!="boolean"){auto=false;}obj=getObject($tt,obj);if(typeof obj=="string"){var temp=getKeyCode(obj);if(temp==-1){obj=$(obj);}else{obj=temp;}}if(pagi){if(typeof obj=="boolean"){obj={keys:obj};}if(typeof obj.jquery!="undefined"){obj={container:obj};}if(typeof obj.container=="function"){obj.container=obj.container.call($tt);}if(typeof obj.container=="string"){obj.container=$(obj.container);}if(typeof obj.event!="string"){obj.event="click";}}else{if(auto){if(typeof obj=="boolean"){obj={play:obj};}if(typeof obj=="number"){obj={pauseDuration:obj};}}else{if(typeof obj.jquery!="undefined"){obj={button:obj};}if(typeof obj=="number"){obj={key:obj};}if(typeof obj.button=="function"){obj.button=obj.button.call($tt);}if(typeof obj.button=="string"){obj.button=$(obj.button);}if(typeof obj.key=="string"){obj.key=getKeyCode(obj.key);}if(typeof obj.event!="string"){obj.event="click";}}}return obj;}function getItemIndex(num,dev,org,firstItem,totalItems,$cfs){if(typeof num=="string"){if(isNaN(num)){num=$(num);}else{num=parseInt(num);}}if(typeof num=="object"){if(typeof num.jquery=="undefined"){num=$(num);}num=getItems($cfs).index(num);if(num==-1){num=0;}if(typeof org!="boolean"){org=false;}}else{if(typeof org!="boolean"){org=true;}}if(isNaN(num)){num=0;}else{num=parseInt(num);}if(isNaN(dev)){dev=0;}else{dev=parseInt(dev);}if(org){num+=firstItem;}num+=dev;if(totalItems>0){while(num>=totalItems){num-=totalItems;}while(num<0){num+=totalItems;}}return num;}function getItems(c,f){var $i=$("> *",c);if(typeof f=="string"){$i=$i.filter(f);}return $i;}function getCurrentItems(i,o){return i.slice(0,o.items.visible);}function getOldItemsPrev(i,o,n){return i.slice(n,o.items.oldVisible+n);}function getNewItemsPrev(i,o){return i.slice(0,o.items.visible);}function getOldItemsNext(i,o){return i.slice(0,o.items.oldVisible);}function getNewItemsNext(i,o,n){return i.slice(n,o.items.visible+n);}function resetMargin(i,o,m){var x=(typeof m=="boolean")?m:false;if(typeof m!="number"){m=0;}i.each(function(){var t=parseInt($(this).css(o.d.marginRight));if(isNaN(t)){t=0;}$(this).data("cfs_tempCssMargin",t);$(this).css(o.d.marginRight,((x)?$(this).data("cfs_tempCssMargin"):m+$(this).data("cfs_origCssMargin")));});}function getSizes(i,o,wrapper){s1=getTotalSize(i,o,"width",wrapper);s2=getLargestSize(i,o,"height",wrapper);return[s1,s2];}function getLargestSize(i,o,dim,wrapper){if(typeof wrapper!="boolean"){wrapper=false;}if(typeof o[o.d[dim]]=="number"&&wrapper){return o[o.d[dim]];}if(typeof o.items[o.d[dim]]=="number"){return o.items[o.d[dim]];}var di2=(dim.toLowerCase().indexOf("width")>-1)?"outerWidth":"outerHeight";return getTrueLargestSize(i,o,di2);}function getTrueLargestSize(i,o,dim){var s=0;i.each(function(){var m=$(this)[o.d[dim]](true);if(s<m){s=m;}});return s;}function getTrueInnerSize($el,o,dim){var siz=$el[o.d[dim]](),arr=(o.d[dim].toLowerCase().indexOf("width")>-1)?["paddingLeft","paddingRight"]:["paddingTop","paddingBottom"];for(var a=0,l=arr.length;a<l;a++){var m=parseInt($el.css(arr[a]));if(isNaN(m)){m=0;}siz-=m;}return siz;}function getTotalSize(i,o,dim,wrapper){if(typeof wrapper!="boolean"){wrapper=false;}if(typeof o[o.d[dim]]=="number"&&wrapper){return o[o.d[dim]];}if(typeof o.items[o.d[dim]]=="number"){return o.items[o.d[dim]]*i.length;}var di2=(dim.toLowerCase().indexOf("width")>-1)?"outerWidth":"outerHeight";return getTotalSizeVariable(i,o,di2);}function getTotalSizeVariable(i,o,dim){var s=0;i.each(function(){var j=$(this);if(j.is(":visible")){s+=j[o.d[dim]](true);}});return s;}function hasVariableSizes(i,o,dim){var s=false,v=false;i.each(function(){c=$(this)[o.d[dim]](true);if(s===false){s=c;}else{if(s!=c){v=true;}}});return v;}function mapWrapperSizes(ws,o,p){if(typeof p!="boolean"){p=true;}var pad=(o.usePadding&&p)?o.padding:[0,0,0,0];var wra={};wra[o.d.width]=ws[0]+pad[1]+pad[3];wra[o.d.height]=ws[1]+pad[0]+pad[2];return wra;}function setSizes($c,o,p){var $w=$c.parent(),$i=getItems($c),$v=getCurrentItems($i,o),sz=mapWrapperSizes(getSizes($v,o,true),o,p);$w.css(sz);if(o.usePadding){var $l=$v.last();$l.css(o.d.marginRight,$l.data("cfs_origCssMargin")+o.padding[o.d[1]]);$c.css(o.d.top,o.padding[o.d[0]]);$c.css(o.d.left,o.padding[o.d[3]]);}$c.css(o.d.width,getTotalSize($i,o,"width")*2);$c.css(o.d.height,getLargestSize($i,o,"height"));return sz;}function getPadding(p){if(typeof p=="undefined"){return[0,0,0,0];}if(typeof p=="number"){return[p,p,p,p];}else{if(typeof p=="string"){p=p.split("px").join("").split(" ");}}if(!is_array(p)){return[0,0,0,0];}for(var i=0;i<4;i++){p[i]=parseInt(p[i]);}switch(p.length){case 0:return[0,0,0,0];case 1:return[p[0],p[0],p[0],p[0]];case 2:return[p[0],p[1],p[0],p[1]];case 3:return[p[0],p[1],p[2],p[1]];default:return[p[0],p[1],p[2],p[3]];}}function getAlignPadding(itm,o){var x=(typeof o[o.d.width]=="number")?Math.ceil(o[o.d.width]-getTotalSize(itm,o,"width")):0;switch(o.align){case"left":return[0,x];break;case"right":return[x,0];break;case"center":default:var x1=Math.ceil(x/2),x2=Math.floor(x/2);return[x1,x2];break;}}function getVisibleItemsPrev(items,o,nI){var total=0,start=o.items.visible-nI-1,x=0;if(start<0){start=items.length-1;}for(var a=start;a>=0;a--){total+=items.eq(a)[o.d.outerWidth](true);if(total>o.maxDimention){return getVisibleItemsAdjust(x,o);}if(a==0){a=items.length;}x++;}}function getVisibleItemsNext(items,o,nI){var total=0,x=0;for(var a=nI,l=items.length-1;a<=l;a++){total+=items.eq(a)[o.d.outerWidth](true);if(total>o.maxDimention){return getVisibleItemsAdjust(x,o);}if(a==items.length-1){a=-1;}x++;}}function getVisibleItemsAdjust(x,o){switch(o.visibleAdjust){case"+1":return x+1;break;case"-1":return x-1;break;case"odd":if(x%2==0){return x-1;}break;case"odd+":if(x%2==0){return x+1;}break;case"even":if(x%2==1){return x-1;}break;case"even+":if(x%2==1){return x+1;}break;default:return x;break;}}function is_array(a){return typeof(a)=="object"&&(a instanceof Array);}function debug(d,m){if(!d){return false;}if(typeof m=="string"){m="carouFredSel: "+m;}else{m=["carouFredSel:",m];}if(window.console&&window.console.log){window.console.log(m);}return false;}$.fn.caroufredsel=function(o){return this.carouFredSel(o);};})(jQuery);
