var postCache = new Array();
function showFloatingDiv() {
	$("#floatdiv").css("height","auto");
	$("#floatdiv").show();
	$("#floatingDivControl").addClass("gumbOn").removeClass("gumbOut");
}
function hideFloatingDiv() {
	$("#floatdiv").hide();
	$("#floatingDivControl").addClass("gumbOut").removeClass("gumbOn");
}
$(document).ready( function() {
	// plavajoči menu.
	$("#floatingDivControl,#floatdiv").hover(showFloatingDiv,hideFloatingDiv);
	// ogled produkta
	$(".galerija").fancybox({'zoomSpeedIn':0,'zoomSpeedOut': 0,'overlayShow': true,'hideOnContentClick': true});
	// skrivanje košarice.
	$(document).bind("click", function() {
		$("#buybasket").hide();
		$('[id^=products_]').filter('[id$=_items]').hide();
		
	});
	$("#buybasket").bind("click",function(e) { e.stopPropagation(); });
});
function destroyZoomWindow() { $(".zoomdiv").remove(); $(".jqZoomPup").remove(); }
function getPost(pnum,pname) {
	if (postCache[pnum] == null) {
		$.post(
			"/si/ajax/default.html",
			{act: "getPost",postNum:pnum},
			function (r) {$("#"+pname).val(r);postCache[pnum]=r;}
		);
	}
	else {$("#"+pname).val(postCache[pnum]);}
}
function distributeConstructorItems(results) {
	var row;
	var selectItems;
	var selectedMask;
	var productWrapper;
	$("#span_sum").html(results.price_sum);
	for (var i in results.products) {
		productWrapper = "#product_" + i;
		$("div.top.white[rel=" + i +"] .top_right #price_" + i + ".price").html("0,00 €");
		selectItems = "";
		if (results.products[i].hasProducts) {
			$('#products_'+i).val('Vpiši omejitev izbora');
			$("#products_"+i).attr('disabled','');
		}
		else {
			$('#products_'+i).val('Ni združljivega produkta');
			$("#products_"+i).attr('disabled','disabled');
		}
		if (!results.products[i].hide) {
			$("div.top.white[rel=" + i +"]").show();
			if (results.products[i].selectedProduct != null) {
				row = results.products[i].selectedProduct;
				$('#products_'+i).val(row.name);
				$("div.top.white[rel=" + i +"] .top_right #price_" + i + ".price").html(row.price);
				$(productWrapper + " .bottom_middle .constructor_title").html(row.name);
				$(productWrapper + " .bottom_middle div.constructor_description_content").html(row.desc_short);
				$(productWrapper + " .bottom_right .row_constructor .right_text.price_full").html(row.price_full_1x);
				$(productWrapper + " .bottom_right .row_constructor .right_text.price_diff").html(row.price_difference);
				$(productWrapper + " .bottom_right .row_constructor .right_text.amount").html(row.amount);
				$(productWrapper + " .bottom_right .row_constructor .right_text.warranty").html(row.warranty);
				$(productWrapper + " .bottom_middle a, " + productWrapper + " .bottom_left a").attr("href",row.path);
				$(productWrapper + " #product_image_" + i).attr("src",row.image);
				$(productWrapper).slideDown("fast");
				$('#products_'+i+'_reduce').show();
			}
			else {
				// tole se izvrši samo v primeru praznenja konstruktorja za kategorije, ki ostanejo na vrhu (v primeru funtecha so to procesorji):
				$(productWrapper).hide();
				$('#products_'+i+'_reduce').hide();
			}
			row = results.products[i];
			for (var x in row.products) {
				selectedMask = (row.products[x].isSelected) ? " selected=\"selected\"" : "";
				selectItems += '<li onclick="constructor_item_selected(this,'+i+','+row.products[x].product_id+');" onmouseover="itemOver(this,'+i+');" onmouseout="itemOut(this,'+i+');">'+
					'<div>'+
						'<div class="img" style="background-image:url('+row.products[x].image+');">'+
						'</div>'+
						'<div class="text">'+
							'<div class="value">'+row.products[x].name+'</div>'+
							'<div class="price">'+row.products[x].price+
							'</div>'+
							'<br class="clear" />'+
						'</div>'+
						'<br class="clear" />'+
					'</div>' + 
					'<br class="clear" />' +
				'</li>';
			}
		}
		else {
			$("div.top.white[rel=" + i +"]").hide();
			$(productWrapper).hide();
		}
		$("#products_"+i+"_items").html(selectItems);
	}
}
function constructorExpand(catId)
{
	$.getJSON(
		'/si/ajax/default.html',
		{act:'constructor_expand',category_id:catId},
		function (results) { distributeConstructorItems(results); }
	);
}
function truncateConstructor() {
	$.getJSON(
		"/si/ajax/default.html",
		"act=truncateConstructor",
		function(results) { distributeConstructorItems(results); }
	);
}
function constructor_item_selected(li,catId,prodId)
{
	$('#products_'+catId).val($(li).children('div').children('.text').children('.value').text());
	$('#products_'+catId+'_items').hide();
	var ajaxServer = "/si/ajax/default.html";
	
	if (prodId > 0) {
		$.getJSON(
			ajaxServer,
			"act=constructor_reduce&product_id=" + prodId,
			function (results) { distributeConstructorItems(results); }
		);
	}
}
$(document).ready(function() {

	$.fn.dropdown = function() {
		var last = '';
		var cid = /^products_(\d+)$/.exec($(this).attr('id'));
		cid = cid[cid.length-1];
		$(this).keyup(function() {
			if (last != $(this).val()) {
				reduceExpand($(this).val(), cid);
				last = $(this).val();
			}
		});
		$(this).blur(function(){
			var temp = $('#product_'+cid+' .constructor_title').html();
			$(this).val(temp.length > 0 ? temp : 'Vpiši omejitev izbora');
			$(this).removeClass('active');
		});
		$(this).click(function(e){e.stopPropagation();});
		$('#products_'+cid+'_drop').click(function(e){
			$('#products_'+cid).focus();
			e.stopPropagation();
		});
		$(this).focus(function(){
			$('#products_'+cid+'_items').show();
			$('#products_'+cid+'_items li').removeClass('selected');
			// morda jih je prej skril search...
			$('#products_'+cid+'_items li').show();
			$(this).val('');
			$(this).addClass('active');
		});
	};
	$('input[id^=products_]').each(function(){$(this).dropdown();});
	$("#moveToCart").click(function () { constructorToCart(); });
	$("#deleteCart").click(function() { truncateConstructor(); });
});
function itemOver(x,catId){$(x).addClass('selected');}
function itemOut(x,catId){$(x).removeClass('selected');}
(function($){
$.fn.jqueryzoom = function(options){
	var settings = {
		xzoom: 200,		// Višina okna za povečavo.
		yzoom: 200,		// Širina okna za povečavo.
		offset: 10,		// Privzet odmik povečave od kontainerja, v katerem je slika, ki jo povečujemo.
		position: "right" ,//zoomed div default position,offset position is to the right of the image
		lens:1, //zooming lens over the image,by default is 1;
		preload: 1
	};
	if(options) {
		$.extend(settings, options);
	}
	var noalt='';
	$(this).hover(
		// mouseover
		function() {
			var imageLeft = $(this).offset().left;                
			var imageTop = $(this).offset().top;
			if ($(this).children("img").length == 1) {
				var imageWidth = $(this).children('img').get(0).offsetWidth;
				var imageHeight = $(this).children('img').get(0).offsetHeight;
				noalt= $(this).children("img").attr("alt");
				var bigimage = $(this).children("img").attr("jqimg");
				$(this).children("img").attr("alt",'');
				if ($("div.zoomdiv").get().length == 0) {
					$(this).after("<div class='zoomdiv'><img class='bigimg' src='"+bigimage+"'/></div>");
					$(this).append("<div class='jqZoomPup'>&nbsp;</div>");
				}
				if (settings.position == "right"){
					if (imageLeft + imageWidth + settings.offset + settings.xzoom > screen.width){
						leftpos = imageLeft  - settings.offset - settings.xzoom;
					}
					else {
						leftpos = imageLeft + imageWidth + settings.offset;
					}
				}
				else {
					leftpos = imageLeft - settings.xzoom - settings.offset;
					if (leftpos < 0) {
						leftpos = imageLeft + imageWidth  + settings.offset;
					}
				}
				$("div.zoomdiv").css({ top: imageTop,left: leftpos });
				$("div.zoomdiv").width(settings.xzoom);
				$("div.zoomdiv").height(settings.yzoom);
				$("div.zoomdiv").show();
				if (!settings.lens) {
					$(this).css('cursor','crosshair');
				}
				$(document.body).mousemove(function(e) {
					mouse = new MouseEvent(e);
					var bigwidth = $(".bigimg").get(0).offsetWidth;
					var bigheight = $(".bigimg").get(0).offsetHeight;
					var scaley ='x';
					var scalex= 'y';
					if (isNaN(scalex)|isNaN(scaley)) {
						var scalex = (bigwidth/imageWidth);
						var scaley = (bigheight/imageHeight);
						$("div.jqZoomPup").width((settings.xzoom)/scalex );
						$("div.jqZoomPup").height((settings.yzoom)/scaley);
						if (settings.lens) {
							$("div.jqZoomPup").css('visibility','visible');
						}
					}
					xpos = mouse.x - $("div.jqZoomPup").width()/2 - imageLeft;
					ypos = mouse.y - $("div.jqZoomPup").height()/2 - imageTop ;
					if (settings.lens) {
						xpos = (mouse.x - $("div.jqZoomPup").width()/2 < imageLeft ) ? 0 : (mouse.x + $("div.jqZoomPup").width()/2 > imageWidth + imageLeft ) ?  (imageWidth -$("div.jqZoomPup").width() -2)  : xpos;
						ypos = (mouse.y - $("div.jqZoomPup").height()/2 < imageTop ) ? 0 : (mouse.y + $("div.jqZoomPup").height()/2  > imageHeight + imageTop ) ?  (imageHeight - $("div.jqZoomPup").height() -2 ) : ypos;
					}
					if (settings.lens) {
						$("div.jqZoomPup").css({ top: ypos,left: xpos });
					}
					scrolly = ypos;
					$("div.zoomdiv").get(0).scrollTop = scrolly * scaley;
					scrollx = xpos;
					$("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ;
				});
				}
			},
			// mouseout
			function() {
				$(this).children("img").attr("alt",noalt);
				$(document.body).unbind("mousemove");
				if (settings.lens) {
					$("div.jqZoomPup").remove();
				}
				$("div.zoomdiv").remove();
			});
			count = 0;
			if (settings.preload) {
				$('body').append("<div style='display:none;' class='jqPreload"+count+"'>sdsdssdsd</div>");
				$(this).each(function() {
					var imagetopreload= $(this).children("img").attr("jqimg");
					var content = jQuery('div.jqPreload'+count+'').html();
					jQuery('div.jqPreload'+count+'').html(content+'<img src=\"'+imagetopreload+'\">');
				});
			}
		}
})(jQuery);
function MouseEvent(e) {
	this.x = e.pageX;
	this.y = e.pageY;
}
/** LIGHTBOX */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('(6($){$.2Q.2R=6(4){4=20.2P({2a:\'#2N\',2d:0.8,1h:M,2f:\'/16/14/5-2O-P.17\',1r:\'/16/14/5-1z-2S.17\',1u:\'/16/14/5-1z-2W.17\',2g:\'/16/14/5-1z-2X.17\',1c:\'/16/14/5-2T.17\',1d:10,1V:2M,2o:\'1n\',2j:\'2E\',2z:\'c\',1S:\'p\',1Q:\'n\',h:[],7:0},4);f H=N;6 2h(){26(N,H);w M;}6 26(1f,H){$(\'2m, 2D, 2B\').k({\'1R\':\'2F\'});29();4.h.A=0;4.7=0;9(H.A==1){4.h.21(u 1b(1f.18(\'E\'),1f.18(\'23\')))}l{2G(f i=0;i<H.A;i++){4.h.21(u 1b(H[i].18(\'E\'),H[i].18(\'23\')))}}2y(4.h[4.7][0]!=1f.18(\'E\')){4.7++}z()}6 29(){$(\'m\').2L(\'<e g="q-T"></e><e g="q-5"><e g="5-s-b-v"><e g="5-s-b"><1A g="5-b"><e 2J="" g="5-j"><a E="#" g="5-j-W"></a><a E="#" g="5-j-U"></a></e><e g="5-P"><a E="#" g="5-P-2c"><1A R="\'+4.2f+\'"></a></e></e></e><e g="5-s-b-S-v"><e g="5-s-b-S"><e g="5-b-D"><1e g="5-b-D-1q"></1e><1e g="5-b-D-1j"></1e></e><e g="5-1x"><a E="#" g="5-1x-1Z"><1A R="\'+4.2g+\'"></a></e></e></e></e>\');f C=1F();$(\'#q-T\').k({3e:4.2a,3g:4.2d,X:C[0],Q:C[1]}).1T();f 13=1H();$(\'#q-5\').k({1M:13[1]+(C[3]/10),1i:13[0]}).I();$(\'#q-T,#q-5\').B(6(){1l()});$(\'#5-P-2c,#5-1x-1Z\').B(6(){1l();w M});$(G).35(6(){f C=1F();$(\'#q-T\').k({X:C[0],Q:C[1]});f 13=1H();$(\'#q-5\').k({1M:13[1]+(C[3]/10),1i:13[0]})})}6 z(){$(\'#5-P\').I();9(4.1h){$(\'#5-b,#5-s-b-S-v,#5-b-D-1j\').1g()}l{$(\'#5-b,#5-j,#5-j-W,#5-j-U,#5-s-b-S-v,#5-b-D-1j\').1g()}f 12=u 1n();12.1P=6(){$(\'#5-b\').30(\'R\',4.h[4.7][0]);1J(12.X,12.Q);12.1P=6(){}};12.R=4.h[4.7][0]};6 1J(1C,1D){f 1K=$(\'#5-s-b-v\').X();f 1L=$(\'#5-s-b-v\').Q();f 1B=(1C+(4.1d*2));f 1E=(1D+(4.1d*2));f 1Y=1K-1B;f 1X=1L-1E;$(\'#5-s-b-v\').3c({X:1B,Q:1E},4.1V,6(){1U()});9((1Y==0)&&(1X==0)){9($.3h.32){1s(36)}l{1s(34)}}$(\'#5-s-b-S-v\').k({X:1C});$(\'#5-j-W,#5-j-U\').k({Q:1D+(4.1d*2)})};6 1U(){$(\'#5-P\').1g();$(\'#5-b\').1T(6(){2A();2i()});24()};6 2A(){$(\'#5-s-b-S-v\').3d(\'3b\');$(\'#5-b-D-1q\').1g();9(4.h[4.7][1]){$(\'#5-b-D-1q\').2p(4.h[4.7][1]).I()}9(4.h.A>1){$(\'#5-b-D-1j\').2p(4.2o+\' \'+(4.7+1)+\' \'+4.2j+\' \'+4.h.A).I()}}6 2i(){$(\'#5-j\').I();$(\'#5-j-W,#5-j-U\').k({\'L\':\'1v K(\'+4.1c+\') J-F\'});9(4.7!=0){9(4.1h){$(\'#5-j-W\').k({\'L\':\'K(\'+4.1r+\') 1i 15% J-F\'}).11().1a(\'B\',6(){4.7=4.7-1;z();w M})}l{$(\'#5-j-W\').11().2k(6(){$(N).k({\'L\':\'K(\'+4.1r+\') 1i 15% J-F\'})},6(){$(N).k({\'L\':\'1v K(\'+4.1c+\') J-F\'})}).I().1a(\'B\',6(){4.7=4.7-1;z();w M})}}9(4.7!=(4.h.A-1)){9(4.1h){$(\'#5-j-U\').k({\'L\':\'K(\'+4.1u+\') 2v 15% J-F\'}).11().1a(\'B\',6(){4.7=4.7+1;z();w M})}l{$(\'#5-j-U\').11().2k(6(){$(N).k({\'L\':\'K(\'+4.1u+\') 2v 15% J-F\'})},6(){$(N).k({\'L\':\'1v K(\'+4.1c+\') J-F\'})}).I().1a(\'B\',6(){4.7=4.7+1;z();w M})}}2t()}6 2t(){$(d).2V(6(V){2s(V)})}6 1I(){$(d).11()}6 2s(V){9(V==2u){Y=2U.2x;1G=27;}l{Y=V.2x;1G=V.3i}19=38.33(Y).3a();9((19==4.2z)||(19==\'x\')||(Y==1G)){1l()}9((19==4.1S)||(Y==37)){9(4.7!=0){4.7=4.7-1;z();1I()}}9((19==4.1Q)||(Y==39)){9(4.7!=(4.h.A-1)){4.7=4.7+1;z();1I()}}}6 24(){9((4.h.A-1)>4.7){25=u 1n();25.R=4.h[4.7+1][0]}9(4.7>0){1N=u 1n();1N.R=4.h[4.7-1][0]}}6 1l(){$(\'#q-5\').2l();$(\'#q-T\').2Z(6(){$(\'#q-T\').2l()});$(\'2m, 2D, 2B\').k({\'1R\':\'2H\'})}6 1F(){f r,o;9(G.1k&&G.2b){r=G.28+G.31;o=G.1k+G.2b}l 9(d.m.2e>d.m.22){r=d.m.2I;o=d.m.2e}l{r=d.m.2K;o=d.m.22}f y,O;9(Z.1k){9(d.t.1m){y=d.t.1m}l{y=Z.28}O=Z.1k}l 9(d.t&&d.t.1y){y=d.t.1m;O=d.t.1y}l 9(d.m){y=d.m.1m;O=d.m.1y}9(o<O){1o=O}l{1o=o}9(r<y){1w=r}l{1w=y}2q=u 1b(1w,1o,y,O);w 2q};6 1H(){f r,o;9(Z.1W){o=Z.1W;r=Z.3f}l 9(d.t&&d.t.1t){o=d.t.1t;r=d.t.2r}l 9(d.m){o=d.m.1t;r=d.m.2r}2w=u 1b(r,o);w 2w};6 1s(1O){f 2C=u 2n();1p=2u;2Y{f 1p=u 2n()}2y(1p-2C<1O)};w N.11(\'B\').B(2h)}})(20);',62,205,'||||settings|lightbox|function|activeImage||if||image||document|div|var|id|imageArray||nav|css|else|body||yScroll||jquery|xScroll|container|documentElement|new|box|return||windowWidth|_set_image_to_view|length|click|arrPageSizes|details|href|repeat|window|jQueryMatchedObj|show|no|url|background|false|this|windowHeight|loading|height|src|data|overlay|btnNext|objEvent|btnPrev|width|keycode|self||unbind|objImagePreloader|arrPageScroll|images||static|gif|getAttribute|key|bind|Array|imageBlank|containerBorderSize|span|objClicked|hide|fixedNavigation|left|currentNumber|innerHeight|_finish|clientWidth|Image|pageHeight|curDate|caption|imageBtnPrev|___pause|scrollTop|imageBtnNext|transparent|pageWidth|secNav|clientHeight|btn|img|intWidth|intImageWidth|intImageHeight|intHeight|___getPageSize|escapeKey|___getPageScroll|_disable_keyboard_navigation|_resize_container_image_box|intCurrentWidth|intCurrentHeight|top|objPrev|ms|onload|keyToNext|visibility|keyToPrev|fadeIn|_show_image|containerResizeSpeed|pageYOffset|intDiffH|intDiffW|btnClose|jQuery|push|offsetHeight|title|_preload_neighbor_images|objNext|_start||innerWidth|_set_interface|overlayBgColor|scrollMaxY|link|overlayOpacity|scrollHeight|imageLoading|imageBtnClose|_initialize|_set_navigation|txtOf|hover|remove|embed|Date|txtImage|html|arrayPageSize|scrollLeft|_keyboard_action|_enable_keyboard_navigation|null|right|arrayPageScroll|keyCode|while|keyToClose|_show_image_data|select|date|object|of|hidden|for|visible|scrollWidth|style|offsetWidth|append|400|000|ico|extend|fn|lightBox|prev|blank|event|keydown|next|close|do|fadeOut|attr|scrollMaxX|msie|fromCharCode|100|resize|250||String||toLowerCase|fast|animate|slideDown|backgroundColor|pageXOffset|opacity|browser|DOM_VK_ESCAPE'.split('|'),0,{}));

/* JQUERY CYCLE */
(function(i){var l="2.73";if(i.support==undefined){i.support={opacity:!(i.browser.msie)}}function a(q){if(i.fn.cycle.debug){f(q)}}function f(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}i.fn.cycle=function(r,q){var s={s:this.selector,c:this.context};if(this.length===0&&r!="stop"){if(!i.isReady&&s.s){f("DOM not ready, queuing slideshow");i(function(){i(s.s,s.c).cycle(r,q)});return this}f("terminating; zero elements found by selector"+(i.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var w=m(this,r,q);if(w===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var x=i(this);var y=w.slideExpr?i(w.slideExpr,this):x.children();var u=y.get();if(u.length<2){f("terminating; too few slides: "+u.length);return}var t=k(x,y,u,w,s);if(t===false){return}var v=t.continuous?10:h(t.currSlide,t.nextSlide,t,!t.rev);if(v){v+=(t.delay||0);if(v<10){v=10}a("first timeout: "+v);this.cycleTimeout=setTimeout(function(){e(u,t,0,!t.rev)},v)}})};function m(q,t,r){if(q.cycleStop==undefined){q.cycleStop=0}if(t===undefined||t===null){t={}}if(t.constructor==String){switch(t){case"stop":q.cycleStop++;if(q.cycleTimeout){clearTimeout(q.cycleTimeout)}q.cycleTimeout=0;i(q).removeData("cycle.opts");return false;case"pause":q.cyclePause=1;return false;case"resume":q.cyclePause=0;if(r===true){t=i(q).data("cycle.opts");if(!t){f("options not found, can not resume");return false}if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}e(t.elements,t,1,1)}return false;case"prev":case"next":var u=i(q).data("cycle.opts");if(!u){f('options not found, "prev/next" ignored');return false}i.fn.cycle[t](u);return false;default:t={fx:t}}return t}else{if(t.constructor==Number){var s=t;t=i(q).data("cycle.opts");if(!t){f("options not found, can not advance slide");return false}if(s<0||s>=t.elements.length){f("invalid slide index: "+s);return false}t.nextSlide=s;if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}if(typeof r=="string"){t.oneTimeFx=r}e(t.elements,t,1,s>=t.currSlide);return false}}return t}function b(q,r){if(!i.support.opacity&&r.cleartype&&q.style.filter){try{q.style.removeAttribute("filter")}catch(s){}}}function k(y,J,u,t,E){var C=i.extend({},i.fn.cycle.defaults,t||{},i.metadata?y.metadata():i.meta?y.data():{});if(C.autostop){C.countdown=C.autostopCount||u.length}var r=y[0];y.data("cycle.opts",C);C.$cont=y;C.stopCount=r.cycleStop;C.elements=u;C.before=C.before?[C.before]:[];C.after=C.after?[C.after]:[];C.after.unshift(function(){C.busy=0});if(!i.support.opacity&&C.cleartype){C.after.push(function(){b(this,C)})}if(C.continuous){C.after.push(function(){e(u,C,0,!C.rev)})}n(C);if(!i.support.opacity&&C.cleartype&&!C.cleartypeNoBg){g(J)}if(y.css("position")=="static"){y.css("position","relative")}if(C.width){y.width(C.width)}if(C.height&&C.height!="auto"){y.height(C.height)}if(C.startingSlide){C.startingSlide=parseInt(C.startingSlide)}if(C.random){C.randomMap=[];for(var H=0;H<u.length;H++){C.randomMap.push(H)}C.randomMap.sort(function(L,w){return Math.random()-0.5});C.randomIndex=0;C.startingSlide=C.randomMap[0]}else{if(C.startingSlide>=u.length){C.startingSlide=0}}C.currSlide=C.startingSlide=C.startingSlide||0;var x=C.startingSlide;J.css({position:"absolute",top:0,left:0}).hide().each(function(w){var L=x?w>=x?u.length-(w-x):x-w:u.length-w;i(this).css("z-index",L)});i(u[x]).css("opacity",1).show();b(u[x],C);if(C.fit&&C.width){J.width(C.width)}if(C.fit&&C.height&&C.height!="auto"){J.height(C.height)}var D=C.containerResize&&!y.innerHeight();if(D){var v=0,B=0;for(var F=0;F<u.length;F++){var q=i(u[F]),K=q[0],A=q.outerWidth(),I=q.outerHeight();if(!A){A=K.offsetWidth}if(!I){I=K.offsetHeight}v=A>v?A:v;B=I>B?I:B}if(v>0&&B>0){y.css({width:v+"px",height:B+"px"})}}if(C.pause){y.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(c(C)===false){return false}var s=false;t.requeueAttempts=t.requeueAttempts||0;J.each(function(){var N=i(this);this.cycleH=(C.fit&&C.height)?C.height:N.height();this.cycleW=(C.fit&&C.width)?C.width:N.width();if(N.is("img")){var L=(i.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var O=(i.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var M=(i.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(L||O||M||w){if(E.s&&C.requeueOnImageNotLoaded&&++t.requeueAttempts<100){f(t.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){i(E.s,E.c).cycle(t)},C.requeueTimeout);s=true;return false}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(s){return false}C.cssBefore=C.cssBefore||{};C.animIn=C.animIn||{};C.animOut=C.animOut||{};J.not(":eq("+x+")").css(C.cssBefore);if(C.cssFirst){i(J[x]).css(C.cssFirst)}if(C.timeout){C.timeout=parseInt(C.timeout);if(C.speed.constructor==String){C.speed=i.fx.speeds[C.speed]||parseInt(C.speed)}if(!C.sync){C.speed=C.speed/2}while((C.timeout-C.speed)<250){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=u.length;C.currSlide=C.lastSlide=x;if(C.random){C.nextSlide=C.currSlide;if(++C.randomIndex==u.length){C.randomIndex=0}C.nextSlide=C.randomMap[C.randomIndex]}else{C.nextSlide=C.startingSlide>=(u.length-1)?0:C.startingSlide+1}if(!C.multiFx){var G=i.fn.cycle.transitions[C.fx];if(i.isFunction(G)){G(y,J,C)}else{if(C.fx!="custom"&&!C.multiFx){f("unknown transition: "+C.fx,"; slideshow terminating");return false}}}var z=J[x];if(C.before.length){C.before[0].apply(z,[z,z,C,true])}if(C.after.length>1){C.after[1].apply(z,[z,z,C,true])}if(C.next){i(C.next).bind(C.prevNextEvent,function(){return o(C,C.rev?-1:1)})}if(C.prev){i(C.prev).bind(C.prevNextEvent,function(){return o(C,C.rev?1:-1)})}if(C.pager){d(u,C)}j(C,u);return C}function n(q){q.original={before:[],after:[]};q.original.cssBefore=i.extend({},q.cssBefore);q.original.cssAfter=i.extend({},q.cssAfter);q.original.animIn=i.extend({},q.animIn);q.original.animOut=i.extend({},q.animOut);i.each(q.before,function(){q.original.before.push(this)});i.each(q.after,function(){q.original.after.push(this)})}function c(w){var u,s,r=i.fn.cycle.transitions;if(w.fx.indexOf(",")>0){w.multiFx=true;w.fxs=w.fx.replace(/\s*/g,"").split(",");for(u=0;u<w.fxs.length;u++){var v=w.fxs[u];s=r[v];if(!s||!r.hasOwnProperty(v)||!i.isFunction(s)){f("discarding unknown transition: ",v);w.fxs.splice(u,1);u--}}if(!w.fxs.length){f("No valid transitions named; slideshow terminating.");return false}}else{if(w.fx=="all"){w.multiFx=true;w.fxs=[];for(p in r){s=r[p];if(r.hasOwnProperty(p)&&i.isFunction(s)){w.fxs.push(p)}}}}if(w.multiFx&&w.randomizeEffects){var t=Math.floor(Math.random()*20)+30;for(u=0;u<t;u++){var q=Math.floor(Math.random()*w.fxs.length);w.fxs.push(w.fxs.splice(q,1)[0])}a("randomized fx sequence: ",w.fxs)}return true}function j(r,q){r.addSlide=function(u,v){var t=i(u),w=t[0];if(!r.autostopCount){r.countdown++}q[v?"unshift":"push"](w);if(r.els){r.els[v?"unshift":"push"](w)}r.slideCount=q.length;t.css("position","absolute");t[v?"prependTo":"appendTo"](r.$cont);if(v){r.currSlide++;r.nextSlide++}if(!i.support.opacity&&r.cleartype&&!r.cleartypeNoBg){g(t)}if(r.fit&&r.width){t.width(r.width)}if(r.fit&&r.height&&r.height!="auto"){$slides.height(r.height)}w.cycleH=(r.fit&&r.height)?r.height:t.height();w.cycleW=(r.fit&&r.width)?r.width:t.width();t.css(r.cssBefore);if(r.pager){i.fn.cycle.createPagerAnchor(q.length-1,w,i(r.pager),q,r)}if(i.isFunction(r.onAddSlide)){r.onAddSlide(t)}else{t.hide()}}}i.fn.cycle.resetState=function(r,q){q=q||r.fx;r.before=[];r.after=[];r.cssBefore=i.extend({},r.original.cssBefore);r.cssAfter=i.extend({},r.original.cssAfter);r.animIn=i.extend({},r.original.animIn);r.animOut=i.extend({},r.original.animOut);r.fxFn=null;i.each(r.original.before,function(){r.before.push(this)});i.each(r.original.after,function(){r.after.push(this)});var s=i.fn.cycle.transitions[q];if(i.isFunction(s)){s(r.$cont,i(r.elements),r)}};function e(x,q,w,y){if(w&&q.busy&&q.manualTrump){i(x).stop(true,true);q.busy=false}if(q.busy){return}var u=q.$cont[0],A=x[q.currSlide],z=x[q.nextSlide];if(u.cycleStop!=q.stopCount||u.cycleTimeout===0&&!w){return}if(!w&&!u.cyclePause&&((q.autostop&&(--q.countdown<=0))||(q.nowrap&&!q.random&&q.nextSlide<q.currSlide))){if(q.end){q.end(q)}return}if(w||!u.cyclePause){var v=q.fx;A.cycleH=A.cycleH||i(A).height();A.cycleW=A.cycleW||i(A).width();z.cycleH=z.cycleH||i(z).height();z.cycleW=z.cycleW||i(z).width();if(q.multiFx){if(q.lastFx==undefined||++q.lastFx>=q.fxs.length){q.lastFx=0}v=q.fxs[q.lastFx];q.currFx=v}if(q.oneTimeFx){v=q.oneTimeFx;q.oneTimeFx=null}i.fn.cycle.resetState(q,v);if(q.before.length){i.each(q.before,function(B,C){if(u.cycleStop!=q.stopCount){return}C.apply(z,[A,z,q,y])})}var s=function(){i.each(q.after,function(B,C){if(u.cycleStop!=q.stopCount){return}C.apply(z,[A,z,q,y])})};if(q.nextSlide!=q.currSlide){q.busy=1;if(q.fxFn){q.fxFn(A,z,q,s,y)}else{if(i.isFunction(i.fn.cycle[q.fx])){i.fn.cycle[q.fx](A,z,q,s)}else{i.fn.cycle.custom(A,z,q,s,w&&q.fastOnEvent)}}}q.lastSlide=q.currSlide;if(q.random){q.currSlide=q.nextSlide;if(++q.randomIndex==x.length){q.randomIndex=0}q.nextSlide=q.randomMap[q.randomIndex]}else{var t=(q.nextSlide+1)==x.length;q.nextSlide=t?0:q.nextSlide+1;q.currSlide=t?x.length-1:q.nextSlide-1}if(q.pager){i.fn.cycle.updateActivePagerLink(q.pager,q.currSlide)}}var r=0;if(q.timeout&&!q.continuous){r=h(A,z,q,y)}else{if(q.continuous&&u.cyclePause){r=10}}if(r>0){u.cycleTimeout=setTimeout(function(){e(x,q,0,!q.rev)},r)}}i.fn.cycle.updateActivePagerLink=function(q,r){i(q).each(function(){i(this).find("a").removeClass("activeSlide").filter("a:eq("+r+")").addClass("activeSlide")})};function h(v,s,u,r){if(u.timeoutFn){var q=u.timeoutFn(v,s,u,r);while((q-u.speed)<250){q+=u.speed}a("calculated timeout: "+q+"; speed: "+u.speed);if(q!==false){return q}}return u.timeout}i.fn.cycle.next=function(q){o(q,q.rev?-1:1)};i.fn.cycle.prev=function(q){o(q,q.rev?1:-1)};function o(r,u){var q=r.elements;var t=r.$cont[0],s=t.cycleTimeout;if(s){clearTimeout(s);t.cycleTimeout=0}if(r.random&&u<0){r.randomIndex--;if(--r.randomIndex==-2){r.randomIndex=q.length-2}else{if(r.randomIndex==-1){r.randomIndex=q.length-1}}r.nextSlide=r.randomMap[r.randomIndex]}else{if(r.random){if(++r.randomIndex==q.length){r.randomIndex=0}r.nextSlide=r.randomMap[r.randomIndex]}else{r.nextSlide=r.currSlide+u;if(r.nextSlide<0){if(r.nowrap){return false}r.nextSlide=q.length-1}else{if(r.nextSlide>=q.length){if(r.nowrap){return false}r.nextSlide=0}}}}if(i.isFunction(r.prevNextClick)){r.prevNextClick(u>0,r.nextSlide,q[r.nextSlide])}e(q,r,1,u>=0);return false}function d(r,s){var q=i(s.pager);i.each(r,function(t,u){i.fn.cycle.createPagerAnchor(t,u,q,r,s)});i.fn.cycle.updateActivePagerLink(s.pager,s.startingSlide)}i.fn.cycle.createPagerAnchor=function(u,v,s,t,w){var r;if(i.isFunction(w.pagerAnchorBuilder)){r=w.pagerAnchorBuilder(u,v)}else{r='<a href="#">'+(u+1)+"</a>"}if(!r){return}var x=i(r);if(x.parents("body").length===0){var q=[];if(s.length>1){s.each(function(){var y=x.clone(true);i(this).append(y);q.push(y[0])});x=i(q)}else{x.appendTo(s)}}x.bind(w.pagerEvent,function(A){A.preventDefault();w.nextSlide=u;var z=w.$cont[0],y=z.cycleTimeout;if(y){clearTimeout(y);z.cycleTimeout=0}if(i.isFunction(w.pagerClick)){w.pagerClick(w.nextSlide,t[w.nextSlide])}e(t,w,1,w.currSlide<u);return false});if(w.pagerEvent!="click"){x.click(function(){return false})}if(w.pauseOnPagerHover){x.hover(function(){w.$cont[0].cyclePause++},function(){w.$cont[0].cyclePause--})}};i.fn.cycle.hopsFromLast=function(t,s){var r,q=t.lastSlide,u=t.currSlide;if(s){r=u>q?u-q:t.slideCount-q}else{r=u<q?q-u:q+t.slideCount-u}return r};function g(s){function r(t){t=parseInt(t).toString(16);return t.length<2?"0"+t:t}function q(w){for(;w&&w.nodeName.toLowerCase()!="html";w=w.parentNode){var t=i.css(w,"background-color");if(t.indexOf("rgb")>=0){var u=t.match(/\d+/g);return"#"+r(u[0])+r(u[1])+r(u[2])}if(t&&t!="transparent"){return t}}return"#ffffff"}s.each(function(){i(this).css("background-color",q(this))})}i.fn.cycle.commonReset=function(v,t,u,r,s,q){i(u.elements).not(v).hide();u.cssBefore.opacity=1;u.cssBefore.display="block";if(r!==false&&t.cycleW>0){u.cssBefore.width=t.cycleW}if(s!==false&&t.cycleH>0){u.cssBefore.height=t.cycleH}u.cssAfter=u.cssAfter||{};u.cssAfter.display="none";i(v).css("zIndex",u.slideCount+(q===true?1:0));i(t).css("zIndex",u.slideCount+(q===true?0:1))};i.fn.cycle.custom=function(B,v,q,s,r){var A=i(B),w=i(v);var t=q.speedIn,z=q.speedOut,u=q.easeIn,y=q.easeOut;w.css(q.cssBefore);if(r){if(typeof r=="number"){t=z=r}else{t=z=1}u=y=null}var x=function(){w.animate(q.animIn,t,u,s)};A.animate(q.animOut,z,y,function(){if(q.cssAfter){A.css(q.cssAfter)}if(!q.sync){x()}});if(q.sync){x()}};i.fn.cycle.transitions={fade:function(r,s,q){s.not(":eq("+q.currSlide+")").css("opacity",0);q.before.push(function(v,t,u){i.fn.cycle.commonReset(v,t,u);u.cssBefore.opacity=0});q.animIn={opacity:1};q.animOut={opacity:0};q.cssBefore={top:0,left:0}}};i.fn.cycle.ver=function(){return l};i.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",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:!i.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);

(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h()}};a.fn.cycle.transitions.scrollUp=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssBefore={top:b,left:0};c.cssFirst={top:0};c.animIn={top:0};c.animOut={top:-b}};a.fn.cycle.transitions.scrollDown=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssFirst={top:0};c.cssBefore={top:-b,left:0};c.animIn={top:0};c.animOut={top:b}};a.fn.cycle.transitions.scrollLeft=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst={left:0};c.cssBefore={left:b,top:0};c.animIn={left:0};c.animOut={left:0-b}};a.fn.cycle.transitions.scrollRight=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst={left:0};c.cssBefore={left:-b,top:0};c.animIn={left:0};c.animOut={left:b}};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(h,f,g,e){a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW});b.cssFirst={left:0};b.cssBefore={top:0};b.animIn={left:0};b.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(h,f,g,e){a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH});b.cssFirst={top:0};b.cssBefore={left:0};b.animIn={top:0};b.animOut={left:0}};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW});b.cssBefore={left:0,top:0,width:0};b.animIn={width:"show"};b.animOut={width:0}};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH});b.cssBefore={left:0,top:0,height:0};b.animIn={height:"show"};b.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(e,f,d){var c,b=e.css("overflow","visible").width();f.css({left:0,top:0});d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-b,top:15};d.els=[];for(c=0;c<f.length;c++){d.els.push(f[c])}for(c=0;c<d.currSlide;c++){d.els.push(d.els.shift())}d.fxFn=function(m,j,l,g,i){var h=i?a(m):a(j);a(j).css(l.cssBefore);var k=l.slideCount;h.animate(l.shuffle,l.speedIn,l.easeIn,function(){var o=a.fn.cycle.hopsFromLast(l,i);for(var q=0;q<o;q++){i?l.els.push(l.els.shift()):l.els.unshift(l.els.pop())}if(i){for(var r=0,n=l.els.length;r<n;r++){a(l.els[r]).css("z-index",n-r+k)}}else{var s=a(m).css("z-index");h.css("z-index",parseInt(s)+1+k)}h.animate({left:0,top:0},l.speedOut,l.easeOut,function(){a(i?this:m).hide();if(g){g()}})})};d.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH});b.cssFirst={top:0};b.cssBefore={left:0,height:0};b.animIn={top:0};b.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH});b.cssFirst={top:0};b.cssBefore={left:0,top:0,height:0};b.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW});b.cssBefore={top:0,width:0};b.animIn={left:0};b.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW});b.cssBefore={top:0,left:0,width:0};b.animIn={left:0};b.animOut={width:0}};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;f.animIn={top:0,left:0,width:e.cycleW,height:e.cycleH};f.animOut={width:0,height:0,top:g.cycleH/2,left:g.cycleW/2}});b.cssFirst={top:0,left:0};b.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;f.animIn={top:0,left:0,width:e.cycleW,height:e.cycleH}});b.cssBefore={width:0,height:0};b.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(d,e,c){var b=d.css("overflow","hidden").width();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.width=f.cycleW;g.animOut.left=h.cycleW});c.cssBefore={left:b,top:0};c.animIn={left:0};c.animOut={left:b}};a.fn.cycle.transitions.blindY=function(d,e,c){var b=d.css("overflow","hidden").height();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH});c.cssBefore={top:b,left:0};c.animIn={top:0};c.animOut={top:b}};a.fn.cycle.transitions.blindZ=function(e,f,d){var c=e.css("overflow","hidden").height();var b=e.width();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h);h.animIn.height=g.cycleH;h.animOut.top=i.cycleH});d.cssBefore={top:c,left:b};d.animIn={top:0,left:0};d.animOut={top:c,left:b}};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn={left:0,width:this.cycleW};f.animOut={left:0}});b.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn={top:0,height:this.cycleH};f.animOut={top:0}});b.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn={left:0,width:this.cycleW};f.animOut={left:g.cycleW/2,width:0}});b.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn={top:0,height:e.cycleH};f.animOut={top:g.cycleH/2,height:0}});b.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h);if(i=="right"){h.cssBefore.left=-b}else{if(i=="up"){h.cssBefore.top=c}else{if(i=="down"){h.cssBefore.top=-c}else{h.cssBefore.left=b}}}});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h,true,true,true);if(i=="right"){h.animOut.left=b}else{if(i=="up"){h.animOut.top=-c}else{if(i=="down"){h.animOut.top=c}else{h.animOut.left=-b}}}});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(e,f,d){var b=e.css("overflow","visible").width();var c=e.height();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){h.animOut={left:b*2,top:-c/2,opacity:0}}else{h.animOut.opacity=0}});d.cssBefore={left:0,top:0};d.animIn={left:0}};a.fn.cycle.transitions.wipe=function(s,m,e){var q=s.css("overflow","hidden").width();var j=s.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+j+"px 0px)"}else{if(/r2l/.test(e.clip)){g="rect(0px "+q+"px "+j+"px "+q+"px)"}else{if(/t2b/.test(e.clip)){g="rect(0px "+q+"px 0px 0px)"}else{if(/b2t/.test(e.clip)){g="rect("+j+"px "+q+"px "+j+"px 0px)"}else{if(/zoom/.test(e.clip)){var o=parseInt(j/2);var f=parseInt(q/2);g="rect("+o+"px "+f+"px "+o+"px "+f+"px)"}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var k=e.cssBefore.clip.match(/(\d+)/g);var u=parseInt(k[0]),c=parseInt(k[1]),n=parseInt(k[2]),i=parseInt(k[3]);e.before.push(function(w,h,t){if(w==h){return}var d=a(w),b=a(h);a.fn.cycle.commonReset(w,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13))-1;(function v(){var y=u?u-parseInt(r*(u/l)):0;var z=i?i-parseInt(r*(i/l)):0;var A=n<j?n+parseInt(r*((j-n)/l||1)):j;var x=c<q?c+parseInt(r*((q-c)/l||1)):q;b.css({clip:"rect("+y+"px "+x+"px "+A+"px "+z+"px)"});(r++<=l)?setTimeout(v,13):d.css("display","none")})()});e.cssBefore={display:"block",opacity:1,top:0,left:0};e.animIn={left:0};e.animOut={left:0}}})(jQuery);