/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.9999.5 (10-APR-2012)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function(n,t){"use strict";function r(t){n.fn.cycle.debug&&i(t)}function i(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function f(t,i,r){var u=n(t).data("cycle.opts"),f=!!t.cyclePause;f&&u.paused?u.paused(t,u,i,r):!f&&u.resumed&&u.resumed(t,u,i,r)}function l(r,e,o){function c(t,r,f){if(!t&&r===!0){var e=n(f).data("cycle.opts");if(!e)return i("options not found, can not resume"),!1;f.cycleTimeout&&(clearTimeout(f.cycleTimeout),f.cycleTimeout=0),u(e.elements,e,1,!e.backwards)}}var s,h;if(r.cycleStop===t&&(r.cycleStop=0),(e===t||e===null)&&(e={}),e.constructor==String){switch(e){case"destroy":case"stop":return(s=n(r).data("cycle.opts"),!s)?!1:(r.cycleStop++,r.cycleTimeout&&clearTimeout(r.cycleTimeout),r.cycleTimeout=0,s.elements&&n(s.elements).stop(),n(r).removeData("cycle.opts"),e=="destroy"&&a(r,s),!1);case"toggle":return r.cyclePause=r.cyclePause===1?0:1,c(r.cyclePause,o,r),f(r),!1;case"pause":return r.cyclePause=1,f(r),!1;case"resume":return r.cyclePause=0,c(!1,o,r),f(r),!1;case"prev":case"next":return(s=n(r).data("cycle.opts"),!s)?(i('options not found, "prev/next" ignored'),!1):(n.fn.cycle[e](s),!1);default:e={fx:e}}return e}return e.constructor==Number?(h=e,e=n(r).data("cycle.opts"),!e)?(i("options not found, can not advance slide"),!1):h<0||h>=e.elements.length?(i("invalid slide index: "+h),!1):(e.nextSlide=h,r.cycleTimeout&&(clearTimeout(r.cycleTimeout),r.cycleTimeout=0),typeof o=="string"&&(e.oneTimeFx=o),u(e.elements,e,1,h>=e.currSlide),!1):e}function h(t,i){if(!n.support.opacity&&i.cleartype&&t.style.filter)try{t.style.removeAttribute("filter")}catch(r){}}function a(t,i){i.next&&n(i.next).unbind(i.prevNextEvent),i.prev&&n(i.prev).unbind(i.prevNextEvent),(i.pager||i.pagerAnchorBuilder)&&n.each(i.pagerAnchors||[],function(){this.unbind().remove()}),i.pagerAnchors=null,n(t).unbind("mouseenter.cycle mouseleave.cycle"),i.destroy&&i.destroy(i)}function w(r,o,c,l,a){var at,w=n.extend({},n.fn.cycle.defaults,l||{},n.metadata?r.metadata():n.meta?r.data():{}),yt=n.isFunction(r.data)?r.data(w.metaAttr):null,rt,ot,it,k,vt,nt,g,st,lt,ct,pt,ht,d;if(yt&&(w=n.extend(w,yt)),w.autostop&&(w.countdown=w.autostopCount||c.length),rt=r[0],r.data("cycle.opts",w),w.$cont=r,w.stopCount=rt.cycleStop,w.elements=c,w.before=w.before?[w.before]:[],w.after=w.after?[w.after]:[],!n.support.opacity&&w.cleartype&&w.after.push(function(){h(this,w)}),w.continuous&&w.after.push(function(){u(c,w,0,!w.backwards)}),p(w),n.support.opacity||!w.cleartype||w.cleartypeNoBg||s(o),r.css("position")=="static"&&r.css("position","relative"),w.width&&r.width(w.width),w.height&&w.height!="auto"&&r.height(w.height),w.startingSlide!==t?(w.startingSlide=parseInt(w.startingSlide,10),w.startingSlide>=c.length||w.startSlide<0?w.startingSlide=0:at=!0):w.startingSlide=w.backwards?c.length-1:0,w.random){for(w.randomMap=[],ot=0;ot<c.length;ot++)w.randomMap.push(ot);if(w.randomMap.sort(function(){return Math.random()-.5}),at)for(it=0;it<c.length;it++)w.startingSlide==w.randomMap[it]&&(w.randomIndex=it);else w.randomIndex=1,w.startingSlide=w.randomMap[1]}else w.startingSlide>=c.length&&(w.startingSlide=0);if(w.currSlide=w.startingSlide||0,k=w.startingSlide,o.css({position:"absolute",top:0,left:0}).hide().each(function(t){var i;i=w.backwards?k?t<=k?c.length+(t-k):k-t:c.length-t:k?t>=k?c.length-(t-k):k-t:c.length-t,n(this).css("z-index",i)}),n(c[k]).css("opacity",1).show(),h(c[k],w),w.fit&&(w.aspect?o.each(function(){var t=n(this),i=w.aspect===!0?t.width()/t.height():w.aspect;w.width&&t.width()!=w.width&&(t.width(w.width),t.height(w.width/i)),w.height&&t.height()<w.height&&(t.height(w.height),t.width(w.height*i))}):(w.width&&o.width(w.width),w.height&&w.height!="auto"&&o.height(w.height))),w.center&&(!w.fit||w.aspect)&&o.each(function(){var t=n(this);t.css({"margin-left":w.width?(w.width-t.width())/2+"px":0,"margin-top":w.height?(w.height-t.height())/2+"px":0})}),!w.center||w.fit||w.slideResize||o.each(function(){var t=n(this);t.css({"margin-left":w.width?(w.width-t.width())/2+"px":0,"margin-top":w.height?(w.height-t.height())/2+"px":0})}),vt=w.containerResize&&!r.innerHeight(),vt){for(nt=0,g=0,st=0;st<c.length;st++){var tt=n(c[st]),et=tt[0],ft=tt.outerWidth(),ut=tt.outerHeight();ft||(ft=et.offsetWidth||et.width||tt.attr("width")),ut||(ut=et.offsetHeight||et.height||tt.attr("height")),nt=ft>nt?ft:nt,g=ut>g?ut:g}nt>0&&g>0&&r.css({width:nt+"px",height:g+"px"})}if((lt=!1,w.pause&&r.bind("mouseenter.cycle",function(){lt=!0,this.cyclePause++,f(rt,!0)}).bind("mouseleave.cycle",function(){lt&&this.cyclePause--,f(rt,!0)}),y(w)===!1)||(ct=!1,l.requeueAttempts=l.requeueAttempts||0,o.each(function(){var t=n(this);if(this.cycleH=w.fit&&w.height?w.height:t.height()||this.offsetHeight||this.height||t.attr("height")||0,this.cycleW=w.fit&&w.width?w.width:t.width()||this.offsetWidth||this.width||t.attr("width")||0,t.is("img")){var f=n.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete,e=n.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,r=n.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,u=this.cycleH===0&&this.cycleW===0&&!this.complete;if(f||e||r||u){if(a.s&&w.requeueOnImageNotLoaded&&++l.requeueAttempts<100)return i(l.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){n(a.s,a.c).cycle(l)},w.requeueTimeout),ct=!0,!1;i("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0}),ct))return!1;if(w.cssBefore=w.cssBefore||{},w.cssAfter=w.cssAfter||{},w.cssFirst=w.cssFirst||{},w.animIn=w.animIn||{},w.animOut=w.animOut||{},o.not(":eq("+k+")").css(w.cssBefore),n(o[k]).css(w.cssFirst),w.timeout)for(w.timeout=parseInt(w.timeout,10),w.speed.constructor==String&&(w.speed=n.fx.speeds[w.speed]||parseInt(w.speed,10)),w.sync||(w.speed=w.speed/2),pt=w.fx=="none"?0:w.fx=="shuffle"?500:250;w.timeout-w.speed<pt;)w.timeout+=w.speed;if(w.easing&&(w.easeIn=w.easeOut=w.easing),w.speedIn||(w.speedIn=w.speed),w.speedOut||(w.speedOut=w.speed),w.slideCount=c.length,w.currSlide=w.lastSlide=k,w.random?(++w.randomIndex==c.length&&(w.randomIndex=0),w.nextSlide=w.randomMap[w.randomIndex]):w.nextSlide=w.backwards?w.startingSlide===0?c.length-1:w.startingSlide-1:w.startingSlide>=c.length-1?0:w.startingSlide+1,!w.multiFx)if(ht=n.fn.cycle.transitions[w.fx],n.isFunction(ht))ht(r,o,w);else if(w.fx!="custom"&&!w.multiFx)return i("unknown transition: "+w.fx,"; slideshow terminating"),!1;return d=o[k],w.skipInitializationCallbacks||(w.before.length&&w.before[0].apply(d,[d,d,w,!0]),w.after.length&&w.after[0].apply(d,[d,d,w,!0])),w.next&&n(w.next).bind(w.prevNextEvent,function(n){return n.preventDefault(),e(w,1)}),w.prev&&n(w.prev).bind(w.prevNextEvent,function(n){return n.preventDefault(),e(w,0)}),(w.pager||w.pagerAnchorBuilder)&&v(c,w),b(w,c),w}function p(t){t.original={before:[],after:[]},t.original.cssBefore=n.extend({},t.cssBefore),t.original.cssAfter=n.extend({},t.cssAfter),t.original.animIn=n.extend({},t.animIn),t.original.animOut=n.extend({},t.animOut),n.each(t.before,function(){t.original.before.push(this)}),n.each(t.after,function(){t.original.after.push(this)})}function y(t){var u,o,f=n.fn.cycle.transitions,s,e,c,h;if(t.fx.indexOf(",")>0){for(t.multiFx=!0,t.fxs=t.fx.replace(/\s*/g,"").split(","),u=0;u<t.fxs.length;u++)s=t.fxs[u],o=f[s],o&&f.hasOwnProperty(s)&&n.isFunction(o)||(i("discarding unknown transition: ",s),t.fxs.splice(u,1),u--);if(!t.fxs.length)return i("No valid transitions named; slideshow terminating."),!1}else if(t.fx=="all"){t.multiFx=!0,t.fxs=[];for(e in f)f.hasOwnProperty(e)&&(o=f[e],f.hasOwnProperty(e)&&n.isFunction(o)&&t.fxs.push(e))}if(t.multiFx&&t.randomizeEffects){for(c=Math.floor(Math.random()*20)+30,u=0;u<c;u++)h=Math.floor(Math.random()*t.fxs.length),t.fxs.push(t.fxs.splice(h,1)[0]);r("randomized fx sequence: ",t.fxs)}return!0}function b(t,i){t.addSlide=function(r,u){var f=n(r),e=f[0];if(t.autostopCount||t.countdown++,i[u?"unshift":"push"](e),t.els&&t.els[u?"unshift":"push"](e),t.slideCount=i.length,t.random&&(t.randomMap.push(t.slideCount-1),t.randomMap.sort(function(){return Math.random()-.5})),f.css("position","absolute"),f[u?"prependTo":"appendTo"](t.$cont),u&&(t.currSlide++,t.nextSlide++),n.support.opacity||!t.cleartype||t.cleartypeNoBg||s(f),t.fit&&t.width&&f.width(t.width),t.fit&&t.height&&t.height!="auto"&&f.height(t.height),e.cycleH=t.fit&&t.height?t.height:f.height(),e.cycleW=t.fit&&t.width?t.width:f.width(),f.css(t.cssBefore),(t.pager||t.pagerAnchorBuilder)&&n.fn.cycle.createPagerAnchor(i.length-1,e,n(t.pager),i,t),n.isFunction(t.onAddSlide))t.onAddSlide(f);else f.hide()}}function u(i,f,e,s){function w(){var n=0,t=f.timeout;f.timeout&&!f.continuous?(n=o(i[f.currSlide],i[f.nextSlide],f,s),f.fx=="shuffle"&&(n-=f.speedOut)):f.continuous&&l.cyclePause&&(n=10),n>0&&(l.cycleTimeout=setTimeout(function(){u(i,f,0,!f.backwards)},n))}var l=f.$cont[0],c=i[f.currSlide],h=i[f.nextSlide],y,v,p,a;if(e&&f.busy&&f.manualTrump&&(r("manualTrump in go(), stopping active transition"),n(i).stop(!0,!0),f.busy=0,clearTimeout(l.cycleTimeout)),f.busy){r("transition active, ignoring new tx request");return}if(l.cycleStop==f.stopCount&&(l.cycleTimeout!==0||e)){if(!e&&!l.cyclePause&&!f.bounce&&(f.autostop&&--f.countdown<=0||f.nowrap&&!f.random&&f.nextSlide<f.currSlide)){f.end&&f.end(f);return}y=!1,(e||!l.cyclePause)&&f.nextSlide!=f.currSlide?(y=!0,v=f.fx,c.cycleH=c.cycleH||n(c).height(),c.cycleW=c.cycleW||n(c).width(),h.cycleH=h.cycleH||n(h).height(),h.cycleW=h.cycleW||n(h).width(),f.multiFx&&(s&&(f.lastFx===t||++f.lastFx>=f.fxs.length)?f.lastFx=0:!s&&(f.lastFx===t||--f.lastFx<0)&&(f.lastFx=f.fxs.length-1),v=f.fxs[f.lastFx]),f.oneTimeFx&&(v=f.oneTimeFx,f.oneTimeFx=null),n.fn.cycle.resetState(f,v),f.before.length&&n.each(f.before,function(n,t){l.cycleStop==f.stopCount&&t.apply(h,[c,h,f,s])}),p=function(){f.busy=0,n.each(f.after,function(n,t){l.cycleStop==f.stopCount&&t.apply(h,[c,h,f,s])}),l.cycleStop||w()},r("tx firing("+v+"); currSlide: "+f.currSlide+"; nextSlide: "+f.nextSlide),f.busy=1,f.fxFn?f.fxFn(c,h,f,p,s,e&&f.fastOnEvent):n.isFunction(n.fn.cycle[f.fx])?n.fn.cycle[f.fx](c,h,f,p,s,e&&f.fastOnEvent):n.fn.cycle.custom(c,h,f,p,s,e&&f.fastOnEvent)):w(),(y||f.nextSlide==f.currSlide)&&(f.lastSlide=f.currSlide,f.random?(f.currSlide=f.nextSlide,++f.randomIndex==i.length&&(f.randomIndex=0,f.randomMap.sort(function(){return Math.random()-.5})),f.nextSlide=f.randomMap[f.randomIndex],f.nextSlide==f.currSlide&&(f.nextSlide=f.currSlide==f.slideCount-1?0:f.currSlide+1)):f.backwards?(a=f.nextSlide-1<0,a&&f.bounce?(f.backwards=!f.backwards,f.nextSlide=1,f.currSlide=0):(f.nextSlide=a?i.length-1:f.nextSlide-1,f.currSlide=a?0:f.nextSlide+1)):(a=f.nextSlide+1==i.length,a&&f.bounce?(f.backwards=!f.backwards,f.nextSlide=i.length-2,f.currSlide=i.length-1):(f.nextSlide=a?0:f.nextSlide+1,f.currSlide=a?i.length-1:f.nextSlide-1))),y&&f.pager&&f.updateActivePagerLink(f.pager,f.currSlide,f.activePagerClass)}}function o(n,t,i,u){if(i.timeoutFn){for(var f=i.timeoutFn.call(n,n,t,i,u);i.fx!="none"&&f-i.speed<250;)f+=i.speed;if(r("calculated timeout: "+f+"; speed: "+i.speed),f!==!1)return f}return i.timeout}function e(t,i){var e=i?1:-1,r=t.elements,o=t.$cont[0],s=o.cycleTimeout,f;if(s&&(clearTimeout(s),o.cycleTimeout=0),t.random&&e<0)t.randomIndex--,--t.randomIndex==-2?t.randomIndex=r.length-2:t.randomIndex==-1&&(t.randomIndex=r.length-1),t.nextSlide=t.randomMap[t.randomIndex];else if(t.random)t.nextSlide=t.randomMap[t.randomIndex];else if(t.nextSlide=t.currSlide+e,t.nextSlide<0){if(t.nowrap)return!1;t.nextSlide=r.length-1}else if(t.nextSlide>=r.length){if(t.nowrap)return!1;t.nextSlide=0}f=t.onPrevNextEvent||t.prevNextClick,n.isFunction(f)&&f(e>0,t.nextSlide,r[t.nextSlide]),u(r,t,1,i);return}function v(t,i){var r=n(i.pager);n.each(t,function(u,f){n.fn.cycle.createPagerAnchor(u,f,r,t,i)}),i.updateActivePagerLink(i.pager,i.startingSlide,i.activePagerClass)}function s(t){function i(n){return n=parseInt(n,10).toString(16),n.length<2?"0"+n:n}function u(t){for(var r,u;t&&t.nodeName.toLowerCase()!="html";t=t.parentNode){if(r=n.css(t,"background-color"),r&&r.indexOf("rgb")>=0)return u=r.match(/\d+/g),"#"+i(u[0])+i(u[1])+i(u[2]);if(r&&r!="transparent")return r}return"#ffffff"}r("applying clearType background-color hack"),t.each(function(){n(this).css("background-color",u(this))})}var c="2.9999.5";n.support===t&&(n.support={opacity:!n.browser.msie}),n.expr[":"].paused=function(n){return n.cyclePause},n.fn.cycle=function(t,f){var e={s:this.selector,c:this.context};return this.length===0&&t!="stop"?!n.isReady&&e.s?(i("DOM not ready, queuing slideshow"),n(function(){n(e.s,e.c).cycle(t,f)}),this):(i("terminating; zero elements found by selector"+(n.isReady?"":" (DOM not ready)")),this):this.each(function(){var c=l(this,t,f),s,h;if(c!==!1){c.updateActivePagerLink=c.updateActivePagerLink||n.fn.cycle.updateActivePagerLink,this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0,this.cycleStop=0;var y=n(this),v=c.slideExpr?n(c.slideExpr,this):y.children(),a=v.get();if(a.length<2){i("terminating; too few slides: "+a.length);return}(s=w(y,v,a,c,e),s!==!1)&&(h=s.continuous?10:o(a[s.currSlide],a[s.nextSlide],s,!s.backwards),h&&(h+=s.delay||0,h<10&&(h=10),r("first timeout: "+h),this.cycleTimeout=setTimeout(function(){u(a,s,0,!c.backwards)},h)))}})},n.fn.cycle.resetState=function(t,i){i=i||t.fx,t.before=[],t.after=[],t.cssBefore=n.extend({},t.original.cssBefore),t.cssAfter=n.extend({},t.original.cssAfter),t.animIn=n.extend({},t.original.animIn),t.animOut=n.extend({},t.original.animOut),t.fxFn=null,n.each(t.original.before,function(){t.before.push(this)}),n.each(t.original.after,function(){t.after.push(this)});var r=n.fn.cycle.transitions[i];n.isFunction(r)&&r(t.$cont,n(t.elements),t)},n.fn.cycle.updateActivePagerLink=function(t,i,r){n(t).each(function(){n(this).children().removeClass(r).eq(i).addClass(r)})},n.fn.cycle.next=function(n){e(n,1)},n.fn.cycle.prev=function(n){e(n,0)},n.fn.cycle.createPagerAnchor=function(t,i,e,o,s){var l,h,v,y,c,a;(n.isFunction(s.pagerAnchorBuilder)?(l=s.pagerAnchorBuilder(t,i),r("pagerAnchorBuilder("+t+", el) returned: "+l)):l='<a href="#"> &#8226; </a>',l)&&(h=n(l),h.parents("body").length===0&&(v=[],e.length>1?(e.each(function(){var t=h.clone(!0);n(this).append(t),v.push(t[0])}),h=n(v)):h.appendTo(e)),s.pagerAnchors=s.pagerAnchors||[],s.pagerAnchors.push(h),y=function(i){var e,f,r;i.preventDefault(),s.nextSlide=t,e=s.$cont[0],f=e.cycleTimeout,f&&(clearTimeout(f),e.cycleTimeout=0),r=s.onPagerEvent||s.pagerClick,n.isFunction(r)&&r(s.nextSlide,o[s.nextSlide]),u(o,s,1,s.currSlide<t)},/mouseenter|mouseover/i.test(s.pagerEvent)?h.hover(y,function(){}):h.bind(s.pagerEvent,y),/^click/.test(s.pagerEvent)||s.allowPagerClickBubble||h.bind("click.cycle",function(){return!1}),c=s.$cont[0],a=!1,s.pauseOnPagerHover&&h.hover(function(){a=!0,c.cyclePause++,f(c,!0,!0)},function(){a&&c.cyclePause--,f(c,!0,!0)}))},n.fn.cycle.hopsFromLast=function(n,t){var u,i=n.lastSlide,r=n.currSlide;return u=t?r>i?r-i:n.slideCount-i:r<i?i-r:i+n.slideCount-r},n.fn.cycle.commonReset=function(t,i,r,u,f,e){n(r.elements).not(t).hide(),typeof r.cssBefore.opacity=="undefined"&&(r.cssBefore.opacity=1),r.cssBefore.display="block",r.slideResize&&u!==!1&&i.cycleW>0&&(r.cssBefore.width=i.cycleW),r.slideResize&&f!==!1&&i.cycleH>0&&(r.cssBefore.height=i.cycleH),r.cssAfter=r.cssAfter||{},r.cssAfter.display="none",n(t).css("zIndex",r.slideCount+(e===!0?1:0)),n(i).css("zIndex",r.slideCount+(e===!0?0:1))},n.fn.cycle.custom=function(t,i,r,u,f,e){var l=n(t),a=n(i),o=r.speedIn,s=r.speedOut,v=r.easeIn,c=r.easeOut,h;a.css(r.cssBefore),e&&(o=typeof e=="number"?s=e:s=1,v=c=null),h=function(){a.animate(r.animIn,o,v,function(){u()})},l.animate(r.animOut,s,c,function(){l.css(r.cssAfter),r.sync||h()}),r.sync&&h()},n.fn.cycle.transitions={fade:function(t,i,r){i.not(":eq("+r.currSlide+")").css("opacity",0),r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r),r.cssBefore.opacity=0}),r.animIn={opacity:1},r.animOut={opacity:0},r.cssBefore={top:0,left:0}}},n.fn.cycle.ver=function(){return c},n.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!n.support.opacity,cleartypeNoBg:!1,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:t,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
/*!
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(n){"use strict";n.fn.cycle.transitions.none=function(t,i,r){r.fxFn=function(t,i,r,u){n(i).show(),n(t).hide(),u()}},n.fn.cycle.transitions.fadeout=function(t,i,r){i.not(":eq("+r.currSlide+")").css({display:"block",opacity:1}),r.before.push(function(t,i,r,u,f,e){n(t).css("zIndex",r.slideCount+(e!==!0?1:0)),n(i).css("zIndex",r.slideCount+(e!==!0?0:1))}),r.animIn.opacity=1,r.animOut.opacity=0,r.cssBefore.opacity=1,r.cssBefore.display="block",r.cssAfter.zIndex=0},n.fn.cycle.transitions.scrollUp=function(t,i,r){t.css("overflow","hidden"),r.before.push(n.fn.cycle.commonReset);var u=t.height();r.cssBefore.top=u,r.cssBefore.left=0,r.cssFirst.top=0,r.animIn.top=0,r.animOut.top=-u},n.fn.cycle.transitions.scrollDown=function(t,i,r){t.css("overflow","hidden"),r.before.push(n.fn.cycle.commonReset);var u=t.height();r.cssFirst.top=0,r.cssBefore.top=-u,r.cssBefore.left=0,r.animIn.top=0,r.animOut.top=u},n.fn.cycle.transitions.scrollLeft=function(t,i,r){t.css("overflow","hidden"),r.before.push(n.fn.cycle.commonReset);var u=t.width();r.cssFirst.left=0,r.cssBefore.left=u,r.cssBefore.top=0,r.animIn.left=0,r.animOut.left=0-u},n.fn.cycle.transitions.scrollRight=function(t,i,r){t.css("overflow","hidden"),r.before.push(n.fn.cycle.commonReset);var u=t.width();r.cssFirst.left=0,r.cssBefore.left=-u,r.cssBefore.top=0,r.animIn.left=0,r.animOut.left=u},n.fn.cycle.transitions.scrollHorz=function(t,i,r){t.css("overflow","hidden").width(),r.before.push(function(t,i,r,u){r.rev&&(u=!u),n.fn.cycle.commonReset(t,i,r),r.cssBefore.left=u?i.cycleW-1:1-i.cycleW,r.animOut.left=u?-t.cycleW:t.cycleW}),r.cssFirst.left=0,r.cssBefore.top=0,r.animIn.left=0,r.animOut.top=0},n.fn.cycle.transitions.scrollVert=function(t,i,r){t.css("overflow","hidden"),r.before.push(function(t,i,r,u){r.rev&&(u=!u),n.fn.cycle.commonReset(t,i,r),r.cssBefore.top=u?1-i.cycleH:i.cycleH-1,r.animOut.top=u?t.cycleH:-t.cycleH}),r.cssFirst.top=0,r.cssBefore.left=0,r.animIn.top=0,r.animOut.left=0},n.fn.cycle.transitions.slideX=function(t,i,r){r.before.push(function(t,i,r){n(r.elements).not(t).hide(),n.fn.cycle.commonReset(t,i,r,!1,!0),r.animIn.width=i.cycleW}),r.cssBefore.left=0,r.cssBefore.top=0,r.cssBefore.width=0,r.animIn.width="show",r.animOut.width=0},n.fn.cycle.transitions.slideY=function(t,i,r){r.before.push(function(t,i,r){n(r.elements).not(t).hide(),n.fn.cycle.commonReset(t,i,r,!0,!1),r.animIn.height=i.cycleH}),r.cssBefore.left=0,r.cssBefore.top=0,r.cssBefore.height=0,r.animIn.height="show",r.animOut.height=0},n.fn.cycle.transitions.shuffle=function(t,i,r){var u,f=t.css("overflow","visible").width();for(i.css({left:0,top:0}),r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0)}),r.speedAdjusted||(r.speed=r.speed/2,r.speedAdjusted=!0),r.random=0,r.shuffle=r.shuffle||{left:-f,top:15},r.els=[],u=0;u<i.length;u++)r.els.push(i[u]);for(u=0;u<r.currSlide;u++)r.els.push(r.els.shift());r.fxFn=function(t,i,r,u,f){var e,o;r.rev&&(f=!f),e=f?n(t):n(i),n(i).css(r.cssBefore),o=r.slideCount,e.animate(r.shuffle,r.speedIn,r.easeIn,function(){for(var l=n.fn.cycle.hopsFromLast(r,f),i,s,c,h=0;h<l;h++)f?r.els.push(r.els.shift()):r.els.unshift(r.els.pop());if(f)for(i=0,s=r.els.length;i<s;i++)n(r.els[i]).css("z-index",s-i+o);else c=n(t).css("z-index"),e.css("z-index",parseInt(c,10)+1+o);e.animate({left:0,top:0},r.speedOut,r.easeOut,function(){n(f?this:t).hide(),u&&u()})})},n.extend(r.cssBefore,{display:"block",opacity:1,top:0,left:0})},n.fn.cycle.transitions.turnUp=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1),r.cssBefore.top=i.cycleH,r.animIn.height=i.cycleH,r.animOut.width=i.cycleW}),r.cssFirst.top=0,r.cssBefore.left=0,r.cssBefore.height=0,r.animIn.top=0,r.animOut.height=0},n.fn.cycle.transitions.turnDown=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1),r.animIn.height=i.cycleH,r.animOut.top=t.cycleH}),r.cssFirst.top=0,r.cssBefore.left=0,r.cssBefore.top=0,r.cssBefore.height=0,r.animOut.height=0},n.fn.cycle.transitions.turnLeft=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0),r.cssBefore.left=i.cycleW,r.animIn.width=i.cycleW}),r.cssBefore.top=0,r.cssBefore.width=0,r.animIn.left=0,r.animOut.width=0},n.fn.cycle.transitions.turnRight=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0),r.animIn.width=i.cycleW,r.animOut.left=t.cycleW}),n.extend(r.cssBefore,{top:0,left:0,width:0}),r.animIn.left=0,r.animOut.width=0},n.fn.cycle.transitions.zoom=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!1,!0),r.cssBefore.top=i.cycleH/2,r.cssBefore.left=i.cycleW/2,n.extend(r.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH}),n.extend(r.animOut,{width:0,height:0,top:t.cycleH/2,left:t.cycleW/2})}),r.cssFirst.top=0,r.cssFirst.left=0,r.cssBefore.width=0,r.cssBefore.height=0},n.fn.cycle.transitions.fadeZoom=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!1),r.cssBefore.left=i.cycleW/2,r.cssBefore.top=i.cycleH/2,n.extend(r.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH})}),r.cssBefore.width=0,r.cssBefore.height=0,r.animOut.opacity=0},n.fn.cycle.transitions.blindX=function(t,i,r){var u=t.css("overflow","hidden").width();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r),r.animIn.width=i.cycleW,r.animOut.left=t.cycleW}),r.cssBefore.left=u,r.cssBefore.top=0,r.animIn.left=0,r.animOut.left=u},n.fn.cycle.transitions.blindY=function(t,i,r){var u=t.css("overflow","hidden").height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r),r.animIn.height=i.cycleH,r.animOut.top=t.cycleH}),r.cssBefore.top=u,r.cssBefore.left=0,r.animIn.top=0,r.animOut.top=u},n.fn.cycle.transitions.blindZ=function(t,i,r){var f=t.css("overflow","hidden").height(),u=t.width();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r),r.animIn.height=i.cycleH,r.animOut.top=t.cycleH}),r.cssBefore.top=f,r.cssBefore.left=u,r.animIn.top=0,r.animIn.left=0,r.animOut.top=f,r.animOut.left=u},n.fn.cycle.transitions.growX=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0),r.cssBefore.left=this.cycleW/2,r.animIn.left=0,r.animIn.width=this.cycleW,r.animOut.left=0}),r.cssBefore.top=0,r.cssBefore.width=0},n.fn.cycle.transitions.growY=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1),r.cssBefore.top=this.cycleH/2,r.animIn.top=0,r.animIn.height=this.cycleH,r.animOut.top=0}),r.cssBefore.height=0,r.cssBefore.left=0},n.fn.cycle.transitions.curtainX=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0,!0),r.cssBefore.left=i.cycleW/2,r.animIn.left=0,r.animIn.width=this.cycleW,r.animOut.left=t.cycleW/2,r.animOut.width=0}),r.cssBefore.top=0,r.cssBefore.width=0},n.fn.cycle.transitions.curtainY=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1,!0),r.cssBefore.top=i.cycleH/2,r.animIn.top=0,r.animIn.height=i.cycleH,r.animOut.top=t.cycleH/2,r.animOut.height=0}),r.cssBefore.height=0,r.cssBefore.left=0},n.fn.cycle.transitions.cover=function(t,i,r){var u=r.direction||"left",e=t.css("overflow","hidden").width(),f=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r),u=="right"?r.cssBefore.left=-e:u=="up"?r.cssBefore.top=f:u=="down"?r.cssBefore.top=-f:r.cssBefore.left=e}),r.animIn.left=0,r.animIn.top=0,r.cssBefore.top=0,r.cssBefore.left=0},n.fn.cycle.transitions.uncover=function(t,i,r){var u=r.direction||"left",e=t.css("overflow","hidden").width(),f=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0),u=="right"?r.animOut.left=e:u=="up"?r.animOut.top=-f:u=="down"?r.animOut.top=f:r.animOut.left=-e}),r.animIn.left=0,r.animIn.top=0,r.cssBefore.top=0,r.cssBefore.left=0},n.fn.cycle.transitions.toss=function(t,i,r){var f=t.css("overflow","visible").width(),u=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0),r.animOut.left||r.animOut.top?r.animOut.opacity=0:n.extend(r.animOut,{left:f*2,top:-u/2,opacity:0})}),r.cssBefore.left=0,r.cssBefore.top=0,r.animIn.left=0},n.fn.cycle.transitions.wipe=function(t,i,r){var f=t.css("overflow","hidden").width(),u=t.height(),e,l,a;r.cssBefore=r.cssBefore||{},r.clip&&(/l2r/.test(r.clip)?e="rect(0px 0px "+u+"px 0px)":/r2l/.test(r.clip)?e="rect(0px "+f+"px "+u+"px "+f+"px)":/t2b/.test(r.clip)?e="rect(0px "+f+"px 0px 0px)":/b2t/.test(r.clip)?e="rect("+u+"px "+f+"px "+u+"px 0px)":/zoom/.test(r.clip)&&(l=parseInt(u/2,10),a=parseInt(f/2,10),e="rect("+l+"px "+a+"px "+l+"px "+a+"px)")),r.cssBefore.clip=r.cssBefore.clip||e||"rect(0px 0px 0px 0px)";var o=r.cssBefore.clip.match(/(\d+)/g),v=parseInt(o[0],10),s=parseInt(o[1],10),c=parseInt(o[2],10),h=parseInt(o[3],10);r.before.push(function(t,i,r){var l,a,e,o;t!=i&&(l=n(t),a=n(i),n.fn.cycle.commonReset(t,i,r,!0,!0,!1),r.cssAfter.display="block",e=1,o=parseInt(r.speedIn/13,10)-1,function y(){var i=v?v-parseInt(e*(v/o),10):0,r=h?h-parseInt(e*(h/o),10):0,n=c<u?c+parseInt(e*((u-c)/o||1),10):u,t=s<f?s+parseInt(e*((f-s)/o||1),10):f;a.css({clip:"rect("+i+"px "+t+"px "+n+"px "+r+"px)"}),e++<=o?setTimeout(y,13):l.css("display","none")}())}),n.extend(r.cssBefore,{display:"block",opacity:1,top:0,left:0}),r.animIn={left:0},r.animOut={left:0}}})(jQuery);(function(n){n.fn.touchwipe=function(t){var i={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};return t&&n.extend(i,t),this.each(function(){function u(){this.removeEventListener("touchmove",r),t=null,n=!1}function r(r){if(i.preventDefaultEvents&&r.preventDefault(),n){var h=r.touches[0].pageX,s=r.touches[0].pageY,e=t-h,o=f-s;Math.abs(e)>=i.min_move_x?(u(),e>0?i.wipeLeft():i.wipeRight()):Math.abs(o)>=i.min_move_y&&(u(),o>0?i.wipeDown():i.wipeUp())}}function e(i){i.touches.length==1&&(t=i.touches[0].pageX,f=i.touches[0].pageY,n=!0,this.addEventListener("touchmove",r,!1))}var t,f,n=!1;"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",e,!1)}),this}})(jQuery);(function(n){n.fn.lazyload=function(t){var i={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window},r;return t&&n.extend(i,t),r=this,"scroll"==i.event&&n(i.container).bind("scroll",function(){var f=0,u;r.each(function(){if(!n.abovethetop(this,i)&&!n.leftofbegin(this,i))if(n.belowthefold(this,i)||n.rightoffold(this,i)){if(f++>i.failurelimit)return!1}else n(this).trigger("appear")}),u=n.grep(r,function(n){return!n.loaded}),r=n(u)}),this.each(function(){var t=this;undefined==n(t).attr("original")&&n(t).attr("original",n(t).attr("src")),"scroll"!=i.event||undefined==n(t).attr("src")||i.placeholder==n(t).attr("src")||n.abovethetop(t,i)||n.leftofbegin(t,i)||n.belowthefold(t,i)||n.rightoffold(t,i)?(i.placeholder?n(t).attr("src",i.placeholder):n(t).removeAttr("src"),t.loaded=!1):t.loaded=!0;n(t).one("appear",function(){this.loaded||n("<img />").bind("load",function(){n(t).hide().attr("src",n(t).attr("original"))[i.effect](i.effectspeed),t.loaded=!0}).attr("src",n(t).attr("original"))});"scroll"!=i.event&&n(t).bind(i.event,function(){t.loaded||n(t).trigger("appear")})}),n(i.container).trigger(i.event),this},n.belowthefold=function(t,i){var r;return r=i.container===undefined||i.container===window?n(window).height()+n(window).scrollTop():n(i.container).offset().top+n(i.container).height(),r<=n(t).offset().top-i.threshold},n.rightoffold=function(t,i){var r;return r=i.container===undefined||i.container===window?n(window).width()+n(window).scrollLeft():n(i.container).offset().left+n(i.container).width(),r<=n(t).offset().left-i.threshold},n.abovethetop=function(t,i){var r;return r=i.container===undefined||i.container===window?n(window).scrollTop():n(i.container).offset().top,r>=n(t).offset().top+i.threshold+n(t).height()},n.leftofbegin=function(t,i){var r;return r=i.container===undefined||i.container===window?n(window).scrollLeft():n(i.container).offset().left,r>=n(t).offset().left+i.threshold+n(t).width()},n.extend(n.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);var Konami=function(n){var t={addEvent:function(n,t,i,r){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent&&(n["e"+t+i]=i,n[t+i]=function(){n["e"+t+i](window.event,r)},n.attachEvent("on"+t,n[t+i]))},input:"",pattern:"38384040373937396665",load:function(n){this.addEvent(document,"keydown",function(i,r){return r&&(t=r),t.input+=i?i.keyCode:event.keyCode,t.input.length>t.pattern.length&&(t.input=t.input.substr(t.input.length-t.pattern.length)),t.input==t.pattern?(t.code(n),t.input="",i.preventDefault(),!1):void 0},this),this.iphone.load(n)},code:function(n){window.location=n},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP"],code:function(n){t.code(n)},load:function(n){this.orig_keys=this.keys,t.addEvent(document,"touchmove",function(n){if(n.touches.length==1&&t.iphone.capture==!0){var i=n.touches[0];t.iphone.stop_x=i.pageX,t.iphone.stop_y=i.pageY,t.iphone.tap=!1,t.iphone.capture=!1,t.iphone.check_direction()}}),t.addEvent(document,"touchend",function(){t.iphone.tap==!0&&t.iphone.check_direction(n)},!1),t.addEvent(document,"touchstart",function(n){t.iphone.start_x=n.changedTouches[0].pageX,t.iphone.start_y=n.changedTouches[0].pageY,t.iphone.tap=!0,t.iphone.capture=!0})},check_direction:function(n){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=this.tap==!0?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),this.keys.length==0&&(this.keys=this.orig_keys,this.code(n))}}};return typeof n=="string"&&t.load(n),typeof n=="function"&&(t.code=n,t.load()),t};(function(){var n=new Konami;n.code=function(){$("#sub-items > .widget").addClass("sp-widget"),$("#headline").addClass("CongressOccupied")},n.load()})();document.write(["<style>",".hf_top_ad { position: absolute; left: 50%; top: 50%; z-index: 10000; }",".hf_top_ad_close { position: fixed; background: url(//s1.hfcdn.com/fp/hf/js/agent/lib/fancybox/fancybox_sprite.png); top: 50%; left: 50%; width: 36px; height: 36px; z-index: 10001; }",".hf_top_ad_layer { position: fixed; background: rgba(0,0,0,.5); width: 100%; height: 100%; left: 0; bottom: 0; z-index: 9999;  }","</style>"].join(""));var HF=HF||{};HF.topAD=function(n){var v="//admd.housefun.com.tw/LAYOUT.aspx?ID=170.149E9677A5989FD342AE44213DF68868",s="hf_top_ad",p="Jan 31, 2015",o=!1,t=n('<div class="hf_top_ad_layer"></div>'),i=n('<div class="hf_top_ad_close"></div>'),y=n("body"),r,u,e=e||[],b=function(n){var i=new RegExp(n+"=[^;]+","i"),t;return t=document.cookie.match(i)?document.cookie.match(i)[0].split("=")[1]:null},w=function(n,t,i){document.cookie=n+"="+t+"; expires="+i.toGMTString()+";  path=/"},c=function(n,t){var i,u,r=parseInt(n,10);return n=r||r===0?r:30,i=t?new Date(t):new Date,u=i.setDate(i.getDate()+n),i},h=function(t){var e=new Image;e.onload=function(){r=n(e),r.addClass("hf_top_ad").css({"margin-left":-(e.width/2),"margin-top":-(e.height/2)}),i.css({"margin-left":e.width/2-18,"margin-top":-(e.height/2)-18});u.attr({href:t.AD_URL,target:"_blank"}).append(r).on("click",f)},u=n("<a></a>"),e.src=t.AD_FILENAME},a=function(n){var o,r,l;if(n=n||[],data=n[0]||{},data.AD_URL&&data.AD_FILENAME){for(data.AD_FILENAME=data.AD_FILENAME||"",o=(b(s)||"").split(","),r=0,l=o.length,r;r<l;r++)if(o[r]===data.AD_FILENAME)return;h(data),t.append(u),y.append(t).append(i);t.on("click",f);i.on("click",f);o.push(data.AD_FILENAME),w(s,o.join(","),c(730)),e.push(data.AD_ID_ENCODE)}},f=function(){o||(o=1,i.hide(),t.hide(),r.hide())},l=function(){var i=+new Date,t=+new Date(p);n.ajax({url:v,type:"get",dataType:"jsonp",success:a})};return{init:l}}(jQuery);$(document).on("ready",HF.topAD.init);