/*!
 * jQuery Cycle Plugin (with Transition Definitions), modified
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.88 (08-JUN-2010)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.2.6 or later
 *
 * Mechanism for deleting slides added by Stuart Basden http://t.apio.ca/ 2010
 */
(function(d){function h(a){d.fn.cycle.debug&&o(a)}function o(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function e(a,b,f){function k(n,m,q){if(!n&&m===true){n=d(q).data("cycle.opts");if(!n){o("options not found, can not resume");return false}if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}w(n.elements,n,1,!j.rev&&!j.backwards)}}if(a.cycleStop==undefined)a.cycleStop=0;if(b===undefined||b===null)b={};if(b.constructor== String){switch(b){case "destroy":case "stop":var j=d(a).data("cycle.opts");if(!j)return false;a.cycleStop++;a.cycleTimeout&&clearTimeout(a.cycleTimeout);a.cycleTimeout=0;d(a).removeData("cycle.opts");b=="destroy"&&i(j);return false;case "toggle":a.cyclePause=a.cyclePause===1?0:1;k(a.cyclePause,f,a);return false;case "pause":a.cyclePause=1;return false;case "resume":a.cyclePause=0;k(false,f,a);return false;case "prev":case "next":j=d(a).data("cycle.opts");if(!j){o('options not found, "prev/next" ignored'); return false}d.fn.cycle[b](j);return false;default:b={fx:b}}return b}else if(b.constructor==Number){var c=b;b=d(a).data("cycle.opts");if(!b){o("options not found, can not advance slide");return false}if(c<0||c>=b.elements.length){o("invalid slide index: "+c);return false}b.nextSlide=c;if(a.cycleTimeout){clearTimeout(a.cycleTimeout);a.cycleTimeout=0}if(typeof f=="string")b.oneTimeFx=f;w(b.elements,b,1,c>=b.currSlide);return false}return b}function l(a,b){if(!d.support.opacity&&b.cleartype&&a.style.filter)try{a.style.removeAttribute("filter")}catch(f){}} function i(a){a.next&&d(a.next).unbind(a.prevNextEvent);a.prev&&d(a.prev).unbind(a.prevNextEvent);if(a.pager||a.pagerAnchorBuilder)d.each(a.pagerAnchors||[],function(){this.unbind().remove()});a.pagerAnchors=null;a.destroy&&a.destroy(a)}function g(a,b,f,k,j){var c=d.extend({},d.fn.cycle.defaults,k||{},d.metadata?a.metadata():d.meta?a.data():{});if(c.autostop)c.countdown=c.autostopCount||f.length;var n=a[0];a.data("cycle.opts",c);c.$cont=a;c.stopCount=n.cycleStop;c.elements=f;c.before=c.before?[c.before]: [];c.after=c.after?[c.after]:[];c.after.unshift(function(){c.busy=0});!d.support.opacity&&c.cleartype&&c.after.push(function(){l(this,c)});c.continuous&&c.after.push(function(){w(f,c,0,!c.rev&&!c.backwards)});r(c);!d.support.opacity&&c.cleartype&&!c.cleartypeNoBg&&B(b);a.css("position")=="static"&&a.css("position","relative");c.width&&a.width(c.width);c.height&&c.height!="auto"&&a.height(c.height);if(c.startingSlide)c.startingSlide=parseInt(c.startingSlide);else if(c.backwards)c.startingSlide=f.length- 1;if(c.random){c.randomMap=[];for(n=0;n<f.length;n++)c.randomMap.push(n);c.randomMap.sort(function(){return Math.random()-0.5});c.randomIndex=1;c.startingSlide=c.randomMap[1]}else if(c.startingSlide>=f.length)c.startingSlide=0;c.currSlide=c.startingSlide||0;var m=c.startingSlide;b.css({position:"absolute",top:0,left:0}).hide().each(function(u){u=c.backwards?m?u<=m?f.length+(u-m):m-u:f.length-u:m?u>=m?f.length-(u-m):m-u:f.length-u;d(this).css("z-index",u)});d(f[m]).css("opacity",1).show();l(f[m],c); c.fit&&c.width&&b.width(c.width);c.fit&&c.height&&c.height!="auto"&&b.height(c.height);if(c.containerResize&&!a.innerHeight()){for(var q=n=0,y=0;y<f.length;y++){var z=d(f[y]),C=z[0],D=z.outerWidth(),E=z.outerHeight();D||(D=C.offsetWidth||C.width||z.attr("width"));E||(E=C.offsetHeight||C.height||z.attr("height"));n=D>n?D:n;q=E>q?E:q}n>0&&q>0&&a.css({width:n+"px",height:q+"px"})}c.pause&&a.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(s(c)===false)return false;var F=false;k.requeueAttempts= k.requeueAttempts||0;b.each(function(){var u=d(this);this.cycleH=c.fit&&c.height?c.height:u.height()||this.offsetHeight||this.height||u.attr("height")||0;this.cycleW=c.fit&&c.width?c.width:u.width()||this.offsetWidth||this.width||u.attr("width")||0;if(u.is("img")){u=d.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var G=d.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,H=this.cycleH==0&&this.cycleW==0&&!this.complete;if(d.browser.msie&& this.cycleW==28&&this.cycleH==30&&!this.complete||u||G||H)if(j.s&&c.requeueOnImageNotLoaded&&++k.requeueAttempts<100){o(k.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){d(j.s,j.c).cycle(k)},c.requeueTimeout);F=true;return false}else o("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(F)return false;c.cssBefore=c.cssBefore||{};c.animIn=c.animIn||{};c.animOut=c.animOut||{};b.not(":eq("+m+ ")").css(c.cssBefore);c.cssFirst&&d(b[m]).css(c.cssFirst);if(c.timeout){c.timeout=parseInt(c.timeout);if(c.speed.constructor==String)c.speed=d.fx.speeds[c.speed]||parseInt(c.speed);c.sync||(c.speed/=2);for(n=c.fx=="shuffle"?500:250;c.timeout-c.speed<n;)c.timeout+=c.speed}if(c.easing)c.easeIn=c.easeOut=c.easing;if(!c.speedIn)c.speedIn=c.speed;if(!c.speedOut)c.speedOut=c.speed;c.slideCount=f.length;c.currSlide=c.lastSlide=m;if(c.random){if(++c.randomIndex==f.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else c.nextSlide= c.backwards?c.startingSlide==0?f.length-1:c.startingSlide-1:c.startingSlide>=f.length-1?0:c.startingSlide+1;if(!c.multiFx){n=d.fn.cycle.transitions[c.fx];if(d.isFunction(n))n(a,b,c);else if(c.fx!="custom"&&!c.multiFx){o("unknown transition: "+c.fx,"; slideshow terminating");return false}}a=b[m];c.before.length&&c.before[0].apply(a,[a,a,c,true]);c.after.length>1&&c.after[1].apply(a,[a,a,c,true]);c.next&&d(c.next).bind(c.prevNextEvent,function(){return x(c,c.rev?-1:1)});c.prev&&d(c.prev).bind(c.prevNextEvent, function(){return x(c,c.rev?1:-1)});if(c.pager||c.pagerAnchorBuilder)A(f,c);t(c,f);return c}function r(a){a.original={before:[],after:[]};a.original.cssBefore=d.extend({},a.cssBefore);a.original.cssAfter=d.extend({},a.cssAfter);a.original.animIn=d.extend({},a.animIn);a.original.animOut=d.extend({},a.animOut);d.each(a.before,function(){a.original.before.push(this)});d.each(a.after,function(){a.original.after.push(this)})}function s(a){var b,f,k=d.fn.cycle.transitions;if(a.fx.indexOf(",")>0){a.multiFx= true;a.fxs=a.fx.replace(/\s*/g,"").split(",");for(b=0;b<a.fxs.length;b++){var j=a.fxs[b];f=k[j];if(!f||!k.hasOwnProperty(j)||!d.isFunction(f)){o("discarding unknown transition: ",j);a.fxs.splice(b,1);b--}}if(!a.fxs.length){o("No valid transitions named; slideshow terminating.");return false}}else if(a.fx=="all"){a.multiFx=true;a.fxs=[];for(p in k){f=k[p];k.hasOwnProperty(p)&&d.isFunction(f)&&a.fxs.push(p)}}if(a.multiFx&&a.randomizeEffects){f=Math.floor(Math.random()*20)+30;for(b=0;b<f;b++)a.fxs.push(a.fxs.splice(Math.floor(Math.random()* a.fxs.length),1)[0]);h("randomized fx sequence: ",a.fxs)}return true}function t(a,b){a.addSlide=function(f,k){var j=d(f),c=j[0];a.autostopCount||a.countdown++;b[k?"unshift":"push"](c);if(a.els)a.els[k?"unshift":"push"](c);a.slideCount=b.length;j.css("position","absolute");j[k?"prependTo":"appendTo"](a.$cont);if(k){a.currSlide++;a.nextSlide++}!d.support.opacity&&a.cleartype&&!a.cleartypeNoBg&&B(j);a.fit&&a.width&&j.width(a.width);a.fit&&a.height&&a.height!="auto"&&$slides.height(a.height);c.cycleH= a.fit&&a.height?a.height:j.height();c.cycleW=a.fit&&a.width?a.width:j.width();j.css(a.cssBefore);if(a.pager||a.pagerAnchorBuilder)d.fn.cycle.createPagerAnchor(b.length-1,c,d(a.pager),b,a);d.isFunction(a.onAddSlide)?a.onAddSlide(j):j.hide()};a.removeSlide=function(){b.splice(0,1);a.slideCount=b.length;a.$cont.find(">:eq(0)").remove();a.currSlide--;a.nextSlide--}}function w(a,b,f,k){if(f&&b.busy&&b.manualTrump){h("manualTrump in go(), stopping active transition");d(a).stop(true,true);b.busy=false}if(b.busy)h("transition active, ignoring new tx request"); else{var j=b.$cont[0],c=a[b.currSlide],n=a[b.nextSlide];if(!(j.cycleStop!=b.stopCount||j.cycleTimeout===0&&!f))if(!f&&!j.cyclePause&&!b.bounce&&(b.autostop&&--b.countdown<=0||b.nowrap&&!b.random&&b.nextSlide<b.currSlide))b.end&&b.end(b);else{var m=false;if((f||!j.cyclePause)&&b.nextSlide!=b.currSlide){m=true;var q=b.fx;c.cycleH=c.cycleH||d(c).height();c.cycleW=c.cycleW||d(c).width();n.cycleH=n.cycleH||d(n).height();n.cycleW=n.cycleW||d(n).width();if(b.multiFx){if(b.lastFx==undefined||++b.lastFx>= b.fxs.length)b.lastFx=0;q=b.fxs[b.lastFx];b.currFx=q}if(b.oneTimeFx){q=b.oneTimeFx;b.oneTimeFx=null}d.fn.cycle.resetState(b,q);b.before.length&&d.each(b.before,function(y,z){j.cycleStop==b.stopCount&&z.apply(n,[c,n,b,k])});q=function(){d.each(b.after,function(y,z){j.cycleStop==b.stopCount&&z.apply(n,[c,n,b,k])})};h("tx firing; currSlide: "+b.currSlide+"; nextSlide: "+b.nextSlide);b.busy=1;if(b.fxFn)b.fxFn(c,n,b,q,k,f&&b.fastOnEvent);else d.isFunction(d.fn.cycle[b.fx])?d.fn.cycle[b.fx](c,n,b,q,k,f&& b.fastOnEvent):d.fn.cycle.custom(c,n,b,q,k,f&&b.fastOnEvent)}if(m||b.nextSlide==b.currSlide){b.lastSlide=b.currSlide;if(b.random){b.currSlide=b.nextSlide;if(++b.randomIndex==a.length)b.randomIndex=0;b.nextSlide=b.randomMap[b.randomIndex];if(b.nextSlide==b.currSlide)b.nextSlide=b.currSlide==b.slideCount-1?0:b.currSlide+1}else if(b.backwards)if((f=b.nextSlide-1<0)&&b.bounce){b.backwards=!b.backwards;b.nextSlide=1;b.currSlide=0}else{b.nextSlide=f?a.length-1:b.nextSlide-1;b.currSlide=f?0:b.nextSlide+ 1}else if((f=b.nextSlide+1==a.length)&&b.bounce){b.backwards=!b.backwards;b.nextSlide=a.length-2;b.currSlide=a.length-1}else{b.nextSlide=f?0:b.nextSlide+1;b.currSlide=f?a.length-1:b.nextSlide-1}}m&&b.pager&&b.updateActivePagerLink(b.pager,b.currSlide,b.activePagerClass);m=0;if(b.timeout&&!b.continuous)m=v(a[b.currSlide],a[b.nextSlide],b,k);else if(b.continuous&&j.cyclePause)m=10;if(m>0)j.cycleTimeout=setTimeout(function(){w(a,b,0,!b.rev&&!b.backwards)},m)}}}function v(a,b,f,k){if(f.timeoutFn){for(a= f.timeoutFn.call(a,a,b,f,k);a-f.speed<250;)a+=f.speed;h("calculated timeout: "+a+"; speed: "+f.speed);if(a!==false)return a}return f.timeout}function x(a,b){var f=a.elements,k=a.$cont[0],j=k.cycleTimeout;if(j){clearTimeout(j);k.cycleTimeout=0}if(a.random&&b<0){a.randomIndex--;if(--a.randomIndex==-2)a.randomIndex=f.length-2;else if(a.randomIndex==-1)a.randomIndex=f.length-1;a.nextSlide=a.randomMap[a.randomIndex]}else if(a.random)a.nextSlide=a.randomMap[a.randomIndex];else{a.nextSlide=a.currSlide+b; if(a.nextSlide<0){if(a.nowrap)return false;a.nextSlide=f.length-1}else if(a.nextSlide>=f.length){if(a.nowrap)return false;a.nextSlide=0}}k=a.onPrevNextEvent||a.prevNextClick;d.isFunction(k)&&k(b>0,a.nextSlide,f[a.nextSlide]);w(f,a,1,b>=0);return false}function A(a,b){var f=d(b.pager);d.each(a,function(k,j){d.fn.cycle.createPagerAnchor(k,j,f,a,b)});b.updateActivePagerLink(b.pager,b.startingSlide,b.activePagerClass)}function B(a){function b(k){k=parseInt(k).toString(16);return k.length<2?"0"+k:k}function f(k){for(;k&& k.nodeName.toLowerCase()!="html";k=k.parentNode){var j=d.css(k,"background-color");if(j.indexOf("rgb")>=0){k=j.match(/\d+/g);return"#"+b(k[0])+b(k[1])+b(k[2])}if(j&&j!="transparent")return j}return"#ffffff"}h("applying clearType background-color hack");a.each(function(){d(this).css("background-color",f(this))})}if(d.support==undefined)d.support={opacity:!d.browser.msie};d.fn.cycle=function(a,b){var f={s:this.selector,c:this.context};if(this.length===0&&a!="stop"){if(!d.isReady&&f.s){o("DOM not ready, queuing slideshow"); d(function(){d(f.s,f.c).cycle(a,b)});return this}o("terminating; zero elements found by selector"+(d.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var k=e(this,a,b);if(k!==false){k.updateActivePagerLink=k.updateActivePagerLink||d.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var j=d(this),c=k.slideExpr?d(k.slideExpr,this):j.children(),n=c.get();if(n.length<2)o("terminating; too few slides: "+n.length); else{var m=g(j,c,n,k,f);if(m!==false)if(j=m.continuous?10:v(n[m.currSlide],n[m.nextSlide],m,!m.rev)){j+=m.delay||0;if(j<10)j=10;h("first timeout: "+j);this.cycleTimeout=setTimeout(function(){w(n,m,0,!m.rev&&!k.backwards)},j)}}}})};d.fn.cycle.resetState=function(a,b){b=b||a.fx;a.before=[];a.after=[];a.cssBefore=d.extend({},a.original.cssBefore);a.cssAfter=d.extend({},a.original.cssAfter);a.animIn=d.extend({},a.original.animIn);a.animOut=d.extend({},a.original.animOut);a.fxFn=null;d.each(a.original.before, function(){a.before.push(this)});d.each(a.original.after,function(){a.after.push(this)});var f=d.fn.cycle.transitions[b];d.isFunction(f)&&f(a.$cont,d(a.elements),a)};d.fn.cycle.updateActivePagerLink=function(a,b,f){d(a).each(function(){d(this).children().removeClass(f).eq(b).addClass(f)})};d.fn.cycle.next=function(a){x(a,a.rev?-1:1)};d.fn.cycle.prev=function(a){x(a,a.rev?1:-1)};d.fn.cycle.createPagerAnchor=function(a,b,f,k,j){if(d.isFunction(j.pagerAnchorBuilder)){b=j.pagerAnchorBuilder(a,b);h("pagerAnchorBuilder("+ a+", el) returned: "+b)}else b='<a href="#">'+(a+1)+"</a>";if(b){var c=d(b);if(c.parents("body").length===0){var n=[];if(f.length>1){f.each(function(){var m=c.clone(true);d(this).append(m);n.push(m[0])});c=d(n)}else c.appendTo(f)}j.pagerAnchors=j.pagerAnchors||[];j.pagerAnchors.push(c);c.bind(j.pagerEvent,function(m){m.preventDefault();j.nextSlide=a;m=j.$cont[0];var q=m.cycleTimeout;if(q){clearTimeout(q);m.cycleTimeout=0}m=j.onPagerEvent||j.pagerClick;d.isFunction(m)&&m(j.nextSlide,k[j.nextSlide]); w(k,j,1,j.currSlide<a)});!/^click/.test(j.pagerEvent)&&!j.allowPagerClickBubble&&c.bind("click.cycle",function(){return false});j.pauseOnPagerHover&&c.hover(function(){j.$cont[0].cyclePause++},function(){j.$cont[0].cyclePause--})}};d.fn.cycle.hopsFromLast=function(a,b){var f=a.lastSlide,k=a.currSlide;return b?k>f?k-f:a.slideCount-f:k<f?f-k:f+a.slideCount-k};d.fn.cycle.commonReset=function(a,b,f,k,j,c){d(f.elements).not(a).hide();f.cssBefore.opacity=1;f.cssBefore.display="block";if(k!==false&&b.cycleW> 0)f.cssBefore.width=b.cycleW;if(j!==false&&b.cycleH>0)f.cssBefore.height=b.cycleH;f.cssAfter=f.cssAfter||{};f.cssAfter.display="none";d(a).css("zIndex",f.slideCount+(c===true?1:0));d(b).css("zIndex",f.slideCount+(c===true?0:1))};d.fn.cycle.custom=function(a,b,f,k,j,c){var n=d(a),m=d(b),q=f.speedIn;a=f.speedOut;var y=f.easeIn;b=f.easeOut;m.css(f.cssBefore);if(c){q=typeof c=="number"?a=c:a=1;y=b=null}n.animate(f.animOut,a,b,function(){f.cssAfter&&n.css(f.cssAfter);f.sync||m.animate(f.animIn,q,y,k)}); f.sync&&m.animate(f.animIn,q,y,k)};d.fn.cycle.transitions={fade:function(a,b,f){b.not(":eq("+f.currSlide+")").css("opacity",0);f.before.push(function(k,j,c){d.fn.cycle.commonReset(k,j,c);c.cssBefore.opacity=0});f.animIn={opacity:1};f.animOut={opacity:0};f.cssBefore={top:0,left:0}}};d.fn.cycle.ver=function(){return"2.88"};d.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,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,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!d.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(d){d.fn.cycle.transitions.none=function(h,o,e){e.fxFn=function(l,i,g,r){d(i).show();d(l).hide();r()}};d.fn.cycle.transitions.scrollUp=function(h,o,e){h.css("overflow","hidden");e.before.push(d.fn.cycle.commonReset);h=h.height();e.cssBefore={top:h,left:0};e.cssFirst={top:0};e.animIn={top:0};e.animOut={top:-h}};d.fn.cycle.transitions.scrollDown=function(h,o,e){h.css("overflow","hidden");e.before.push(d.fn.cycle.commonReset);h=h.height();e.cssFirst={top:0};e.cssBefore={top:-h,left:0};e.animIn= {top:0};e.animOut={top:h}};d.fn.cycle.transitions.scrollLeft=function(h,o,e){h.css("overflow","hidden");e.before.push(d.fn.cycle.commonReset);h=h.width();e.cssFirst={left:0};e.cssBefore={left:h,top:0};e.animIn={left:0};e.animOut={left:0-h}};d.fn.cycle.transitions.scrollRight=function(h,o,e){h.css("overflow","hidden");e.before.push(d.fn.cycle.commonReset);h=h.width();e.cssFirst={left:0};e.cssBefore={left:-h,top:0};e.animIn={left:0};e.animOut={left:h}};d.fn.cycle.transitions.scrollHorz=function(h,o, e){h.css("overflow","hidden").width();e.before.push(function(l,i,g,r){d.fn.cycle.commonReset(l,i,g);g.cssBefore.left=r?i.cycleW-1:1-i.cycleW;g.animOut.left=r?-l.cycleW:l.cycleW});e.cssFirst={left:0};e.cssBefore={top:0};e.animIn={left:0};e.animOut={top:0}};d.fn.cycle.transitions.scrollVert=function(h,o,e){h.css("overflow","hidden");e.before.push(function(l,i,g,r){d.fn.cycle.commonReset(l,i,g);g.cssBefore.top=r?1-i.cycleH:i.cycleH-1;g.animOut.top=r?l.cycleH:-l.cycleH});e.cssFirst={top:0};e.cssBefore= {left:0};e.animIn={top:0};e.animOut={left:0}};d.fn.cycle.transitions.slideX=function(h,o,e){e.before.push(function(l,i,g){d(g.elements).not(l).hide();d.fn.cycle.commonReset(l,i,g,false,true);g.animIn.width=i.cycleW});e.cssBefore={left:0,top:0,width:0};e.animIn={width:"show"};e.animOut={width:0}};d.fn.cycle.transitions.slideY=function(h,o,e){e.before.push(function(l,i,g){d(g.elements).not(l).hide();d.fn.cycle.commonReset(l,i,g,true,false);g.animIn.height=i.cycleH});e.cssBefore={left:0,top:0,height:0}; e.animIn={height:"show"};e.animOut={height:0}};d.fn.cycle.transitions.shuffle=function(h,o,e){h=h.css("overflow","visible").width();o.css({left:0,top:0});e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,true,true,true)});if(!e.speedAdjusted){e.speed/=2;e.speedAdjusted=true}e.random=0;e.shuffle=e.shuffle||{left:-h,top:15};e.els=[];for(h=0;h<o.length;h++)e.els.push(o[h]);for(h=0;h<e.currSlide;h++)e.els.push(e.els.shift());e.fxFn=function(l,i,g,r,s){var t=s?d(l):d(i);d(i).css(g.cssBefore); var w=g.slideCount;t.animate(g.shuffle,g.speedIn,g.easeIn,function(){for(var v=d.fn.cycle.hopsFromLast(g,s),x=0;x<v;x++)s?g.els.push(g.els.shift()):g.els.unshift(g.els.pop());if(s){v=0;for(x=g.els.length;v<x;v++)d(g.els[v]).css("z-index",x-v+w)}else{v=d(l).css("z-index");t.css("z-index",parseInt(v)+1+w)}t.animate({left:0,top:0},g.speedOut,g.easeOut,function(){d(s?this:l).hide();r&&r()})})};e.cssBefore={display:"block",opacity:1,top:0,left:0}};d.fn.cycle.transitions.turnUp=function(h,o,e){e.before.push(function(l, i,g){d.fn.cycle.commonReset(l,i,g,true,false);g.cssBefore.top=i.cycleH;g.animIn.height=i.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,height:0};e.animIn={top:0};e.animOut={height:0}};d.fn.cycle.transitions.turnDown=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,true,false);g.animIn.height=i.cycleH;g.animOut.top=l.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,top:0,height:0};e.animOut={height:0}};d.fn.cycle.transitions.turnLeft=function(h,o,e){e.before.push(function(l, i,g){d.fn.cycle.commonReset(l,i,g,false,true);g.cssBefore.left=i.cycleW;g.animIn.width=i.cycleW});e.cssBefore={top:0,width:0};e.animIn={left:0};e.animOut={width:0}};d.fn.cycle.transitions.turnRight=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,false,true);g.animIn.width=i.cycleW;g.animOut.left=l.cycleW});e.cssBefore={top:0,left:0,width:0};e.animIn={left:0};e.animOut={width:0}};d.fn.cycle.transitions.zoom=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l, i,g,false,false,true);g.cssBefore.top=i.cycleH/2;g.cssBefore.left=i.cycleW/2;g.animIn={top:0,left:0,width:i.cycleW,height:i.cycleH};g.animOut={width:0,height:0,top:l.cycleH/2,left:l.cycleW/2}});e.cssFirst={top:0,left:0};e.cssBefore={width:0,height:0}};d.fn.cycle.transitions.fadeZoom=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,false,false);g.cssBefore.left=i.cycleW/2;g.cssBefore.top=i.cycleH/2;g.animIn={top:0,left:0,width:i.cycleW,height:i.cycleH}});e.cssBefore={width:0, height:0};e.animOut={opacity:0}};d.fn.cycle.transitions.blindX=function(h,o,e){h=h.css("overflow","hidden").width();e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g);g.animIn.width=i.cycleW;g.animOut.left=l.cycleW});e.cssBefore={left:h,top:0};e.animIn={left:0};e.animOut={left:h}};d.fn.cycle.transitions.blindY=function(h,o,e){h=h.css("overflow","hidden").height();e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g);g.animIn.height=i.cycleH;g.animOut.top=l.cycleH});e.cssBefore={top:h, left:0};e.animIn={top:0};e.animOut={top:h}};d.fn.cycle.transitions.blindZ=function(h,o,e){o=h.css("overflow","hidden").height();h=h.width();e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g);g.animIn.height=i.cycleH;g.animOut.top=l.cycleH});e.cssBefore={top:o,left:h};e.animIn={top:0,left:0};e.animOut={top:o,left:h}};d.fn.cycle.transitions.growX=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,false,true);g.cssBefore.left=this.cycleW/2;g.animIn={left:0,width:this.cycleW}; g.animOut={left:0}});e.cssBefore={width:0,top:0}};d.fn.cycle.transitions.growY=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,true,false);g.cssBefore.top=this.cycleH/2;g.animIn={top:0,height:this.cycleH};g.animOut={top:0}});e.cssBefore={height:0,left:0}};d.fn.cycle.transitions.curtainX=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,false,true,true);g.cssBefore.left=i.cycleW/2;g.animIn={left:0,width:this.cycleW};g.animOut={left:l.cycleW/2,width:0}}); e.cssBefore={top:0,width:0}};d.fn.cycle.transitions.curtainY=function(h,o,e){e.before.push(function(l,i,g){d.fn.cycle.commonReset(l,i,g,true,false,true);g.cssBefore.top=i.cycleH/2;g.animIn={top:0,height:i.cycleH};g.animOut={top:l.cycleH/2,height:0}});e.cssBefore={left:0,height:0}};d.fn.cycle.transitions.cover=function(h,o,e){var l=e.direction||"left",i=h.css("overflow","hidden").width(),g=h.height();e.before.push(function(r,s,t){d.fn.cycle.commonReset(r,s,t);if(l=="right")t.cssBefore.left=-i;else if(l== "up")t.cssBefore.top=g;else if(l=="down")t.cssBefore.top=-g;else t.cssBefore.left=i});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};d.fn.cycle.transitions.uncover=function(h,o,e){var l=e.direction||"left",i=h.css("overflow","hidden").width(),g=h.height();e.before.push(function(r,s,t){d.fn.cycle.commonReset(r,s,t,true,true,true);if(l=="right")t.animOut.left=i;else if(l=="up")t.animOut.top=-g;else if(l=="down")t.animOut.top=g;else t.animOut.left=-i});e.animIn={left:0,top:0}; e.animOut={opacity:1};e.cssBefore={top:0,left:0}};d.fn.cycle.transitions.toss=function(h,o,e){var l=h.css("overflow","visible").width(),i=h.height();e.before.push(function(g,r,s){d.fn.cycle.commonReset(g,r,s,true,true,true);if(!s.animOut.left&&!s.animOut.top)s.animOut={left:l*2,top:-i/2,opacity:0};else s.animOut.opacity=0});e.cssBefore={left:0,top:0};e.animIn={left:0}};d.fn.cycle.transitions.wipe=function(h,o,e){var l=h.css("overflow","hidden").width(),i=h.height();e.cssBefore=e.cssBefore||{};var g; if(e.clip)if(/l2r/.test(e.clip))g="rect(0px 0px "+i+"px 0px)";else if(/r2l/.test(e.clip))g="rect(0px "+l+"px "+i+"px "+l+"px)";else if(/t2b/.test(e.clip))g="rect(0px "+l+"px 0px 0px)";else if(/b2t/.test(e.clip))g="rect("+i+"px "+l+"px "+i+"px 0px)";else if(/zoom/.test(e.clip)){h=parseInt(i/2);o=parseInt(l/2);g="rect("+h+"px "+o+"px "+h+"px "+o+"px)"}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";h=e.cssBefore.clip.match(/(\d+)/g);var r=parseInt(h[0]),s=parseInt(h[1]),t=parseInt(h[2]), w=parseInt(h[3]);e.before.push(function(v,x,A){if(v!=x){var B=d(v),a=d(x);d.fn.cycle.commonReset(v,x,A,true,true,false);A.cssAfter.display="block";var b=1,f=parseInt(A.speedIn/13)-1;(function k(){var j=r?r-parseInt(b*(r/f)):0,c=w?w-parseInt(b*(w/f)):0,n=t<i?t+parseInt(b*((i-t)/f||1)):i,m=s<l?s+parseInt(b*((l-s)/f||1)):l;a.css({clip:"rect("+j+"px "+m+"px "+n+"px "+c+"px)"});b++<=f?setTimeout(k,13):B.css("display","none")})()}});e.cssBefore={display:"block",opacity:1,top:0,left:0};e.animIn={left:0}; e.animOut={left:0}}})(jQuery);


/* Easing */
jQuery.extend(jQuery.easing,{easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;}});


/**
* jQuery Cookie plugin
*
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* http://plugins.jquery.com/project/Cookie
*
*/
jQuery.cookie=function(e,b,a){if(arguments.length>1&&String(b)!=="[object Object]"){a=jQuery.extend({},a);if(b===null||b===void 0)a.expires=-1;if(typeof a.expires==="number"){var d=a.expires,c=a.expires=new Date;c.setDate(c.getDate()+d)}b=String(b);return document.cookie=[encodeURIComponent(e),"=",a.raw?b:encodeURIComponent(b),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}a=b||{};c=a.raw?function(a){return a}: decodeURIComponent;return(d=RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?c(d[1]):null};


/*
* jQuery Color Animations
* https://github.com/jquery/jquery-color
* Copyright 2011 John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);


/**
 * Background Position Animation v. 1.22
 * @author Alexander Farkas
 * http://plugins.jquery.com/project/backgroundPosition-Effect
 */
(function(c){function f(a){a=a.replace(/left|top/g,"0px");a=a.replace(/right|bottom/g,"100%");a=a.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");a=a.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(a[1],10),a[2],parseFloat(a[3],10),a[4]]}if(!document.defaultView||!document.defaultView.getComputedStyle){var d=c.curCSS;c.curCSS=function(a,b,c){b==="background-position"&&(b="backgroundPosition");if(b!=="backgroundPosition"||!a.currentStyle||a.currentStyle[b])return d.apply(this, arguments);var e=a.style;if(!c&&e&&e[b])return e[b];return d(a,"backgroundPositionX",c)+" "+d(a,"backgroundPositionY",c)}}var g=c.fn.animate;c.fn.animate=function(a){if("background-position"in a)a.backgroundPosition=a["background-position"],delete a["background-position"];if("backgroundPosition"in a)a.backgroundPosition="("+a.backgroundPosition;return g.apply(this,arguments)};c.fx.step.backgroundPosition=function(a){if(!a.bgPosReady){var b=c.curCSS(a.elem,"backgroundPosition");b||(b="0px 0px");b= f(b);a.start=[b[0],b[2]];b=f(a.end);a.end=[b[0],b[2]];a.unit=[b[1],b[3]];a.bgPosReady=!0}b=[];b[0]=(a.end[0]-a.start[0])*a.pos+a.start[0]+a.unit[0];b[1]=(a.end[1]-a.start[1])*a.pos+a.start[1]+a.unit[1];a.elem.style.backgroundPosition=b[0]+" "+b[1]}})(jQuery);


/*!
 * Shadow animation jQuery-plugin 1.4
 * http://www.bitstorm.org/jquery/shadow-animation/
 * Copyright 2011 Edwin Martin <edwin@bitstorm.org>
 * Contributors: Mark Carver, Xavier Lepretre
 * Released under the MIT and GPL licenses.
 */
jQuery(function(e,i){function j(){var a=e("script:first"),b=a.css("color"),c=false;if(/^rgba/.test(b))c=true;else try{c=b!=a.css("color","rgba(0, 0, 0, 0.5)").css("color");a.css("color",b)}catch(d){}return c}function k(a,b,c){var d=[];a.c&&d.push("inset");typeof b.left!="undefined"&&d.push(parseInt(a.left+c*(b.left-a.left),10)+"px "+parseInt(a.top+c*(b.top-a.top),10)+"px");typeof b.blur!="undefined"&&d.push(parseInt(a.blur+c*(b.blur-a.blur),10)+"px");typeof b.a!="undefined"&&d.push(parseInt(a.a+c*
(b.a-a.a),10)+"px");if(typeof b.color!="undefined"){var g="rgb"+(e.support.rgba?"a":"")+"("+parseInt(a.color[0]+c*(b.color[0]-a.color[0]),10)+","+parseInt(a.color[1]+c*(b.color[1]-a.color[1]),10)+","+parseInt(a.color[2]+c*(b.color[2]-a.color[2]),10);if(e.support.rgba)g+=","+parseFloat(a.color[3]+c*(b.color[3]-a.color[3]));g+=")";d.push(g)}return d.join(" ")}function h(a){var b,c,d={};if(b=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(a))c=[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],
16),1];else if(b=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(a))c=[parseInt(b[1],16)*17,parseInt(b[2],16)*17,parseInt(b[3],16)*17,1];else if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),1];else if(b=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([01\.]*)\s*\)/.exec(a))c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseFloat(b[4])];d=(b=/(-?[0-9]+)(?:px)?\s+(-?[0-9]+)(?:px)?(?:\s+(-?[0-9]+)(?:px)?)?(?:\s+(-?[0-9]+)(?:px)?)?/.exec(a))?
{left:parseInt(b[1],10),top:parseInt(b[2],10),blur:b[3]?parseInt(b[3],10):0,a:b[4]?parseInt(b[4],10):0}:{left:0,top:0,blur:0,a:0};d.c=/inset/.test(a);d.color=c;return d}e.extend(true,e,{support:{rgba:j()}});var f;e.each(["boxShadow","MozBoxShadow","WebkitBoxShadow"],function(a,b){a=e("html").css(b);if(typeof a=="string"&&a!=""){f=b;return false}});if(f)e.fx.step.shadow=function(a){if(!a.init){a.b=h(e(a.elem).css(f));a.end=e.extend({},a.b,h(a.options.curAnim.shadow));if(a.b.color==i)a.b.color=a.end.color||
[0,0,0];a.init=true}a.elem.style[f]=k(a.b,a.end,a.pos)}});


/*
 * UItoTop jQuery Plugin 1.1
 * http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
 * Modified by Stuart Basden 2011
*/
(function(b){b.fn.UItoTop=function(c){var a=b.extend({text:"Top",min:2E3,inSpeed:600,outSpeed:400,containerID:"toTop",scrollSpeed:1200,easingType:"easeOutExpo",bottom:20,leftRelativeTo:"#q",leftOffset:50},c),c=a.leftOffset+b(a.leftRelativeTo).offset().left;b("body").append('<a href="#header" id="'+a.containerID+'" style="position:fixed;bottom:'+a.bottom+"px;left:"+c+'px;z-index:10000">'+a.text+"</a>");b("#"+a.containerID).hide().click(function(){b("body,html,document").animate({scrollTop:0},a.scrollSpeed, a.easingType);return!1});b(window).scroll(function(){var c=b(window).scrollTop();typeof document.body.style.maxHeight==="undefined"&&b("#"+a.containerID).css({position:"absolute",top:b(window).scrollTop()+b(window).height()-a.bottom});c>a.min?b("#"+a.containerID).fadeIn(a.inSpeed):b("#"+a.containerID).fadeOut(a.outSpeed)})}})(jQuery);


/*
* jCaption
* Copyright (C) 2009 Joel Sutherland
* Licenced under the MIT license
* http://www.newmediacampaigns.com/page/jcaption-a-jquery-plugin-for-simple-image-captions
*/
(function($){$.fn.jcaption=function(settings){settings=$.extend({wrapperElement:'div',wrapperClass:'caption',captionElement:'p',imageAttr:'alt',requireText:true,copyStyle:false,removeStyle:true,removeAlign:true,copyAlignmentToClass:false,copyFloatToClass:true,autoWidth:true,animate:false,show:{opacity:'show'},showDuration:200,hide:{opacity:'hide'},hideDuration:200},settings);return $(this).each(function(){$(this).bind('load',function(){if($(this).data('loaded'))return false;$(this).data('loaded',true);var image=$(this);if(image.attr(settings.imageAttr).length>0||!settings.requireText){image.wrap("<"+settings.wrapperElement+" class='"+settings.wrapperClass+"'></"+settings.wrapperElement+">");var imageFloat=image.css('float')
var imageStyle=image.attr('style');if(settings.removeStyle)image.removeAttr('style');var imageAlign=image.attr('align');if(settings.removeAlign)image.removeAttr('align');var div=$(this).parent().append('<'+settings.captionElement+'>'+image.attr(settings.imageAttr)+'</'+settings.captionElement+'>');if(settings.animate){$(this).next().hide();$(this).parent().hover(function(){$(this).find('p').animate(settings.show,settings.showDuration);},function(){$(this).find('p').animate(settings.hide,settings.hideDuration);});}
if(settings.copyStyle)div.attr('style',imageStyle);if(settings.copyAlignmentToClass)div.addClass(imageAlign);if(settings.copyFloatToClass)div.addClass(imageFloat);if(settings.autoWidth)div.width(image.width());}});if(this.complete||this.naturalWidth>0){$(this).trigger('load');}});}})(jQuery);



/*
*  Ajax Autocomplete for jQuery, version 1.0.7, modified by SearchImprove
*  (c) 2009 Tomas Kirda
*
*  Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
*  For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/
*
*  Last Review: 07/27/2009
*/
// Needed for SearchImproves use of jQuery (autocomplete and AJAX loading of results)
var $siteimprovejquery = jQuery;
(function(c){c.fn.autocomplete=function(a){return this.each(function(){return new g(this,a)})};var h=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g"),i=function(a,b,d){b="("+d.replace(h,"\\$1")+")";return a.replace(RegExp(b,"i"),"<strong>$1</strong>")},g=function(a,b){this.el=c(a);this.el.attr("autocomplete","off");this.suggestions=[];this.urls=[];this.alttexts=[];this.data=[];this.selectedIndex=-1;this.currentValue=this.el.val();this.intervalId=0;this.onChangeInterval=null;this.ignoreValueChange= !1;this.serviceUrl=b.serviceUrl;this.options={autoSubmit:1,minChars:2,maxHeight:120,deferRequestBy:200,width:0,highlight:1,params:{account_id:90781508,package_id:1405240315},fnFormatResult:i,delimiter:null,submitButtonName:null,submitAction:null,tooltipPretext:"Search for",offsetx:0,offsety:0,submitAction: function(elm) {;}};b&&c.extend(this.options,b);this.initialize()};g.prototype={killerFn:null,initialize:function(){var a,b;a=this;b=Math.max.apply(null,c.map(c("body > *"),function(a){var b=c(a).css("position");if(b==="absolute"||b==="relative")return parseInt(c(a).css("z-index"), 10)||1}));this.killerFn=function(b){c(b.target).parents(".autocomplete").size()===0&&(a.killSuggestions(),a.disableKillerFn())};var d=(new Date).getTime(),f="Autocomplete_"+d;if(!this.options.width)this.options.width=this.el.width();this.mainContainerId="AutocompleteContainter_"+d;c('<div class="autocompletecontainer" id="'+this.mainContainerId+'" style="position:absolute;"><div class="autocomplete-w1"><div class="autocomplete" id="'+f+'" style="display:none; width:'+this.options.width+ 'px;"></div></div></div>').appendTo("body");this.container=c("#"+f);this.fixPosition();window.opera?this.el.keypress(function(b){a.onKeyPress(b)}):this.el.keydown(function(b){a.onKeyPress(b)});this.el.keyup(function(b){a.onKeyUp(b)});this.el.blur(function(){a.enableKillerFn()});this.el.focus(function(){a.fixPosition()});this.container.css({maxHeight:this.options.maxHeight+"px"})},fixPosition:function(){var a=this.el.offset(),b=c("body").outerWidth(),d=c(window).width(),f=c("body").offset();c("#"+this.mainContainerId).css({top:a.top+this.el.innerHeight()-f.top+this.options.offsety+"px",left:a.left-f.left+this.options.offsetx+"px"})},enableKillerFn:function(){c(document).bind("click",this.killerFn)},disableKillerFn:function(){c(document).unbind("click",this.killerFn)},killSuggestions:function(){var a=this;this.stopKillSuggestions();this.intervalId=window.setInterval(function(){a.hide();a.stopKillSuggestions()},100)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)}, onKeyPress:function(a){if(this.enabled){switch(a.keyCode){case 27:this.el.val(this.currentValue);this.hide();break;case 9:case 13:if(this.selectedIndex===-1){this.hide();return}this.select(this.selectedIndex);if(a.keyCode===9)return;break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return}a.stopImmediatePropagation();a.preventDefault()}},onKeyUp:function(a){switch(a.keyCode){case 38:case 40:return}clearInterval(this.onChangeInterval);if(this.currentValue!==this.el.val())if(this.options.deferRequestBy> 0){var b=this;this.onChangeInterval=setInterval(function(){b.onValueChange()},this.options.deferRequestBy)}else this.onValueChange()},onValueChange:function(){clearInterval(this.onChangeInterval);this.currentValue=this.el.val();var a=this.getQuery(this.currentValue);this.selectedIndex=-1;this.ignoreValueChange?this.ignoreValueChange=!1:a===""||a.length<this.options.minChars?this.hide():this.getSuggestions(a)},getQuery:function(a){var b;b=this.options.delimiter;if(!b)return c.trim(a);a=a.split(b); return c.trim(a[a.length-1])},getSuggestions:function(a){var b=this;b.options.params.query=a;c.getJSON(this.serviceUrl,b.options.params,function(a){b.processResponse(a)},"text")},hide:function(){this.enabled=!1;this.selectedIndex=-1;this.container.hide()},suggest:function(){if(this.suggestions.length===0)this.hide();else{var a,b,d,f,j,k;a=this;b=this.suggestions.length;f=this.options.fnFormatResult;v=this.getQuery(this.currentValue);j=this.options.params.account_id;k=this.options.params.package_id; this.container.hide().empty();for(var e=0;e<b;e++){d=this.urls[e]?'<a href="'+this.urls[e]+'" onclick="return autocomplete_logclick(\''+this.urls[e]+"','"+j+"','"+k+"', '"+this.suggestions[e]+'\');" title="'+this.alttexts[e]+'" style="float:right;margin-right:-5px;border:0 none;"><img src="http://autocomplete.searchimprove.com/ac/arr_right_16.gif" alt="'+this.alttexts[e]+'" border="0" /></a>':"";var g=!this.urls[e]&&this.alttexts[e]?this.alttexts[e].split("\u00a4br\u00a4").join("\n"):this.options.tooltipPretext+ " "+this.suggestions[e];d=c((a.selectedIndex===e?'<div style="cursor:hand;margin-bottom:1px;" class="selected"':'<div style="cursor:hand;margin-bottom:1px;"')+' title="'+g+'">'+d+f(this.suggestions[e],this.data[e],v)+"</div>");d.mouseover(function(b){return function(){a.activate(b)}}(e));d.click(function(b){return function(){a.select(b)}}(e));this.container.append(d)}this.enabled=!0;this.container.show()}},processResponse:function(a){if(!c.isArray(a.data))a.data=[];if(a.query===this.getQuery(this.currentValue))this.suggestions= a.suggestions,this.urls=a.urls,this.alttexts=a.alttexts,this.data=a.data,this.suggest()},activate:function(a){var b=this.container.children(),d;this.selectedIndex!==-1&&b.length>this.selectedIndex&&c(b.get(this.selectedIndex)).attr("class","");this.selectedIndex=a;this.selectedIndex!==-1&&b.length>this.selectedIndex&&(d=b.get(this.selectedIndex),c(d).attr("class","selected"));return d},deactivate:function(a,b){a.className="";if(this.selectedIndex===b)this.selectedIndex=-1},select:function(a){var b= this.suggestions[a];if(b){this.el.val(b);if(this.options.autoSubmit){if(this.options.submitAction){this.options.submitAction(this.el);return}b=this.el.parents("form");b.length>0&&b.get(0).submit()}this.ignoreValueChange=!0;this.hide();this.onSelect(a)}},moveUp:function(){if(this.selectedIndex!==-1)this.selectedIndex===0?(this.container.children().get(0).className="",this.selectedIndex=-1,this.el.val(this.currentValue)):this.adjustScroll(this.selectedIndex-1)},moveDown:function(){this.selectedIndex!== this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(a){var b,c;a=this.activate(a).offsetTop;b=this.container.scrollTop();c=b+this.options.maxHeight-25;a<b?this.container.scrollTop(a):a>c&&this.container.scrollTop(a-this.options.maxHeight+25)},onSelect:function(a){var b,d,f;b=this;d=b.options.onSelect;f=b.suggestions[a];a=b.data[a];b.el.val(function(a){var c,d;c=b.options.delimiter;d=b.currentValue;if(!c)return a;c=d.split(c);if(c.length===1)return a;return d.substr(0, d.length-c[c.length-1].length)+a}(f));c.isFunction(d)&&d(f,a)}}})(jQuery);function autocomplete_logclick(c,h,i,g){var a=Math.floor(Math.random()*1E5);if(document.images)img1=new Image,img1.src="http://autocomplete.searchimprove.com/autocomplete/log.aspx?url="+escape(c)+"&account_id="+escape(h)+"&package_id="+escape(i)+"&searchterm="+escape(g)+"&rn="+a;return!0};


/*
 * Spiral [v1.2]
 * Distributed under the Do-wathever-the-hell-you-want-with-it License (with Attribution)
 * https://github.com/thugsb/jQuery.Spiral
 * Twitter: @ClaudioBonifazi
 * Modified by stu åt t.apio.ca
 */
/*
Options = {
Radius: numeric (pixels), horizontal distance between starting and final points;
Duration: number of milliseconds (as for animate) ;
Easing: the number of cicles - if it is higher than 2 it will make more turns and will assume a 'bouncing' deceleration effect
Queue: boolean (as for animate) ;
Ydirection: boolean. If true, the rotation starts going up instead of down.
Xdirection: boolean. If true the movement will be from left to the right, instead of right to left.
InsideOut: boolean. If true, the object will whirl out from the inside of the spiral. Note that setting it to true changes the sense of Xdirection ;
Vertical: boolean. If true, the object spiral will be primarily vertical.
},
Callback = function called when the animation ends (as for animate) ;
*/
(function(b){b.fn.spiral=function(d,e){Opt={Radius:150,Duration:1E3,Easing:2,Queue:!1,Xdirection:!1,Ydirection:!1,InsideOut:!1,Vertical:!1};b.extend(Opt,d);e||(e=function(){});return this.each(function(){var a=b(this),d=a.css("z-index");if(Opt.Vertical)var f=parseInt(a.css("margin-top")),g=parseInt(a.css("margin-left"));else f=parseInt(a.css("margin-left")),g=parseInt(a.css("margin-top"));a.animate({"z-index":d},{duration:Opt.Duration,complete:e,step:function(a,c){fgamma=Opt.InsideOut?Opt.Radius* (1+c.pos):Opt.Radius*(1-c.pos);gamma=c.pos*Opt.Easing*Math.PI;gamma=Opt.Ydirection?-gamma:gamma;x=Opt.Xdirection?f+Opt.Radius-fgamma*Math.cos(gamma)+"px":f-Opt.Radius+fgamma*Math.cos(gamma)+"px";y=g+fgamma*Math.sin(gamma)+"px";Opt.Vertical?b(c.elem).css({"margin-top":x,"margin-left":y}):b(c.elem).css({"margin-left":x,"margin-top":y})},queue:Opt.Queue})})}})(jQuery);


/**
 * jQuery Masonry v2.0.110808
 * A dynamic layout plugin for jQuery
 * The flip-side of CSS Floats
 * http://masonry.desandro.com
 *
 * Licensed under the MIT license.
 * Copyright 2011 David DeSandro
 */
(function(a,b,c){var d=b.event,e;d.special.smartresize={setup:function(){b(this).bind("resize",d.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",d.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",e&&clearTimeout(e),e=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Mason=function(a,c){this.element=b(c),this._create(a),this._init()};var f=["position","height"];b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1},b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return b?a.filter(b).add(a.find(b)):a},_getBricks:function(a){var b=this._filterFindBricks(a).css({position:"absolute"}).addClass("masonry-brick");return b},_create:function(c){this.options=b.extend(!0,{},b.Mason.settings,c),this.styleQueue=[],this.reloadItems();var d=this.element[0].style;this.originalStyle={};for(var e=0,g=f.length;e<g;e++){var h=f[e];this.originalStyle[h]=d[h]||""}this.element.css({position:"relative"}),this.horizontalDirection=this.options.isRTL?"right":"left",this.offset={};var i=b(document.createElement("div"));this.element.prepend(i),this.offset.y=Math.round(i.position().top),this.options.isRTL?(i.css({"float":"right",display:"inline-block"}),this.offset.x=Math.round(this.element.outerWidth()-i.position().left)):this.offset.x=Math.round(i.position().left),i.remove();var j=this;setTimeout(function(){j.element.addClass("masonry")},0),this.options.isResizable&&b(a).bind("smartresize.masonry",function(){j.resize()})},_init:function(a){this._getColumns("masonry"),this._reLayout(a)},option:function(a,c){b.isPlainObject(a)&&(this.options=b.extend(!0,this.options,a))},layout:function(a,c){var d,e,f,g,h,i;for(var j=0,k=a.length;j<k;j++){d=b(a[j]),e=Math.ceil(d.outerWidth(!0)/this.columnWidth),e=Math.min(e,this.cols);if(e===1)this._placeBrick(d,this.colYs);else{f=this.cols+1-e,g=[];for(i=0;i<f;i++)h=this.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);this._placeBrick(d,g)}}var l={};l.height=Math.max.apply(Math,this.colYs)-this.offset.y,this.options.isFitWidth&&(l.width=this.cols*this.columnWidth-this.options.gutterWidth),this.styleQueue.push({$el:this.element,style:l});var m=this.isLaidOut?this.options.isAnimated?"animate":"css":"css",n=this.options.animationOptions,o;for(j=0,k=this.styleQueue.length;j<k;j++)o=this.styleQueue[j],o.$el[m](o.style,n);this.styleQueue=[],c&&c.call(a),this.isLaidOut=!0},_getColumns:function(){var a=this.options.isFitWidth?this.element.parent():this.element,b=a.width();this.columnWidth=this.options.columnWidth||this.$bricks.outerWidth(!0)||b,this.columnWidth+=this.options.gutterWidth,this.cols=Math.floor((b+this.options.gutterWidth)/this.columnWidth),this.cols=Math.max(this.cols,1)},_placeBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g={top:c};g[this.horizontalDirection]=this.columnWidth*d+this.offset.x,this.styleQueue.push({$el:a,style:g});var h=c+a.outerHeight(!0),i=this.cols+1-f;for(e=0;e<i;e++)this.colYs[d+e]=h},resize:function(){var a=this.cols;this._getColumns("masonry"),this.cols!==a&&this._reLayout()},_reLayout:function(a){var b=this.cols;this.colYs=[];while(b--)this.colYs.push(this.offset.y);this.layout(this.$bricks,a)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(a){this.reloadItems(),this._init(a)},appended:function(a,b,c){if(b){this._filterFindBricks(a).css({top:this.element.height()});var d=this;setTimeout(function(){d._appended(a,c)},1)}else this._appended(a,c)},_appended:function(a,b){var c=this._getBricks(a);this.$bricks=this.$bricks.add(c),this.layout(c,b)},remove:function(a){this.$bricks=this.$bricks.not(a),a.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="",this.style.top="",this.style.left=""});var c=this.element[0].style;for(var d=0,e=f.length;d<e;d++){var g=f[d];c[g]=this.originalStyle[g]}this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"),b(a).unbind(".masonry")}},b.fn.imagesLoaded=function(a){var b=this.find("img"),c=[],d=this,e=b.length;if(!b.length){a.call(this);return this}b.one("load error",function(){--e===0&&(e=b.length,b.one("load error",function(){--e===0&&a.call(d)}).each(function(){this.src=c.shift()}))}).each(function(){c.push(this.src),this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="});return this};var g=function(a){this.console&&console.error(a)};b.fn.masonry=function(a){if(typeof a=="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"masonry");if(!d)g("cannot call methods on masonry prior to initialization; attempted to call method '"+a+"'");else{if(!b.isFunction(d[a])||a.charAt(0)==="_"){g("no such method '"+a+"' for masonry instance");return}d[a].apply(d,c)}})}else this.each(function(){var c=b.data(this,"masonry");c?(c.option(a||{}),c._init()):b.data(this,"masonry",new b.Mason(a,this))});return this}})(window,jQuery);


/**
 *   project:    liteAccordion - horizontal accordion plugin for jQuery
 *   author:     Nicola Hibbert
 *   url:        http://nicolahibbert.com/horizontal-accordion-jquery-plugin
 *   demo:       http://www.nicolahibbert.com/demo/liteAccordion
 *
 *   Version:    1.1.3
 *   Copyright:  (c) 2010-2011 Nicola Hibbert
 */
(function(f){f.fn.liteAccordion=function(e){var a=f.extend({},{containerWidth:960,containerHeight:320,headerWidth:48,firstSlide:1,onActivate:function(){},slideSpeed:800,easing:"swing",slideCallback:function(){},autoPlay:false,pauseOnHover:false,cycleSpeed:6E3,theme:"basic",rounded:false,enumerateSlides:false},e),e=this.children("ol").children("li"),k=e.length,i=a.containerWidth-k*a.headerWidth,b=e.children("h2"),c={getGroup:function(g,d){if(this.offsetLeft===g.left)return b.slice(d+1,k).filter(function(){return this.offsetLeft=== b.index(this)*a.headerWidth});else if(this.offsetLeft===g.right)return b.slice(0,d+1).filter(function(){return this.offsetLeft===i+b.index(this)*a.headerWidth})},nextSlide:function(b){var d=b+1||a.firstSlide;return function(){return d++%k}},play:function(g){var d=c.nextSlide(g?g:"");c.playing=setInterval(function(){b.eq(d()).click()},a.cycleSpeed)},pause:function(){clearInterval(c.playing)},playing:0,sentinel:false};this.height(a.containerHeight).width(a.containerWidth).addClass(a.theme).addClass(a.rounded&& "rounded");b.width(a.containerHeight).height(a.headerWidth).eq(a.firstSlide-1).addClass("selected");if(f.browser.msie)if(f.browser.version.substr(0,1)>8)b.css("filter","none");else if(f.browser.version.substr(0,1)<7)return false;b.each(function(b){var d=f(this),c=b*a.headerWidth;b>=a.firstSlide&&(c+=i);d.css("left",c).next().width(i).css({left:c,paddingLeft:a.headerWidth});a.enumerateSlides&&d.append("<b>"+(b+1)+"</b>")});b.click(function(g){var d=f(this),j=b.index(d),e=d.next(),h={left:j*a.headerWidth, right:j*a.headerWidth+i,newPos:0},j=c.getGroup.call(this,h,j);if(this.offsetLeft===h.left)h.newPos=i;else if(this.offsetLeft===h.right)h.newPos=-i;if(!b.is(":animated")){if(g.originalEvent){if(c.sentinel===this)return false;a.onActivate.call(e);c.sentinel=this}else a.onActivate.call(e),c.sentinel=false;b.removeClass("selected").filter(d).addClass("selected");j.animate({left:"+="+h.newPos},a.slideSpeed,a.easing,function(){a.slideCallback.call(e)}).next().animate({left:"+="+h.newPos},a.slideSpeed,a.easing)}}); a.pauseOnHover&&this.hover(function(){c.pause()},function(){c.play(b.index(b.filter(".selected")))});a.autoPlay&&c.play();return this}})(jQuery);

/**
 * http://plugins.jquery.com/project/HTML5izerPlaceholder
 */
(function($){$.fn.placeholder=function(o){var d={placeholderTextColour:"#666"};var p=$.extend(d,o);return this.each(function(){var t=$(this);var a=t.attr("placeholder");if (typeof a!=="undefined"&&a!==false&&this.nodeName.toLowerCase()=="input"){var q=$.metadata?$.extend({},p,t.metadata()):p;var y=q.placeholderTextColour; var z="color"; f(t,a,"",z,y);t.focus(function(){f(t,"",a,z,"");});t.blur(function(){f(t,a,"",z,y);});}});};function f(a,b,c,d,e){if(a.val()==c){a.val(b).css(d,e);}}})(jQuery);


/* jQuery selText from http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse */
jQuery.fn.selText=function(){var b=this[0];if(document.body.createTextRange){var a=document.body.createTextRange();a.moveToElementText(b);a.select()}else if(window.getSelection){var c=window.getSelection(),a=document.createRange();a.selectNodeContents(b);c.removeAllRanges();c.addRange(a)}};

