(function(a){a.fn.quickClear=function(b){return this.each(function(){var d=a(this);var e=d.attr("placeholder");var c=d.val();if(!d.val()){d.val(e)}d.bind("focus blur",function(f){if((d.val()=="")&&f.type=="blur"){d.val(e)}if(d.val()==e&&c!=e&&f.type=="focus"){d.val("")}});if(b){d.closest("form").submit(function(){if(d.val()==e&&c!=e){d.attr("disabled",true)}})}})}})(jQuery);
(function(a){a.fn.fixHeights=function(){return this.height("auto").height(Math.max.apply(this,a(this).map(function(b,c){return a(c).outerHeight()}).toArray())).each(function(){var b=a(this);b.height(b.height()-(b.outerHeight()-b.height()))})}})(jQuery);"use strict";(function($){$(document).ready(function(){var i;$(window).bind('resize scroll',function(event){for(i=0;i<$.fn.qtip.interfaces.length;i++){var api=$.fn.qtip.interfaces[i];if(api&&api.status&&api.status.rendered&&api.options.position.type!=='static'&&(api.options.position.adjust.scroll&&event.type==='scroll'||api.options.position.adjust.resize&&event.type==='resize')){api.updatePosition(event,true);}}});$(document).bind('mousedown.qtip',function(event){if($(event.target).parents('div.qtip').length===0){$('.qtip[unfocus]').each(function(){var api=$(this).qtip('api');if($(this).is(':visible')&&api&&api.status&&!api.status.disabled&&$(event.target).add(api.elements.target).length>1){api.hide(event);}});}});});function Corner(corner){if(!corner){return false;}
this.x=String(corner).replace(/middle/i,'center').match(/left|right|center/i)[0].toLowerCase();this.y=String(corner).replace(/middle/i,'center').match(/top|bottom|center/i)[0].toLowerCase();this.offset={left:0,top:0};this.precedance=(corner.charAt(0).search(/^(t|b)/)>-1)?'y':'x';this.string=function(){return(this.precedance==='y')?this.y+this.x:this.x+this.y;};}
function calculateTip(corner,width,height){var tips={bottomright:[[0,0],[width,height],[width,0]],bottomleft:[[0,0],[width,0],[0,height]],topright:[[0,height],[width,0],[width,height]],topleft:[[0,0],[0,height],[width,height]],topcenter:[[0,height],[width/2,0],[width,height]],bottomcenter:[[0,0],[width,0],[width/2,height]],rightcenter:[[0,0],[width,height/2],[0,height]],leftcenter:[[width,0],[width,height],[0,height/2]]};tips.lefttop=tips.bottomright;tips.righttop=tips.bottomleft;tips.leftbottom=tips.topright;tips.rightbottom=tips.topleft;return tips[corner];}
function calculateBorders(radius){var borders;if($('<canvas />').get(0).getContext){borders={topLeft:[radius,radius],topRight:[0,radius],bottomLeft:[radius,0],bottomRight:[0,0]};}
else if($.browser.msie){borders={topLeft:[-90,90,0],topRight:[-90,90,-radius],bottomLeft:[90,270,0],bottomRight:[90,270,-radius]};}
return borders;}
function jQueryStyle(style,sub){var styleObj,i;styleObj=$.extend(true,{},style);for(i in styleObj){if(sub===true&&(/(tip|classes)/i).test(i)){delete styleObj[i];}
else if(!sub&&(/(width|border|tip|title|classes|user)/i).test(i)){delete styleObj[i];}}
return styleObj;}
function sanitizeStyle(style){if(typeof style.tip!=='object'){style.tip={corner:style.tip};}
if(typeof style.tip.size!=='object'){style.tip.size={width:style.tip.size,height:style.tip.size};}
if(typeof style.border!=='object'){style.border={width:style.border};}
if(typeof style.width!=='object'){style.width={value:style.width};}
if(typeof style.width.max==='string'){style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"$1"),10);}
if(typeof style.width.min==='string'){style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"$1"),10);}
if(typeof style.tip.size.x==='number'){style.tip.size.width=style.tip.size.x;delete style.tip.size.x;}
if(typeof style.tip.size.y==='number'){style.tip.size.height=style.tip.size.y;delete style.tip.size.y;}
return style;}
function buildStyle(){var self,i,styleArray,styleExtend,finalStyle,ieAdjust;self=this;styleArray=[true,{}];for(i=0;i<arguments.length;i++){styleArray.push(arguments[i]);}
styleExtend=[$.extend.apply($,styleArray)];while(typeof styleExtend[0].name==='string'){styleExtend.unshift(sanitizeStyle($.fn.qtip.styles[styleExtend[0].name]));}
styleExtend.unshift(true,{classes:{tooltip:'qtip-'+(arguments[0].name||'defaults')}},$.fn.qtip.styles.defaults);finalStyle=$.extend.apply($,styleExtend);ieAdjust=($.browser.msie)?1:0;finalStyle.tip.size.width+=ieAdjust;finalStyle.tip.size.height+=ieAdjust;if(finalStyle.tip.size.width%2>0){finalStyle.tip.size.width+=1;}
if(finalStyle.tip.size.height%2>0){finalStyle.tip.size.height+=1;}
if(finalStyle.tip.corner===true){if(self.options.position.corner.tooltip==='center'&&self.options.position.corner.target==='center'){finalStyle.tip.corner=false;}
else{finalStyle.tip.corner=self.options.position.corner.tooltip;}}
return finalStyle;}
function drawBorder(canvas,coordinates,radius,color){var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);context.fill();}
function createBorder(){var self,i,width,radius,color,coordinates,containers,size,betweenWidth,betweenCorners,borderTop,borderBottom,borderCoord,sideWidth,vertWidth;self=this;self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove();width=self.options.style.border.width;radius=self.options.style.border.radius;color=self.options.style.border.color||self.options.style.tip.color;coordinates=calculateBorders(radius);containers={};for(i in coordinates){containers[i]='<div rel="'+i+'" style="'+((/Left/).test(i)?'left':'right')+':0; '+'position:absolute; height:'+radius+'px; width:'+radius+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if($('<canvas />').get(0).getContext){containers[i]+='<canvas height="'+radius+'" width="'+radius+'" style="vertical-align: top"></canvas>';}
else if($.browser.msie){size=radius*2+3;containers[i]+='<v:arc stroked="false" fillcolor="'+color+'" startangle="'+coordinates[i][0]+'" endangle="'+coordinates[i][1]+'" '+'style="width:'+size+'px; height:'+size+'px; margin-top:'+((/bottom/).test(i)?-2:-1)+'px; '+'margin-left:'+((/Right/).test(i)?coordinates[i][2]-3.5:-1)+'px; '+'vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';}
containers[i]+='</div>';}
betweenWidth=self.getDimensions().width-(Math.max(width,radius)*2);betweenCorners='<div class="qtip-betweenCorners" style="height:'+radius+'px; width:'+betweenWidth+'px; '+'overflow:hidden; background-color:'+color+'; line-height:0.1px; font-size:1px;">';borderTop='<div class="qtip-borderTop" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+containers.topLeft+containers.topRight+betweenCorners;self.elements.wrapper.prepend(borderTop);borderBottom='<div class="qtip-borderBottom" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+containers.bottomLeft+containers.bottomRight+betweenCorners;self.elements.wrapper.append(borderBottom);if($('<canvas />').get(0).getContext){self.elements.wrapper.find('canvas').each(function(){borderCoord=coordinates[$(this).parent('[rel]:first').attr('rel')];drawBorder.call(self,$(this),borderCoord,radius,color);});}
else if($.browser.msie){self.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');}
sideWidth=Math.max(radius,(radius+(width-radius)));vertWidth=Math.max(width-radius,0);self.elements.contentWrapper.css({border:'0px solid '+color,borderWidth:vertWidth+'px '+sideWidth+'px'});}
function drawTip(canvas,coordinates,color){var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.moveTo(coordinates[0][0],coordinates[0][1]);context.lineTo(coordinates[1][0],coordinates[1][1]);context.lineTo(coordinates[2][0],coordinates[2][1]);context.fill();}
function positionTip(corner){var self,ieAdjust,positionAdjust,paddingCorner,paddingSize,newMargin;self=this;if(self.options.style.tip.corner===false||!self.elements.tip){return;}
if(!corner){corner=new Corner(self.elements.tip.attr('rel'));}
ieAdjust=positionAdjust=($.browser.msie)?1:0;self.elements.tip.css(corner[corner.precedance],0);if(corner.precedance==='y'){if($.browser.msie){if(parseInt($.browser.version.charAt(0),10)===6){positionAdjust=corner.y==='top'?-3:1;}
else{positionAdjust=corner.y==='top'?1:2;}}
if(corner.x==='center'){self.elements.tip.css({left:'50%',marginLeft:-(self.options.style.tip.size.width/2)});}
else if(corner.x==='left'){self.elements.tip.css({left:self.options.style.border.radius-ieAdjust});}
else{self.elements.tip.css({right:self.options.style.border.radius+ieAdjust});}
if(corner.y==='top'){self.elements.tip.css({top:-positionAdjust});}
else{self.elements.tip.css({bottom:positionAdjust});}}
else{if($.browser.msie){positionAdjust=(parseInt($.browser.version.charAt(0),10)===6)?1:(corner.x==='left'?1:2);}
if(corner.y==='center'){self.elements.tip.css({top:'50%',marginTop:-(self.options.style.tip.size.height/2)});}
else if(corner.y==='top'){self.elements.tip.css({top:self.options.style.border.radius-ieAdjust});}
else{self.elements.tip.css({bottom:self.options.style.border.radius+ieAdjust});}
if(corner.x==='left'){self.elements.tip.css({left:-positionAdjust});}
else{self.elements.tip.css({right:positionAdjust});}}
paddingCorner='padding-'+corner[corner.precedance];paddingSize=self.options.style.tip.size[corner.precedance==='x'?'width':'height'];self.elements.tooltip.css('padding',0).css(paddingCorner,paddingSize);if($.browser.msie&&parseInt($.browser.version.charAt(0),6)===6){newMargin=parseInt(self.elements.tip.css('margin-top'),10)||0;newMargin+=parseInt(self.elements.content.css('margin-top'),10)||0;self.elements.tip.css({marginTop:newMargin});}}
function createTip(corner){var self,color,coordinates,coordsize,path,tip;self=this;if(self.elements.tip!==null){self.elements.tip.remove();}
color=self.options.style.tip.color||self.options.style.border.color;if(self.options.style.tip.corner===false){return;}
else if(!corner){corner=new Corner(self.options.style.tip.corner);}
coordinates=calculateTip(corner.string(),self.options.style.tip.size.width,self.options.style.tip.size.height);self.elements.tip='<div class="'+self.options.style.classes.tip+'" dir="ltr" rel="'+corner.string()+'" style="position:absolute; '+'height:'+self.options.style.tip.size.height+'px; width:'+self.options.style.tip.size.width+'px; '+'margin:0 auto; line-height:0.1px; font-size:1px;"></div>';self.elements.tooltip.prepend(self.elements.tip);if($('<canvas />').get(0).getContext){tip='<canvas height="'+self.options.style.tip.size.height+'" width="'+self.options.style.tip.size.width+'"></canvas>';}
else if($.browser.msie){coordsize=self.options.style.tip.size.width+','+self.options.style.tip.size.height;path='m'+coordinates[0][0]+','+coordinates[0][1];path+=' l'+coordinates[1][0]+','+coordinates[1][1];path+=' '+coordinates[2][0]+','+coordinates[2][1];path+=' xe';tip='<v:shape fillcolor="'+color+'" stroked="false" filled="true" path="'+path+'" coordsize="'+coordsize+'" '+'style="width:'+self.options.style.tip.size.width+'px; height:'+self.options.style.tip.size.height+'px; '+'line-height:0.1px; display:inline-block; behavior:url(#default#VML); '+'vertical-align:'+(corner.y==='top'?'bottom':'top')+'"></v:shape>';tip+='<v:image style="behavior:url(#default#VML);"></v:image>';self.elements.contentWrapper.css('position','relative');}
self.elements.tip=self.elements.tooltip.find('.'+self.options.style.classes.tip).eq(0);self.elements.tip.html(tip);if($('<canvas  />').get(0).getContext){drawTip.call(self,self.elements.tip.find('canvas:first'),coordinates,color);}
if(corner.y==='top'&&$.browser.msie&&parseInt($.browser.version.charAt(0),10)===6){self.elements.tip.css({marginTop:-4});}
positionTip.call(self,corner);}
function createTitle(){var self=this;if(self.elements.title!==null){self.elements.title.remove();}
self.elements.tooltip.attr('aria-labelledby','qtip-'+self.id+'-title');self.elements.title=$('<div id="qtip-'+self.id+'-title" class="'+self.options.style.classes.title+'"></div>').css(jQueryStyle(self.options.style.title,true)).css({zoom:($.browser.msie)?1:0}).prependTo(self.elements.contentWrapper);if(self.options.content.title.text){self.updateTitle.call(self,self.options.content.title.text);}
if(self.options.content.title.button!==false&&typeof self.options.content.title.button==='string'){self.elements.button=$('<a class="'+self.options.style.classes.button+'" role="button" style="float:right; position: relative"></a>').css(jQueryStyle(self.options.style.button,true)).html(self.options.content.title.button).prependTo(self.elements.title).click(function(event){if(!self.status.disabled){self.hide(event);}});}}
function assignEvents(){var self,showTarget,hideTarget,inactiveEvents;self=this;showTarget=self.options.show.when.target;hideTarget=self.options.hide.when.target;if(self.options.hide.fixed){hideTarget=hideTarget.add(self.elements.tooltip);}
inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove','mouseout','mouseenter','mouseleave','mouseover'];function inactiveMethod(event){if(self.status.disabled===true){return;}
clearTimeout(self.timers.inactive);self.timers.inactive=setTimeout(function(){$(inactiveEvents).each(function(){hideTarget.unbind(this+'.qtip-inactive');self.elements.content.unbind(this+'.qtip-inactive');});self.hide(event);},self.options.hide.delay);}
if(self.options.hide.fixed===true){self.elements.tooltip.bind('mouseover.qtip',function(){if(self.status.disabled===true){return;}
clearTimeout(self.timers.hide);});}
function showMethod(event){if(self.status.disabled===true){return;}
if(self.options.hide.when.event==='inactive'){$(inactiveEvents).each(function(){hideTarget.bind(this+'.qtip-inactive',inactiveMethod);self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);});inactiveMethod();}
clearTimeout(self.timers.show);clearTimeout(self.timers.hide);if(self.options.show.delay>0){self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);}
else{self.show(event);}}
function hideMethod(event){if(self.status.disabled===true){return;}
if(self.options.hide.fixed===true&&(/mouse(out|leave)/i).test(self.options.hide.when.event)&&$(event.relatedTarget).parents('div.qtip[id^="qtip"]').length>0){event.stopPropagation();event.preventDefault();clearTimeout(self.timers.hide);return false;}
clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.elements.tooltip.stop(true,true);self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);}
if(self.options.position.target==='mouse'&&self.options.position.type!=='static'){showTarget.bind('mousemove.qtip',function(event){self.cache.mouse={left:event.pageX,top:event.pageY};if(self.status.disabled===false&&self.options.position.adjust.mouse===true&&self.options.position.type!=='static'&&self.elements.tooltip.css('display')!=='none'){self.updatePosition(event);}});}
if((self.options.show.when.target.add(self.options.hide.when.target).length===1&&self.options.show.when.event===self.options.hide.when.event&&self.options.hide.when.event!=='inactive')||self.options.hide.when.event==='unfocus'){self.cache.toggle=0;showTarget.bind(self.options.show.when.event+'.qtip',function(event){if(self.cache.toggle===0){showMethod(event);}
else{hideMethod(event);}});}
else{showTarget.bind(self.options.show.when.event+'.qtip',showMethod);if(self.options.hide.when.event!=='inactive'){hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);}}
if((/(fixed|absolute)/).test(self.options.position.type)){self.elements.tooltip.bind('mouseover.qtip',self.focus);}}
function bgiframe(){var self,html,dimensions;self=this;dimensions=self.getDimensions();html='<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:'+dimensions.height+'px; width:'+dimensions.width+'px" />';self.elements.bgiframe=self.elements.wrapper.prepend(html).children('.qtip-bgiframe:first');}
function construct(){var self,content,url,data,method;self=this;self.beforeRender.call(self);self.status.rendered=2;self.elements.tooltip='<div qtip="'+self.id+'" id="qtip-'+self.id+'" role="tooltip" '+'aria-describedby="qtip-'+self.id+'-content" class="qtip '+(self.options.style.classes.tooltip||self.options.style)+'" '+'style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0; position:'+self.options.position.type+';"> '+'  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;"> '+'    <div class="qtip-contentWrapper" style="overflow:hidden;"> '+'       <div id="qtip-'+self.id+'-content" class="qtip-content '+self.options.style.classes.content+'"></div> '+'</div></div></div>';self.elements.tooltip=$(self.elements.tooltip);self.elements.tooltip.appendTo(self.options.position.container);self.elements.tooltip.data('qtip',{current:0,interfaces:[self]});self.elements.wrapper=self.elements.tooltip.children('div:first');self.elements.contentWrapper=self.elements.wrapper.children('div:first');self.elements.content=self.elements.contentWrapper.children('div:first').css(jQueryStyle(self.options.style));if($.browser.msie){self.elements.wrapper.add(self.elements.content).css({zoom:1});}
if(self.options.hide.when.event==='unfocus'){self.elements.tooltip.attr('unfocus',true);}
if(typeof self.options.style.width.value==='number'){self.updateWidth();}
if($('<canvas />').get(0).getContext||$.browser.msie){if(self.options.style.border.radius>0){createBorder.call(self);}
else{self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});}
if(self.options.style.tip.corner!==false){createTip.call(self);}}
else{self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});self.options.style.border.radius=0;self.options.style.tip.corner=false;}
if((typeof self.options.content.text==='string'&&self.options.content.text.length>0)||(self.options.content.text.jquery&&self.options.content.text.length>0)){content=self.options.content.text;}
else{content=' ';}
if(self.options.content.title.text!==false){createTitle.call(self);}
self.updateContent(content,false);assignEvents.call(self);if(self.options.show.ready===true){self.show();}
if(self.options.content.url!==false){url=self.options.content.url;data=self.options.content.data;method=self.options.content.method||'get';self.loadContent(url,data,method);}
self.status.rendered=true;self.onRender.call(self);}
function QTip(target,options,id){var self=this;self.id=id;self.options=options;self.status={animated:false,rendered:false,disabled:false,focused:false};self.elements={target:target.addClass(self.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};self.cache={attr:false,mouse:{},toggle:0,overflow:{left:false,top:false}};self.timers={};$.extend(self,self.options.api,{show:function(event){var returned,solo;if(!self.status.rendered){return false;}
if(self.elements.tooltip.css('display')!=='none'){return self;}
self.elements.tooltip.stop(true,false);returned=self.beforeShow.call(self,event);if(returned===false){return self;}
function afterShow(){self.elements.tooltip.attr('aria-hidden',true);if(self.options.position.type!=='static'){self.focus();}
self.onShow.call(self,event);if($.browser.msie){self.elements.tooltip.get(0).style.removeAttribute('filter');}
self.elements.tooltip.css({opacity:''});}
self.cache.toggle=1;if(self.options.position.type!=='static'){self.updatePosition(event,(self.options.show.effect.length>0&&self.rendered!==2));}
if(typeof self.options.show.solo==='object'){solo=$(self.options.show.solo);}
else if(self.options.show.solo===true){solo=$('div.qtip').not(self.elements.tooltip);}
if(solo){solo.each(function(){if($(this).qtip('api').status.rendered===true){$(this).qtip('api').hide();}});}
if(typeof self.options.show.effect.type==='function'){self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);self.elements.tooltip.queue(function(){afterShow();$(this).dequeue();});}
else{switch(self.options.show.effect.type.toLowerCase()){case'fade':self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);break;case'slide':self.elements.tooltip.slideDown(self.options.show.effect.length,function(){afterShow();if(self.options.position.type!=='static'){self.updatePosition(event,true);}});break;case'grow':self.elements.tooltip.show(self.options.show.effect.length,afterShow);break;default:self.elements.tooltip.show(null,afterShow);break;}
self.elements.tooltip.addClass(self.options.style.classes.active);}
return self;},hide:function(event){var returned;if(!self.status.rendered){return false;}
else if(self.elements.tooltip.css('display')==='none'){return self;}
clearTimeout(self.timers.show);self.elements.tooltip.stop(true,false);returned=self.beforeHide.call(self,event);if(returned===false){return self;}
function afterHide(){self.elements.tooltip.attr('aria-hidden',true);self.elements.tooltip.css({opacity:''});self.onHide.call(self,event);}
self.cache.toggle=0;if(typeof self.options.hide.effect.type==='function'){self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);self.elements.tooltip.queue(function(){afterHide();$(this).dequeue();});}
else{switch(self.options.hide.effect.type.toLowerCase()){case'fade':self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);break;case'slide':self.elements.tooltip.slideUp(self.options.hide.effect.length,afterHide);break;case'grow':self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);break;default:self.elements.tooltip.hide(null,afterHide);break;}
self.elements.tooltip.removeClass(self.options.style.classes.active);}
return self;},toggle:function(event,state){var condition=/boolean|number/.test(typeof state)?state:!self.elements.tooltip.is(':visible');self[condition?'show':'hide'](event);return self;},updatePosition:function(event,animate){if(!self.status.rendered){return false;}
var posOptions=options.position,target=$(posOptions.target),elemWidth=self.elements.tooltip.outerWidth(),elemHeight=self.elements.tooltip.outerHeight(),targetWidth,targetHeight,position,my=posOptions.corner.tooltip,at=posOptions.corner.target,returned,coords,i,mapName,imagePos,adapt={left:function(){var leftEdge=$(window).scrollLeft(),rightEdge=$(window).width()+$(window).scrollLeft(),myOffset=my.x==='center'?elemWidth/2:elemWidth,atOffset=my.x==='center'?targetWidth/2:targetWidth,borderAdjust=(my.x==='center'?1:2)*self.options.style.border.radius,offset=-2*posOptions.adjust.x,pRight=position.left+elemWidth,adj;if(pRight>rightEdge){adj=offset-myOffset-atOffset+borderAdjust;if(position.left+adj>leftEdge||leftEdge-(position.left+adj)<pRight-rightEdge){return{adjust:adj,tip:'right'};}}
if(position.left<leftEdge){adj=offset+myOffset+atOffset-borderAdjust;if(pRight+adj<rightEdge||pRight+adj-rightEdge<leftEdge-position.left){return{adjust:adj,tip:'left'};}}
return{adjust:0,tip:my.x};},top:function(){var topEdge=$(window).scrollTop(),bottomEdge=$(window).height()+$(window).scrollTop(),myOffset=my.y==='center'?elemHeight/2:elemHeight,atOffset=my.y==='center'?targetHeight/2:targetHeight,borderAdjust=(my.y==='center'?1:2)*self.options.style.border.radius,offset=-2*posOptions.adjust.y,pBottom=position.top+elemHeight,adj;if(pBottom>bottomEdge){adj=offset-myOffset-atOffset+borderAdjust;if(position.top+adj>topEdge||topEdge-(position.top+adj)<pBottom-bottomEdge){return{adjust:adj,tip:'bottom'};}}
if(position.top<topEdge){adj=offset+myOffset+atOffset-borderAdjust;if(pBottom+adj<bottomEdge||pBottom+adj-bottomEdge<topEdge-position.top){return{adjust:adj,tip:'top'};}}
return{adjust:0,tip:my.y};}};if(event&&options.position.target==='mouse'){at={x:'left',y:'top'};targetWidth=targetHeight=0;if(!event.pageX){position=self.cache.mouse;}
else{position={top:event.pageY,left:event.pageX};}}
else{if(target[0]===document){targetWidth=target.width();targetHeight=target.height();position={top:0,left:0};}
else if(target[0]===window){targetWidth=target.width();targetHeight=target.height();position={top:target.scrollTop(),left:target.scrollLeft()};}
else if(target.is('area')){coords=self.options.position.target.attr('coords').split(',');for(i=0;i<coords.length;i++){coords[i]=parseInt(coords[i],10);}
mapName=self.options.position.target.parent('map').attr('name');imagePos=$('img[usemap="#'+mapName+'"]:first').offset();target.position={left:Math.floor(imagePos.left+coords[0]),top:Math.floor(imagePos.top+coords[1])};switch(self.options.position.target.attr('shape').toLowerCase()){case'rect':targetWidth=Math.ceil(Math.abs(coords[2]-coords[0]));targetHeight=Math.ceil(Math.abs(coords[3]-coords[1]));break;case'circle':targetWidth=coords[2]+1;targetHeight=coords[2]+1;break;case'poly':targetWidth=coords[0];targetHeight=coords[1];for(i=0;i<coords.length;i++){if(i%2===0){if(coords[i]>targetWidth){targetWidth=coords[i];}
if(coords[i]<coords[0]){position.left=Math.floor(imagePos.left+coords[i]);}}
else{if(coords[i]>targetHeight){targetHeight=coords[i];}
if(coords[i]<coords[1]){position.top=Math.floor(imagePos.top+coords[i]);}}}
targetWidth=targetWidth-(position.left-imagePos.left);targetHeight=targetHeight-(position.top-imagePos.top);break;}
targetWidth-=2;targetHeight-=2;}
else{targetWidth=target.outerWidth();targetHeight=target.outerHeight();position=target.offset();}
position.left+=at.x==='right'?targetWidth:at.x==='center'?targetWidth/2:0;position.top+=at.y==='bottom'?targetHeight:at.y==='center'?targetHeight/2:0;}
position.left+=posOptions.adjust.x+(my.x==='right'?-elemWidth:my.x==='center'?-elemWidth/2:0);position.top+=posOptions.adjust.y+(my.y==='bottom'?-elemHeight:my.y==='center'?-elemHeight/2:0);if(self.options.style.border.radius>0){if(my.x==='left'){position.left-=self.options.style.border.radius;}
else if(my.x==='right'){position.left+=self.options.style.border.radius;}
if(my.y==='top'){position.top-=self.options.style.border.radius;}
else if(my.y==='bottom'){position.top+=self.options.style.border.radius;}}
if(posOptions.adjust.screen){(function(){var adjusted={x:0,y:0},adapted={x:adapt.left(),y:adapt.top()},tip=new Corner(options.style.tip.corner);if(self.elements.tip&&tip){if(adapted.y.adjust!==0){position.top+=adapted.y.adjust;tip.y=adjusted.y=adapted.y.tip;}
if(adapted.x.adjust!==0){position.left+=adapted.x.adjust;tip.x=adjusted.x=adapted.x.tip;}
self.cache.overflow={left:adjusted.x===false,top:adjusted.y===false};if(self.elements.tip.attr('rel')!==tip.string()){createTip.call(self,tip);}}}());}
if(!self.elements.bgiframe&&$.browser.msie&&parseInt($.browser.version.charAt(0),10)===6){bgiframe.call(self);}
returned=self.beforePositionUpdate.call(self,event);if(returned===false){return self;}
if(options.position.target!=='mouse'&&animate===true){self.status.animated=true;self.elements.tooltip.stop().animate(position,200,'swing',function(){self.status.animated=false;});}
else{self.elements.tooltip.css(position);}
self.onPositionUpdate.call(self,event);return self;},updateWidth:function(newWidth){if(!self.status.rendered||(newWidth&&typeof newWidth!=='number')){return false;}
var hidden=self.elements.contentWrapper.siblings().add(self.elements.tip).add(self.elements.button),zoom=self.elements.wrapper.add(self.elements.contentWrapper.children()),tooltip=self.elements.tooltip,max=self.options.style.width.max,min=self.options.style.width.min;if(!newWidth){if(typeof self.options.style.width.value==='number'){newWidth=self.options.style.width.value;}
else{self.elements.tooltip.css({width:'auto'});hidden.hide();tooltip.width(newWidth);if($.browser.msie){zoom.css({zoom:''});}
newWidth=self.getDimensions().width;if(!self.options.style.width.value){newWidth=Math.min(Math.max(newWidth,min),max);}}}
if(newWidth%2){newWidth+=1;}
self.elements.tooltip.width(newWidth);hidden.show();if(self.options.style.border.radius){self.elements.tooltip.find('.qtip-betweenCorners').each(function(i){$(this).width(newWidth-(self.options.style.border.radius*2));});}
if($.browser.msie){zoom.css({zoom:1});self.elements.wrapper.width(newWidth);if(self.elements.bgiframe){self.elements.bgiframe.width(newWidth).height(self.getDimensions.height);}}
return self;},updateStyle:function(name){var tip,borders,context,corner,coordinates;if(!self.status.rendered||typeof name!=='string'||!$.fn.qtip.styles[name]){return false;}
self.options.style=buildStyle.call(self,$.fn.qtip.styles[name],self.options.user.style);self.elements.content.css(jQueryStyle(self.options.style));if(self.options.content.title.text!==false){self.elements.title.css(jQueryStyle(self.options.style.title,true));}
self.elements.contentWrapper.css({borderColor:self.options.style.border.color});if(self.options.style.tip.corner!==false){if($('<canvas />').get(0).getContext){tip=self.elements.tooltip.find('.qtip-tip canvas:first');context=tip.get(0).getContext('2d');context.clearRect(0,0,300,300);corner=tip.parent('div[rel]:first').attr('rel');coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);drawTip.call(self,tip,coordinates,self.options.style.tip.color||self.options.style.border.color);}
else if($.browser.msie){tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color);}}
if(self.options.style.border.radius>0){self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color});if($('<canvas />').get(0).getContext){borders=calculateBorders(self.options.style.border.radius);self.elements.tooltip.find('.qtip-wrapper canvas').each(function(){context=$(this).get(0).getContext('2d');context.clearRect(0,0,300,300);corner=$(this).parent('div[rel]:first').attr('rel');drawBorder.call(self,$(this),borders[corner],self.options.style.border.radius,self.options.style.border.color);});}
else if($.browser.msie){self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){$(this).attr('fillcolor',self.options.style.border.color);});}}
return self;},updateContent:function(content,reposition){var parsedContent,images,loadedImages;function afterLoad(){self.updateWidth();if(reposition!==false){if(self.options.position.type!=='static'){self.updatePosition(self.elements.tooltip.is(':visible'),true);}
if(self.options.style.tip.corner!==false){positionTip.call(self);}}}
if(!self.status.rendered||!content){return false;}
parsedContent=self.beforeContentUpdate.call(self,content);if(typeof parsedContent==='string'){content=parsedContent;}
else if(parsedContent===false){return;}
if($.browser.msie){self.elements.contentWrapper.children().css({zoom:'normal'});}
if(content.jquery&&content.length>0){content.clone(true).appendTo(self.elements.content).show();}
else{self.elements.content.html(content);}
images=self.elements.content.find('img[complete=false]');if(images.length>0){loadedImages=0;images.each(function(i){$('<img src="'+$(this).attr('src')+'" />').load(function(){if(++loadedImages===images.length){afterLoad();}});});}
else{afterLoad();}
self.onContentUpdate.call(self);return self;},loadContent:function(url,data,method){var returned;function setupContent(content){self.onContentLoad.call(self);self.updateContent(content);}
if(!self.status.rendered){return false;}
returned=self.beforeContentLoad.call(self);if(returned===false){return self;}
if(method==='post'){$.post(url,data,setupContent);}
else{$.get(url,data,setupContent);}
return self;},updateTitle:function(content){var returned;if(!self.status.rendered||!content){return false;}
returned=self.beforeTitleUpdate.call(self);if(returned===false){return self;}
if(self.elements.button){self.elements.button=self.elements.button.clone(true);}
self.elements.title.html(content);if(self.elements.button){self.elements.title.prepend(self.elements.button);}
self.onTitleUpdate.call(self);return self;},focus:function(event){var curIndex,newIndex,elemIndex,returned;if(!self.status.rendered||self.options.position.type==='static'){return false;}
curIndex=parseInt(self.elements.tooltip.css('z-index'),10);newIndex=15000+$('div.qtip[id^="qtip"]').length-1;if(!self.status.focused&&curIndex!==newIndex){returned=self.beforeFocus.call(self,event);if(returned===false){return self;}
$('div.qtip[id^="qtip"]').not(self.elements.tooltip).each(function(){if($(this).qtip('api').status.rendered===true){elemIndex=parseInt($(this).css('z-index'),10);if(typeof elemIndex==='number'&&elemIndex>-1){$(this).css({zIndex:parseInt($(this).css('z-index'),10)-1});}
$(this).qtip('api').status.focused=false;}});self.elements.tooltip.css({zIndex:newIndex});self.status.focused=true;self.onFocus.call(self,event);}
return self;},disable:function(state){self.status.disabled=state?true:false;return self;},destroy:function(){var i,returned,interfaces,oldattr=self.elements.target.data('old'+self.cache.attr[0]);returned=self.beforeDestroy.call(self);if(returned===false){return self;}
if(self.status.rendered){self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);self.options.show.when.target.unbind('mouseout.qtip',self.hide);self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind('mouseover.qtip',self.focus);self.elements.tooltip.remove();}
else{self.options.show.when.target.unbind(self.options.show.when.event+'.qtip-'+self.id+'-create');}
if(typeof self.elements.target.data('qtip')==='object'){interfaces=self.elements.target.data('qtip').interfaces;if(typeof interfaces==='object'&&interfaces.length>0){for(i=0;i<interfaces.length-1;i++){if(interfaces[i].id===self.id){interfaces.splice(i,1);}}}}
$.fn.qtip.interfaces.splice(self.id,1);if(typeof interfaces==='object'&&interfaces.length>0){self.elements.target.data('qtip').current=interfaces.length-1;}
else{self.elements.target.removeData('qtip');}
if(oldattr){self.elements.target.attr(self.cache.attr[0],oldattr);}
self.onDestroy.call(self);return self.elements.target;},getPosition:function(){var show,offset;if(!self.status.rendered){return false;}
show=(self.elements.tooltip.css('display')!=='none')?false:true;if(show){self.elements.tooltip.css({visiblity:'hidden'}).show();}
offset=self.elements.tooltip.offset();if(show){self.elements.tooltip.css({visiblity:'visible'}).hide();}
return offset;},getDimensions:function(){var show,dimensions;if(!self.status.rendered){return false;}
show=(!self.elements.tooltip.is(':visible'))?true:false;if(show){self.elements.tooltip.css({visiblity:'hidden'}).show();}
dimensions={height:self.elements.tooltip.outerHeight(),width:self.elements.tooltip.outerWidth()};if(show){self.elements.tooltip.css({visiblity:'visible'}).hide();}
return dimensions;}});}
$.fn.qtip=function(options,blanket){var i,id,interfaces,opts,obj,command,config,api;if(typeof options==='string'){if($(this).data('qtip')){if(options==='api'){return $(this).data('qtip').interfaces[$(this).data('qtip').current];}
else if(options==='interfaces'){return $(this).data('qtip').interfaces;}}
else{return $(this);}}
else{if(!options){options={};}
if(typeof options.content!=='object'||(options.content.jquery&&options.content.length>0)){options.content={text:options.content};}
if(typeof options.content.title!=='object'){options.content.title={text:options.content.title};}
if(typeof options.position!=='object'){options.position={corner:options.position};}
if(typeof options.position.corner!=='object'){options.position.corner={target:options.position.corner,tooltip:options.position.corner};}
if(typeof options.show!=='object'){options.show={when:options.show};}
if(typeof options.show.when!=='object'){options.show.when={event:options.show.when};}
if(typeof options.show.effect!=='object'){options.show.effect={type:options.show.effect};}
if(typeof options.hide!=='object'){options.hide={when:options.hide};}
if(typeof options.hide.when!=='object'){options.hide.when={event:options.hide.when};}
if(typeof options.hide.effect!=='object'){options.hide.effect={type:options.hide.effect};}
if(typeof options.style!=='object'){options.style={name:options.style};}
options.style=sanitizeStyle(options.style);opts=$.extend(true,{},$.fn.qtip.defaults,options);opts.style=buildStyle.call({options:opts},opts.style);opts.user=$.extend(true,{},options);}
return $(this).each(function()
{var self=$(this),content=false;if(typeof options==='string'){command=options.toLowerCase();interfaces=$(this).qtip('interfaces');if(typeof interfaces==='object'){if(blanket===true&&command==='destroy'){for(i=interfaces.length-1;i>-1;i--){if('object'===typeof interfaces[i]){interfaces[i].destroy();}}}
else{if(blanket!==true){interfaces=[$(this).qtip('api')];}
for(i=0;i<interfaces.length;i++){if(command==='destroy'){interfaces[i].destroy();}
else if(interfaces[i].status.rendered===true){if(command==='show'){interfaces[i].show();}
else if(command==='hide'){interfaces[i].hide();}
else if(command==='focus'){interfaces[i].focus();}
else if(command==='disable'){interfaces[i].disable(true);}
else if(command==='enable'){interfaces[i].disable(false);}
else if(command==='update'){interfaces[i].updatePosition();}}}}}}
else{config=$.extend(true,{},opts);config.hide.effect.length=opts.hide.effect.length;config.show.effect.length=opts.show.effect.length;if(config.position.container===false){config.position.container=$(document.body);}
if(config.position.target===false){config.position.target=$(this);}
if(config.show.when.target===false){config.show.when.target=$(this);}
if(config.hide.when.target===false){config.hide.when.target=$(this);}
config.position.corner.tooltip=new Corner(config.position.corner.tooltip);config.position.corner.target=new Corner(config.position.corner.target);if(!config.content.text.length){$(['title','alt']).each(function(i,attr){var val=self.attr(attr);if(val&&val.length){content=[attr,val];self.data('old'+attr,val).removeAttr(attr);config.content.text=val.replace(/\n/gi,'<br />');return false;}});}
id=$.fn.qtip.interfaces.length;for(i=0;i<id;i++){if(typeof $.fn.qtip.interfaces[i]==='undefined'){id=i;break;}}
obj=new QTip($(this),config,id);$.fn.qtip.interfaces[id]=obj;obj.cache.attr=content;if(typeof $(this).data('qtip')==='object'&&$(this).data('qtip')){if(typeof $(this).attr('qtip')==='undefined'){$(this).data('qtip').current=$(this).data('qtip').interfaces.length;}
$(this).data('qtip').interfaces.push(obj);}
else{$(this).data('qtip',{current:0,interfaces:[obj]});}
if(config.content.prerender===false&&config.show.when.event!==false&&config.show.ready!==true){config.show.when.target.bind(config.show.when.event+'.qtip-'+id+'-create',{qtip:id},function(event){api=$.fn.qtip.interfaces[event.data.qtip];api.options.show.when.target.unbind(api.options.show.when.event+'.qtip-'+event.data.qtip+'-create');api.cache.mouse={left:event.pageX,top:event.pageY};construct.call(api);api.options.show.when.target.trigger(api.options.show.when.event);});}
else{obj.cache.mouse={left:config.show.when.target.offset().left,top:config.show.when.target.offset().top};construct.call(obj);}}});};$.fn.qtip.interfaces=[];$.fn.qtip.fn={attr:$.fn.attr};$.fn.attr=function(attr){var api=$(this).qtip('api');return(arguments.length===1&&(/title|alt/i).test(attr)&&api.status&&api.status.rendered===true)?$(this).data('old'+api.cache.attr[0]):$.fn.qtip.fn.attr.apply(this,arguments);};$.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(){}}};$.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));
(function($){var ver="2.94";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,slideResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(!rev===true?1:0));$(next).css("zIndex",opts.slideCount+(!rev===true?0:1));});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:1,display:"block"};opts.cssAfter={zIndex:0};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
(function(a){a.fn.quickResponse=function(e,d,b){a('<p class="'+e+'">'+d+"</p>").prependTo(this).hide().slideDown().delay(b||2500).slideUp(function(){a(this).remove()});return this}})(jQuery);;(function($){$.rpPopup={'version':"0.9.3"};var $backgroundDiv;var $closeButton;var $popupCont;var popupActive=false;$.rpPopup.defaults={modal:false,popupWidth:null,popupHeight:null,backgroundOpacity:0.7,popupId:"rp_popup_cont",loader:"<img src=\"/graphics/rp-popup/ajax_loader.gif\" />",content:"",validationUrl:"",callback:{onOpen:null,onClose:null,onError:null,onSuccess:null},inputParentRow:".form_row",invalidRowClass:"invalid_row",errorClass:"error",closeButton:{content:"Close",hidden:false,id:"rp_close_button"},hideFlash:false};$.fn.rpPopup=function(opts)
{var options=$.extend(true,{},$.rpPopup.defaults,opts);var $this=$(this);$this.click(function()
{openPopup(options);return false;});};function openPopup(options)
{if(!popupActive)
{$backgroundDiv=$('<div id="rp_popup_background" />').appendTo($(document.body)).css({"opacity":options.backgroundOpacity});$popupCont=$('<div id="'+options.popupId+'" />').appendTo($(document.body));$backgroundDiv.click(function()
{if(!options.modal)
$.rpPopup.close(options.callback.onClose,options.hideFlash);return false;});$(window).resize(function()
{if(popupActive)
{centrePopup(options.popupWidth,options.popupHeight);}});(options.hideFlash)?$('object, embed').css('visibility',"hidden"):null;popupActive=true;$backgroundDiv.fadeIn("fast");$popupCont.css({"display":"block","opacity":0}).animate({opacity:1},"fast");}
var $loader=$(options.loader);$popupCont.html($loader);centrePopup(options.popupWidth,options.popupHeight);if(options.content)
{$popupCont.load(options.content,function(data)
{$closeButton=$('<a id="'+options.closeButton.id+'" href="#">'+options.closeButton.content+'</a>');if(!options.closeButton.hidden)
$closeButton.appendTo($popupCont);$closeButton.click(function()
{$.rpPopup.close(options.callback.onClose,options.hideFlash);return false;});$closeButton.fadeIn("fast");var $content=$(data);if($content.find("form").length>0)
{var $form=$("#"+$content.find("form").attr("id"));$form.submit(function(event)
{$content.prepend($loader);centrePopup(options.popupWidth,options.popupHeight);if(options.validationUrl)
{$.post(options.validationUrl,$form.serialize(),function(response){$(options.inputParentRow).removeClass(options.invalidRowClass);$form.find("."+options.errorClass).remove();$loader.remove();if(response.status=="error")
{if(response.errors)
{$.each(response.errors,function(key){$('#'+key).parents(options.inputParentRow).addClass(options.invalidRowClass);});}
$form.prepend(response.feedback);(options.callback.onError)?options.callback.onError():null;}
else
{(options.callback.onSuccess)?options.callback.onSuccess():null;if(response.feedback)
$form.before(response.feedback).remove();}
centrePopup(options.popupWidth,options.popupHeight);},"json");}
else
{debug("No validationUrl supplied");};return false;});}
centrePopup(options.popupWidth,options.popupHeight);(options.callback.onOpen)?options.callback.onOpen():null;});}
else
{$popupCont.html("<p style=\"background:#fff;padding:10px;width:150px;text-align:center\">No content can be loaded</p>");centrePopup(150,100);debug("No content to load");}}
$.rpPopup.open=function(opts)
{var options=$.extend(true,{},$.rpPopup.defaults,opts);openPopup(options);}
$.rpPopup.close=function(callBack,hideFlash)
{(hideFlash)?$('object, embed').css('visibility',"visible"):null;if(popupActive)
{popupActive=false;$backgroundDiv.fadeOut("fast");$popupCont.fadeOut("fast");$closeButton.fadeOut("fast",function(){$backgroundDiv.remove();$popupCont.remove();$closeButton.remove();(callBack)?callBack():null;});}}
centrePopup=function(pW,pH)
{var popupWidth=pW?parseInt(pW):$popupCont.children().outerWidth();var popupHeight=pH?parseInt(pH):$popupCont.children().outerHeight();var windowWidth=document.documentElement.clientWidth;var windowHeight=document.documentElement.clientHeight;$popupCont.css({"top":windowHeight/2-popupHeight/2,"left":windowWidth/2-popupWidth/2});$backgroundDiv.css({"height":windowHeight});}
function debug(value)
{if(window.console&&window.console.log)
{console.log(value);}}})(jQuery);
