// JavaScript Document


function openLightbox(url, width, height, iframe){
	$(function(){
		var isIframe = iframe || true;
		$.colorbox({href:url, width:width, height:height, iframe:isIframe});
	});
}

$(function(){
	$("#openvideo").click(function(){
		openLightbox("video.html",650,390,false);
		return false;	
	});
	
	// Buy Tickets tabs.
	$("#tickets div.ticketsNav").css("display", "none");
	$("#tickets").tabs("#tickets div.ticketsNav", {
		tabs: 'img.tag',
		effect: 'slide',
		initialIndex: null,
		onBeforeClick: function(event, tabIndex) {
			// Set current tab BG color.
			$("#ticketsNav" + tabIndex).addClass("ticketsActive")
			
			// Set all others to transparent.
			for(t=0; t<=3; t++) {
				if (t == tabIndex) continue;
				$("#ticketsNav" + t).removeClass("ticketsActive")
			}
		}
	});
	
	// Press tabs.
	pressTabs();
	
	// AJAX forms.
	ajaxify();
	displayErrors();
});


/**
 * Setup press tabs.
 */
function pressTabs() {
	// Press tabs.
	$("#press-tabs .press-panel").css("display", "none");
	$("#press-tabs").tabs("#press-tabs div.press-panel", {
		tabs: 'a.press-tab',
		effect: 'slide',
		initialIndex: null
	});
}



/**
 * Turns forms with special "ajax" class into AJAX forms.
 * Note: Requires compatible PHP code on server-side in order to
 * receive and properly display HTML based on passed "ajax" variable.
 */
var ajaxconfig = {};
function ajaxify() {
	$("form.ajax").submit(function(){
		// Get form properties.
		action = $(this).attr("action");
		if (action.indexOf("#") != -1) {
			// Parse out trailing hash.
			action = action.substring(0, action.indexOf("#"))
		}
		method = $(this).attr("method").toUpperCase();
		if (method != "GET" && method != "POST") method = "POST";
		formid = $(this).attr("id");
		if (formid == "") {
			// Dynamically assign ID.
			formid = "form" + parseInt(Math.random() * 9999);
			$(this).attr("id", formid);
		}
		
		// Add "ajax" field to form and serialize data.
		$(this).append("<input type=\"hidden\" name=\"ajax\" value=\"1\" />");
		data = $(this).serialize();
		
		// Disable form fields to show it is processing.
		$("#" + formid + " input").attr("disabled", "disabled");
		$("#" + formid + " textarea").attr("disabled", "disabled");
		
		// Configure AJAX call.
		ajaxconfig = {
			type: method,
			url: action,
			data: data,
			success: function(data, textStatus, XMLHttpRequest) {
				// Update form contents and animate error messages, if applicable.
				$("#" + this.formid).html(data);
				displayErrors();
			},
			formid: formid
		};
		
		// Give error message time to scroll up before submitting AJAX call.
		if ($(".errmsg").length > 0) {
			$(".errmsg").slideUp(200, function() {
				ajaxify_submit();
			});
		} else {
			ajaxify_submit();
		}
		
		// Prevent form from submitting.
		return false;
	});
}

// AJAX submit callback.
function ajaxify_submit() {
	$.ajax(ajaxconfig);
}


/**
 * Animates error messages.
 */
function displayErrors() {
	$(".errmsg").css({
		"display": "none"
	});
	$(".errmsg").slideDown(500);
}


/*
 * jquery.tools 1.1.2 - The missing UI library for the Web
 * 
 * [tools.tabs-1.0.4, tools.tabs.history-1.0.2]
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 * 
 * -----
 * 
 * File generated: Wed Oct 07 14:53:36 GMT+00:00 2009
 */
(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery);
(function(d){var a=d.tools.tabs;a.plugins=a.plugins||{};a.plugins.history={version:"1.0.2",conf:{api:false}};var e,b;function c(f){if(f){var g=b.contentWindow.document;g.open().close();g.location.hash=f}}d.fn.onHash=function(g){var f=this;if(d.browser.msie&&d.browser.version<"8"){if(!b){b=d("<iframe/>").attr("src","javascript:false;").hide().get(0);d("body").append(b);setInterval(function(){var i=b.contentWindow.document,j=i.location.hash;if(e!==j){d.event.trigger("hash",j);e=j}},100);c(location.hash||"#")}f.bind("click.hash",function(h){c(d(this).attr("href"))})}else{setInterval(function(){var j=location.hash;var i=f.filter("[href$="+j+"]");if(!i.length){j=j.replace("#","");i=f.filter("[href$="+j+"]")}if(i.length&&j!==e){e=j;d.event.trigger("hash",j)}},100)}d(window).bind("hash",g);return this};d.fn.history=function(g){var h=d.extend({},a.plugins.history.conf),f;g=d.extend(h,g);this.each(function(){var j=d(this).tabs(),i=j.getTabs();if(j){f=j}i.onHash(function(k,l){if(!l||l=="#"){l=j.getConf().initialIndex}j.click(l)});i.click(function(k){location.hash=d(this).attr("href").replace("#","")})});return g.api?f:this}})(jQuery);

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


$(function(){
	$("#photo_cont").cycle();
});

// Cycle plugin
(function(e,c){function h(b){e.fn.cycle.debug&&a(b)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function j(b,g,a){var d=e(b).data("cycle.opts"),c=!!b.cyclePause;c&&d.paused?d.paused(b,d,g,a):!c&&d.resumed&&d.resumed(b,d,g,a)}function i(b,g,k){function d(b,g,k){if(!b&&g===true){b=e(k).data("cycle.opts");if(!b)return a("options not found, can not resume"),false;if(k.cycleTimeout)clearTimeout(k.cycleTimeout),k.cycleTimeout=0;t(b.elements,
b,1,!b.backwards)}}if(b.cycleStop==c)b.cycleStop=0;if(g===c||g===null)g={};if(g.constructor==String)switch(g){case "destroy":case "stop":k=e(b).data("cycle.opts");if(!k)return false;b.cycleStop++;b.cycleTimeout&&clearTimeout(b.cycleTimeout);b.cycleTimeout=0;k.elements&&e(k.elements).stop();e(b).removeData("cycle.opts");g=="destroy"&&l(k);return false;case "toggle":return b.cyclePause=b.cyclePause===1?0:1,d(b.cyclePause,k,b),j(b),false;case "pause":return b.cyclePause=1,j(b),false;case "resume":return b.cyclePause=
0,d(false,k,b),j(b),false;case "prev":case "next":k=e(b).data("cycle.opts");if(!k)return a('options not found, "prev/next" ignored'),false;e.fn.cycle[g](k);return false;default:g={fx:g}}else if(g.constructor==Number){var i=g,g=e(b).data("cycle.opts");if(!g)return a("options not found, can not advance slide"),false;if(i<0||i>=g.elements.length)return a("invalid slide index: "+i),false;g.nextSlide=i;if(b.cycleTimeout)clearTimeout(b.cycleTimeout),b.cycleTimeout=0;if(typeof k=="string")g.oneTimeFx=k;
t(g.elements,g,1,i>=g.currSlide);return false}return g}function d(b,g){if(!e.support.opacity&&g.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(a){}}function l(b){b.next&&e(b.next).unbind(b.prevNextEvent);b.prev&&e(b.prev).unbind(b.prevNextEvent);if(b.pager||b.pagerAnchorBuilder)e.each(b.pagerAnchors||[],function(){this.unbind().remove()});b.pagerAnchors=null;b.destroy&&b.destroy(b)}function n(b,g,k,i,z){var q,f=e.extend({},e.fn.cycle.defaults,i||{},e.metadata?b.metadata():e.meta?
b.data():{}),h=e.isFunction(b.data)?b.data(f.metaAttr):null;h&&(f=e.extend(f,h));if(f.autostop)f.countdown=f.autostopCount||k.length;var l=b[0];b.data("cycle.opts",f);f.$cont=b;f.stopCount=l.cycleStop;f.elements=k;f.before=f.before?[f.before]:[];f.after=f.after?[f.after]:[];!e.support.opacity&&f.cleartype&&f.after.push(function(){d(this,f)});f.continuous&&f.after.push(function(){t(k,f,0,!f.backwards)});m(f);!e.support.opacity&&f.cleartype&&!f.cleartypeNoBg&&r(g);b.css("position")=="static"&&b.css("position",
"relative");f.width&&b.width(f.width);f.height&&f.height!="auto"&&b.height(f.height);f.startingSlide!=c?(f.startingSlide=parseInt(f.startingSlide,10),f.startingSlide>=k.length||f.startSlide<0?f.startingSlide=0:q=true):f.startingSlide=f.backwards?k.length-1:0;if(f.random){f.randomMap=[];for(h=0;h<k.length;h++)f.randomMap.push(h);f.randomMap.sort(function(){return Math.random()-0.5});if(q)for(q=0;q<k.length;q++){if(f.startingSlide==f.randomMap[q])f.randomIndex=q}else f.randomIndex=1,f.startingSlide=
f.randomMap[1]}else if(f.startingSlide>=k.length)f.startingSlide=0;f.currSlide=f.startingSlide||0;var o=f.startingSlide;g.css({position:"absolute",top:0,left:0}).hide().each(function(b){b=f.backwards?o?b<=o?k.length+(b-o):o-b:k.length-b:o?b>=o?k.length-(b-o):o-b:k.length-b;e(this).css("z-index",b)});e(k[o]).css("opacity",1).show();d(k[o],f);f.fit&&(f.aspect?g.each(function(){var b=e(this),g=f.aspect===true?b.width()/b.height():f.aspect;f.width&&b.width()!=f.width&&(b.width(f.width),b.height(f.width/
g));f.height&&b.height()<f.height&&(b.height(f.height),b.width(f.height*g))}):(f.width&&g.width(f.width),f.height&&f.height!="auto"&&g.height(f.height)));f.center&&(!f.fit||f.aspect)&&g.each(function(){var b=e(this);b.css({"margin-left":f.width?(f.width-b.width())/2+"px":0,"margin-top":f.height?(f.height-b.height())/2+"px":0})});f.center&&!f.fit&&!f.slideResize&&g.each(function(){var b=e(this);b.css({"margin-left":f.width?(f.width-b.width())/2+"px":0,"margin-top":f.height?(f.height-b.height())/2+
"px":0})});if(f.containerResize&&!b.innerHeight()){for(var n=h=q=0;n<k.length;n++){var v=e(k[n]),w=v[0],u=v.outerWidth(),x=v.outerHeight();u||(u=w.offsetWidth||w.width||v.attr("width"));x||(x=w.offsetHeight||w.height||v.attr("height"));q=u>q?u:q;h=x>h?x:h}q>0&&h>0&&b.css({width:q+"px",height:h+"px"})}var B=false;f.pause&&b.hover(function(){B=true;this.cyclePause++;j(l,true)},function(){B&&this.cyclePause--;j(l,true)});if(s(f)===false)return false;var C=false;i.requeueAttempts=i.requeueAttempts||0;
g.each(function(){var b=e(this);this.cycleH=f.fit&&f.height?f.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0;this.cycleW=f.fit&&f.width?f.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")){var b=e.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,g=e.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,k=this.cycleH==0&&this.cycleW==0&&!this.complete;if(e.browser.msie&&this.cycleW==
28&&this.cycleH==30&&!this.complete||b||g||k)if(z.s&&f.requeueOnImageNotLoaded&&++i.requeueAttempts<100)return a(i.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){e(z.s,z.c).cycle(i)},f.requeueTimeout),C=true,false;else a("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(C)return false;f.cssBefore=f.cssBefore||{};f.cssAfter=f.cssAfter||{};f.cssFirst=f.cssFirst||{};f.animIn=f.animIn||{};
f.animOut=f.animOut||{};g.not(":eq("+o+")").css(f.cssBefore);e(g[o]).css(f.cssFirst);if(f.timeout){f.timeout=parseInt(f.timeout,10);if(f.speed.constructor==String)f.speed=e.fx.speeds[f.speed]||parseInt(f.speed,10);f.sync||(f.speed/=2);for(q=f.fx=="none"?0:f.fx=="shuffle"?500:250;f.timeout-f.speed<q;)f.timeout+=f.speed}if(f.easing)f.easeIn=f.easeOut=f.easing;if(!f.speedIn)f.speedIn=f.speed;if(!f.speedOut)f.speedOut=f.speed;f.slideCount=k.length;f.currSlide=f.lastSlide=o;if(f.random){if(++f.randomIndex==
k.length)f.randomIndex=0;f.nextSlide=f.randomMap[f.randomIndex]}else f.nextSlide=f.backwards?f.startingSlide==0?k.length-1:f.startingSlide-1:f.startingSlide>=k.length-1?0:f.startingSlide+1;if(!f.multiFx)if(q=e.fn.cycle.transitions[f.fx],e.isFunction(q))q(b,g,f);else if(f.fx!="custom"&&!f.multiFx)return a("unknown transition: "+f.fx,"; slideshow terminating"),false;b=g[o];f.skipInitializationCallbacks||(f.before.length&&f.before[0].apply(b,[b,b,f,true]),f.after.length&&f.after[0].apply(b,[b,b,f,true]));
f.next&&e(f.next).bind(f.prevNextEvent,function(){return y(f,1)});f.prev&&e(f.prev).bind(f.prevNextEvent,function(){return y(f,0)});(f.pager||f.pagerAnchorBuilder)&&A(k,f);D(f,k);return f}function m(b){b.original={before:[],after:[]};b.original.cssBefore=e.extend({},b.cssBefore);b.original.cssAfter=e.extend({},b.cssAfter);b.original.animIn=e.extend({},b.animIn);b.original.animOut=e.extend({},b.animOut);e.each(b.before,function(){b.original.before.push(this)});e.each(b.after,function(){b.original.after.push(this)})}
function s(b){var g,k,d=e.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(g=0;g<b.fxs.length;g++){var i=b.fxs[g];k=d[i];if(!k||!d.hasOwnProperty(i)||!e.isFunction(k))a("discarding unknown transition: ",i),b.fxs.splice(g,1),g--}if(!b.fxs.length)return a("No valid transitions named; slideshow terminating."),false}else if(b.fx=="all")for(p in b.multiFx=true,b.fxs=[],d)k=d[p],d.hasOwnProperty(p)&&e.isFunction(k)&&b.fxs.push(p);if(b.multiFx&&b.randomizeEffects){k=
Math.floor(Math.random()*20)+30;for(g=0;g<k;g++)d=Math.floor(Math.random()*b.fxs.length),b.fxs.push(b.fxs.splice(d,1)[0]);h("randomized fx sequence: ",b.fxs)}return true}function D(b,g){b.addSlide=function(a,d){var i=e(a),c=i[0];b.autostopCount||b.countdown++;g[d?"unshift":"push"](c);if(b.els)b.els[d?"unshift":"push"](c);b.slideCount=g.length;b.random&&(b.randomMap.push(b.slideCount-1),b.randomMap.sort(function(){return Math.random()-0.5}));i.css("position","absolute");i[d?"prependTo":"appendTo"](b.$cont);
d&&(b.currSlide++,b.nextSlide++);!e.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&r(i);b.fit&&b.width&&i.width(b.width);b.fit&&b.height&&b.height!="auto"&&i.height(b.height);c.cycleH=b.fit&&b.height?b.height:i.height();c.cycleW=b.fit&&b.width?b.width:i.width();i.css(b.cssBefore);(b.pager||b.pagerAnchorBuilder)&&e.fn.cycle.createPagerAnchor(g.length-1,c,e(b.pager),g,b);if(e.isFunction(b.onAddSlide))b.onAddSlide(i);else i.hide()}}function t(b,g,a,d){function i(){var a=0;g.timeout&&!g.continuous?(a=
u(b[g.currSlide],b[g.nextSlide],g,d),g.fx=="shuffle"&&(a-=g.speedOut)):g.continuous&&j.cyclePause&&(a=10);if(a>0)j.cycleTimeout=setTimeout(function(){t(b,g,0,!g.backwards)},a)}if(a&&g.busy&&g.manualTrump)h("manualTrump in go(), stopping active transition"),e(b).stop(true,true),g.busy=0;if(g.busy)h("transition active, ignoring new tx request");else{var j=g.$cont[0],f=b[g.currSlide],l=b[g.nextSlide];if(!(j.cycleStop!=g.stopCount||j.cycleTimeout===0&&!a))if(!a&&!j.cyclePause&&!g.bounce&&(g.autostop&&
--g.countdown<=0||g.nowrap&&!g.random&&g.nextSlide<g.currSlide))g.end&&g.end(g);else{var n=false;if((a||!j.cyclePause)&&g.nextSlide!=g.currSlide){var n=true,o=g.fx;f.cycleH=f.cycleH||e(f).height();f.cycleW=f.cycleW||e(f).width();l.cycleH=l.cycleH||e(l).height();l.cycleW=l.cycleW||e(l).width();if(g.multiFx){if(d&&(g.lastFx==c||++g.lastFx>=g.fxs.length))g.lastFx=0;else if(!d&&(g.lastFx==c||--g.lastFx<0))g.lastFx=g.fxs.length-1;o=g.fxs[g.lastFx]}if(g.oneTimeFx)o=g.oneTimeFx,g.oneTimeFx=null;e.fn.cycle.resetState(g,
o);g.before.length&&e.each(g.before,function(b,a){j.cycleStop==g.stopCount&&a.apply(l,[f,l,g,d])});var m=function(){g.busy=0;e.each(g.after,function(b,a){j.cycleStop==g.stopCount&&a.apply(l,[f,l,g,d])});j.cycleStop||i()};h("tx firing("+o+"); currSlide: "+g.currSlide+"; nextSlide: "+g.nextSlide);g.busy=1;if(g.fxFn)g.fxFn(f,l,g,m,d,a&&g.fastOnEvent);else if(e.isFunction(e.fn.cycle[g.fx]))e.fn.cycle[g.fx](f,l,g,m,d,a&&g.fastOnEvent);else e.fn.cycle.custom(f,l,g,m,d,a&&g.fastOnEvent)}else i();if(n||g.nextSlide==
g.currSlide)if(g.lastSlide=g.currSlide,g.random){g.currSlide=g.nextSlide;if(++g.randomIndex==b.length)g.randomIndex=0,g.randomMap.sort(function(){return Math.random()-0.5});g.nextSlide=g.randomMap[g.randomIndex];if(g.nextSlide==g.currSlide)g.nextSlide=g.currSlide==g.slideCount-1?0:g.currSlide+1}else g.backwards?(a=g.nextSlide-1<0)&&g.bounce?(g.backwards=!g.backwards,g.nextSlide=1,g.currSlide=0):(g.nextSlide=a?b.length-1:g.nextSlide-1,g.currSlide=a?0:g.nextSlide+1):(a=g.nextSlide+1==b.length)&&g.bounce?
(g.backwards=!g.backwards,g.nextSlide=b.length-2,g.currSlide=b.length-1):(g.nextSlide=a?0:g.nextSlide+1,g.currSlide=a?b.length-1:g.nextSlide-1);n&&g.pager&&g.updateActivePagerLink(g.pager,g.currSlide,g.activePagerClass)}}}function u(b,a,e,d){if(e.timeoutFn){for(b=e.timeoutFn.call(b,b,a,e,d);e.fx!="none"&&b-e.speed<250;)b+=e.speed;h("calculated timeout: "+b+"; speed: "+e.speed);if(b!==false)return b}return e.timeout}function y(b,a){var d=a?1:-1,i=b.elements,c=b.$cont[0],j=c.cycleTimeout;if(j)clearTimeout(j),
c.cycleTimeout=0;if(b.random&&d<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=i.length-2;else if(b.randomIndex==-1)b.randomIndex=i.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else if(b.nextSlide=b.currSlide+d,b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=i.length-1}else if(b.nextSlide>=i.length){if(b.nowrap)return false;b.nextSlide=0}c=b.onPrevNextEvent||b.prevNextClick;e.isFunction(c)&&c(d>0,b.nextSlide,i[b.nextSlide]);t(i,
b,1,a);return false}function A(b,a){var d=e(a.pager);e.each(b,function(i,c){e.fn.cycle.createPagerAnchor(i,c,d,b,a)});a.updateActivePagerLink(a.pager,a.startingSlide,a.activePagerClass)}function r(b){function a(b){b=parseInt(b,10).toString(16);return b.length<2?"0"+b:b}function d(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var i=e.css(b,"background-color");if(i&&i.indexOf("rgb")>=0)return b=i.match(/\d+/g),"#"+a(b[0])+a(b[1])+a(b[2]);if(i&&i!="transparent")return i}return"#ffffff"}
h("applying clearType background-color hack");b.each(function(){e(this).css("background-color",d(this))})}if(e.support==c)e.support={opacity:!e.browser.msie};e.expr[":"].paused=function(b){return b.cyclePause};e.fn.cycle=function(b,g){var d={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!e.isReady&&d.s)return a("DOM not ready, queuing slideshow"),e(function(){e(d.s,d.c).cycle(b,g)}),this;a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var c=
i(this,b,g);if(c!==false){c.updateActivePagerLink=c.updateActivePagerLink||e.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var j=e(this),l=c.slideExpr?e(c.slideExpr,this):j.children(),f=l.get(),m=n(j,l,f,c,d);if(m!==false)if(f.length<2)a("terminating; too few slides: "+f.length);else if(j=m.continuous?10:u(f[m.currSlide],f[m.nextSlide],m,!m.backwards))j+=m.delay||0,j<10&&(j=10),h("first timeout: "+j),this.cycleTimeout=setTimeout(function(){t(f,
m,0,!c.backwards)},j)}})};e.fn.cycle.resetState=function(b,a){a=a||b.fx;b.before=[];b.after=[];b.cssBefore=e.extend({},b.original.cssBefore);b.cssAfter=e.extend({},b.original.cssAfter);b.animIn=e.extend({},b.original.animIn);b.animOut=e.extend({},b.original.animOut);b.fxFn=null;e.each(b.original.before,function(){b.before.push(this)});e.each(b.original.after,function(){b.after.push(this)});var d=e.fn.cycle.transitions[a];e.isFunction(d)&&d(b.$cont,e(b.elements),b)};e.fn.cycle.updateActivePagerLink=
function(b,a,d){e(b).each(function(){e(this).children().removeClass(d).eq(a).addClass(d)})};e.fn.cycle.next=function(b){y(b,1)};e.fn.cycle.prev=function(b){y(b,0)};e.fn.cycle.createPagerAnchor=function(b,a,d,i,c){e.isFunction(c.pagerAnchorBuilder)?(a=c.pagerAnchorBuilder(b,a),h("pagerAnchorBuilder("+b+", el) returned: "+a)):a='<a href="#">'+(b+1)+"</a>";if(a){var l=e(a);if(l.parents("body").length===0){var f=[];d.length>1?(d.each(function(){var b=l.clone(true);e(this).append(b);f.push(b[0])}),l=e(f)):
l.appendTo(d)}c.pagerAnchors=c.pagerAnchors||[];c.pagerAnchors.push(l);d=function(a){a.preventDefault();c.nextSlide=b;var a=c.$cont[0],f=a.cycleTimeout;if(f)clearTimeout(f),a.cycleTimeout=0;a=c.onPagerEvent||c.pagerClick;e.isFunction(a)&&a(c.nextSlide,i[c.nextSlide]);t(i,c,1,c.currSlide<b)};/mouseenter|mouseover/i.test(c.pagerEvent)?l.hover(d,function(){}):l.bind(c.pagerEvent,d);!/^click/.test(c.pagerEvent)&&!c.allowPagerClickBubble&&l.bind("click.cycle",function(){return false});var m=c.$cont[0],
n=false;c.pauseOnPagerHover&&l.hover(function(){n=true;m.cyclePause++;j(m,true,true)},function(){n&&m.cyclePause--;j(m,true,true)})}};e.fn.cycle.hopsFromLast=function(b,a){var e=b.lastSlide,d=b.currSlide;return a?d>e?d-e:b.slideCount-e:d<e?e-d:e+b.slideCount-d};e.fn.cycle.commonReset=function(b,a,d,c,i,j){e(d.elements).not(b).hide();if(typeof d.cssBefore.opacity=="undefined")d.cssBefore.opacity=1;d.cssBefore.display="block";if(d.slideResize&&c!==false&&a.cycleW>0)d.cssBefore.width=a.cycleW;if(d.slideResize&&
i!==false&&a.cycleH>0)d.cssBefore.height=a.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";e(b).css("zIndex",d.slideCount+(j===true?1:0));e(a).css("zIndex",d.slideCount+(j===true?0:1))};e.fn.cycle.custom=function(b,a,d,c,i,j){var f=e(b),h=e(a),l=d.speedIn,b=d.speedOut,m=d.easeIn,a=d.easeOut;h.css(d.cssBefore);j&&(l=typeof j=="number"?b=j:b=1,m=a=null);var n=function(){h.animate(d.animIn,l,m,function(){c()})};f.animate(d.animOut,b,a,function(){f.css(d.cssAfter);d.sync||n()});d.sync&&n()};
e.fn.cycle.transitions={fade:function(b,a,d){a.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(b,a,d){e.fn.cycle.commonReset(b,a,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};e.fn.cycle.ver=function(){return"2.9998"};e.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!e.support.opacity,
cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,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:true,requeueTimeout:250,rev:0,shuffle:null,
skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
(function(e){e.fn.cycle.transitions.none=function(c,h,a){a.fxFn=function(a,c,d,h){e(c).show();e(a).hide();h()}};e.fn.cycle.transitions.fadeout=function(c,h,a){h.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(a,c,d,h,n,m){e(a).css("zIndex",d.slideCount+(!m===true?1:0));e(c).css("zIndex",d.slideCount+(!m===true?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};e.fn.cycle.transitions.scrollUp=function(c,
h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.height();a.cssBefore.top=c;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-c};e.fn.cycle.transitions.scrollDown=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.height();a.cssFirst.top=0;a.cssBefore.top=-c;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=c};e.fn.cycle.transitions.scrollLeft=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=
c.width();a.cssFirst.left=0;a.cssBefore.left=c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-c};e.fn.cycle.transitions.scrollRight=function(c,h,a){c.css("overflow","hidden");a.before.push(e.fn.cycle.commonReset);c=c.width();a.cssFirst.left=0;a.cssBefore.left=-c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=c};e.fn.cycle.transitions.scrollHorz=function(c,h,a){c.css("overflow","hidden").width();a.before.push(function(a,c,d,h){d.rev&&(h=!h);e.fn.cycle.commonReset(a,c,d);d.cssBefore.left=h?c.cycleW-
1:1-c.cycleW;d.animOut.left=h?-a.cycleW:a.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};e.fn.cycle.transitions.scrollVert=function(c,h,a){c.css("overflow","hidden");a.before.push(function(a,c,d,h){d.rev&&(h=!h);e.fn.cycle.commonReset(a,c,d);d.cssBefore.top=h?1-c.cycleH:c.cycleH-1;d.animOut.top=h?a.cycleH:-a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};e.fn.cycle.transitions.slideX=function(c,h,a){a.before.push(function(a,c,d){e(d.elements).not(a).hide();
e.fn.cycle.commonReset(a,c,d,false,true);d.animIn.width=c.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};e.fn.cycle.transitions.slideY=function(c,h,a){a.before.push(function(a,c,d){e(d.elements).not(a).hide();e.fn.cycle.commonReset(a,c,d,true,false);d.animIn.height=c.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};e.fn.cycle.transitions.shuffle=function(c,h,a){c=c.css("overflow",
"visible").width();h.css({left:0,top:0});a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,true,true)});if(!a.speedAdjusted)a.speed/=2,a.speedAdjusted=true;a.random=0;a.shuffle=a.shuffle||{left:-c,top:15};a.els=[];for(c=0;c<h.length;c++)a.els.push(h[c]);for(c=0;c<a.currSlide;c++)a.els.push(a.els.shift());a.fxFn=function(a,c,d,h,n){d.rev&&(n=!n);var m=n?e(a):e(c);e(c).css(d.cssBefore);var s=d.slideCount;m.animate(d.shuffle,d.speedIn,d.easeIn,function(){for(var c=e.fn.cycle.hopsFromLast(d,
n),i=0;i<c;i++)n?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(n){c=0;for(i=d.els.length;c<i;c++)e(d.els[c]).css("z-index",i-c+s)}else c=e(a).css("z-index"),m.css("z-index",parseInt(c,10)+1+s);m.animate({left:0,top:0},d.speedOut,d.easeOut,function(){e(n?this:a).hide();h&&h()})})};e.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};e.fn.cycle.transitions.turnUp=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.cssBefore.top=c.cycleH;d.animIn.height=
c.cycleH;d.animOut.width=c.cycleW});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};e.fn.cycle.transitions.turnDown=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.animIn.height=c.cycleH;d.animOut.top=a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};e.fn.cycle.transitions.turnLeft=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,
true);d.cssBefore.left=c.cycleW;d.animIn.width=c.cycleW});a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};e.fn.cycle.transitions.turnRight=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true);d.animIn.width=c.cycleW;d.animOut.left=a.cycleW});e.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};e.fn.cycle.transitions.zoom=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,false,true);
d.cssBefore.top=c.cycleH/2;d.cssBefore.left=c.cycleW/2;e.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH});e.extend(d.animOut,{width:0,height:0,top:a.cycleH/2,left:a.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};e.fn.cycle.transitions.fadeZoom=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,false);d.cssBefore.left=c.cycleW/2;d.cssBefore.top=c.cycleH/2;e.extend(d.animIn,{top:0,left:0,width:c.cycleW,height:c.cycleH})});
a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};e.fn.cycle.transitions.blindX=function(c,h,a){c=c.css("overflow","hidden").width();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.width=c.cycleW;d.animOut.left=a.cycleW});a.cssBefore.left=c;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=c};e.fn.cycle.transitions.blindY=function(c,h,a){c=c.css("overflow","hidden").height();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.height=c.cycleH;d.animOut.top=
a.cycleH});a.cssBefore.top=c;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=c};e.fn.cycle.transitions.blindZ=function(c,h,a){h=c.css("overflow","hidden").height();c=c.width();a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d);d.animIn.height=c.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=h;a.cssBefore.left=c;a.animIn.top=0;a.animIn.left=0;a.animOut.top=h;a.animOut.left=c};e.fn.cycle.transitions.growX=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true);
d.cssBefore.left=this.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width=0};e.fn.cycle.transitions.growY=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn.top=0;d.animIn.height=this.cycleH;d.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};e.fn.cycle.transitions.curtainX=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,false,true,true);
d.cssBefore.left=c.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=a.cycleW/2;d.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width=0};e.fn.cycle.transitions.curtainY=function(c,h,a){a.before.push(function(a,c,d){e.fn.cycle.commonReset(a,c,d,true,false,true);d.cssBefore.top=c.cycleH/2;d.animIn.top=0;d.animIn.height=c.cycleH;d.animOut.top=a.cycleH/2;d.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};e.fn.cycle.transitions.cover=function(c,h,a){var j=a.direction||"left",
i=c.css("overflow","hidden").width(),d=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h);j=="right"?h.cssBefore.left=-i:j=="up"?h.cssBefore.top=d:j=="down"?h.cssBefore.top=-d:h.cssBefore.left=i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};e.fn.cycle.transitions.uncover=function(c,h,a){var j=a.direction||"left",i=c.css("overflow","hidden").width(),d=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h,true,true,true);j=="right"?h.animOut.left=
i:j=="up"?h.animOut.top=-d:j=="down"?h.animOut.top=d:h.animOut.left=-i});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};e.fn.cycle.transitions.toss=function(c,h,a){var j=c.css("overflow","visible").width(),i=c.height();a.before.push(function(a,c,h){e.fn.cycle.commonReset(a,c,h,true,true,true);!h.animOut.left&&!h.animOut.top?e.extend(h.animOut,{left:j*2,top:-i/2,opacity:0}):h.animOut.opacity=0});a.cssBefore.left=0;a.cssBefore.top=0;a.animIn.left=0};e.fn.cycle.transitions.wipe=
function(c,h,a){var j=c.css("overflow","hidden").width(),i=c.height();a.cssBefore=a.cssBefore||{};var d;a.clip&&(/l2r/.test(a.clip)?d="rect(0px 0px "+i+"px 0px)":/r2l/.test(a.clip)?d="rect(0px "+j+"px "+i+"px "+j+"px)":/t2b/.test(a.clip)?d="rect(0px "+j+"px 0px 0px)":/b2t/.test(a.clip)?d="rect("+i+"px "+j+"px "+i+"px 0px)":/zoom/.test(a.clip)&&(c=parseInt(i/2,10),h=parseInt(j/2,10),d="rect("+c+"px "+h+"px "+c+"px "+h+"px)"));a.cssBefore.clip=a.cssBefore.clip||d||"rect(0px 0px 0px 0px)";var c=a.cssBefore.clip.match(/(\d+)/g),
l=parseInt(c[0],10),n=parseInt(c[1],10),m=parseInt(c[2],10),s=parseInt(c[3],10);a.before.push(function(a,c,d){if(a!=c){var h=e(a),A=e(c);e.fn.cycle.commonReset(a,c,d,true,true,false);d.cssAfter.display="block";var r=1,b=parseInt(d.speedIn/13,10)-1;(function k(){var a=l?l-parseInt(r*(l/b),10):0,c=s?s-parseInt(r*(s/b),10):0,d=m<i?m+parseInt(r*((i-m)/b||1),10):i,e=n<j?n+parseInt(r*((j-n)/b||1),10):j;A.css({clip:"rect("+a+"px "+e+"px "+d+"px "+c+"px)"});r++<=b?setTimeout(k,13):h.css("display","none")})()}});
e.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery);

