
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  arguments.callee = arguments.callee.caller;  
  if(this.console) console.log( Array.prototype.slice.call(arguments) );
};
// make it safe to use console.log always
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


// place any jQuery/helper plugins in here, instead of separate, slower script files.

/**
 * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
 * Common usage: wipe images (left and right to show the previous or next image)
 * 
 * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
 * @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems)
 * @version 1.1 (1st September 2010) - support wipe up and wipe down
 * @version 1.0 (15th July 2010)
 */
(function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false}function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault()}if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft()}else{config.wipeRight()}}else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown()}else{config.wipeUp()}}}}function onTouchStart(e){if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false)}}if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false)}});return this}})(jQuery);

/*
 * jQuery Reveal Plugin 1.0
 * www.ZURB.com
 * Copyright 2010, ZURB
 * Free to use under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
*/


(function($) {

/*---------------------------
 Defaults for Reveal
----------------------------*/
	 
/*---------------------------
 Listener for data-reveal-id attributes
----------------------------*/

/*
	$('a[data-reveal-id]').live('click', function(e) {
		e.preventDefault();
		var modalLocation = $(this).attr('data-reveal-id');
		$('#'+modalLocation).reveal($(this).data());
	});
*/
	
		$('a[data-reveal-id]').live('click', function(e) {
		e.preventDefault();
		var modalLocation = $(this).attr('data-reveal-id');
		$('.'+modalLocation).reveal($(this).data());
	});

/*---------------------------
 Extend and Execute
----------------------------*/

    $.fn.reveal = function(options) {
        
        
        var defaults = {  
	    	animation: 'fadeAndPop', //fade, fadeAndPop, none
		    animationspeed: 300, //how fast animtions are
		    closeonbackgroundclick: true, //if you click background will modal close?
		    dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
    	}; 
    	
        //Extend dem' options
        var options = $.extend({}, defaults, options); 
	
        return this.each(function() {
        
/*---------------------------
 Global Variables
----------------------------*/
        	var modal = $(this),
        		topMeasure  = parseInt(modal.css('top')),
				topOffset = modal.height() + topMeasure,
          		locked = false,
				modalBG = $('.reveal-modal-bg');

/*---------------------------
 Create Modal BG
----------------------------*/
			if(modalBG.length == 0) {
				modalBG = $('<div class="reveal-modal-bg" />').insertAfter(modal);
			}		    
     
/*---------------------------
 Open & Close Animations
----------------------------*/
			//Entrance Animations
			modal.bind('reveal:open', function () {
			  modalBG.unbind('click.modalEvent');
				$('.' + options.dismissmodalclass).unbind('click.modalEvent');
				if(!locked) {
					lockModal();
					if(options.animation == "fadeAndPop") {
						modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
						modalBG.fadeIn(options.animationspeed/2);
						modal.delay(options.animationspeed/2).animate({
							"top": $(document).scrollTop()+topMeasure + 'px',
							"opacity" : 1
						}, options.animationspeed,unlockModal());					
					}
					if(options.animation == "fade") {
						modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure});
						modalBG.fadeIn(options.animationspeed/2);
						modal.delay(options.animationspeed/2).animate({
							"opacity" : 1
						}, options.animationspeed,unlockModal());					
					} 
					if(options.animation == "none") {
						modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure});
						modalBG.css({"display":"block"});	
						unlockModal()				
					}
				}
				modal.unbind('reveal:open');
			}); 	

			//Closing Animation
			modal.bind('reveal:close', function () {
			  if(!locked) {
					lockModal();
					if(options.animation == "fadeAndPop") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"top":  $(document).scrollTop()-topOffset + 'px',
							"opacity" : 0
						}, options.animationspeed/2, function() {
							modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});
							unlockModal();
						});					
					}  	
					if(options.animation == "fade") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"opacity" : 0
						}, options.animationspeed, function() {
							modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure});
							unlockModal();
						});					
					}  	
					if(options.animation == "none") {
						modal.css({'visibility' : 'hidden', 'top' : topMeasure});
						modalBG.css({'display' : 'none'});	
					}		
				}
				modal.unbind('reveal:close');
			});     
   	
/*---------------------------
 Open and add Closing Listeners
----------------------------*/
        	//Open Modal Immediately
    	modal.trigger('reveal:open')
			
			//Close Modal Listeners
			var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () {
			  modal.trigger('reveal:close')
			});
			
			if(options.closeonbackgroundclick) {
				modalBG.css({"cursor":"pointer"})
				modalBG.bind('click.modalEvent', function () {
				  modal.trigger('reveal:close')
				});
			}
			$('body').keyup(function(e) {
        		if(e.which===27){ modal.trigger('reveal:close'); } // 27 is the keycode for the Escape key
			});
			
			
/*---------------------------
 Animations Locks
----------------------------*/
			function unlockModal() { 
				locked = false;
			}
			function lockModal() {
				locked = true;
			}	
			
        });//each call
    }//orbit plugin call
})(jQuery);
        
/*
 * jQuery FlexSlider v1.8
 * http://flex.madebymufffin.com
 * Copyright 2011, Tyler Smith
 */
(function(a){a.flexslider=function(c,b){var d=c;d.init=function(){d.vars=a.extend({},a.flexslider.defaults,b);d.data("flexslider",true);d.container=a(".slides",d);d.slides=a(".slides > li",d);d.count=d.slides.length;d.animating=false;d.currentSlide=d.vars.slideToStart;d.animatingTo=d.currentSlide;d.atEnd=(d.currentSlide==0)?true:false;d.eventType=("ontouchstart" in document.documentElement)?"touchstart":"click";d.cloneCount=0;d.cloneOffset=0;d.manualPause=false;d.vertical=(d.vars.slideDirection=="vertical");d.prop=(d.vertical)?"top":"marginLeft";d.args={};d.transitions="webkitTransition" in document.body.style;if(d.transitions){d.prop="-webkit-transform"}if(d.vars.controlsContainer!=""){d.controlsContainer=a(d.vars.controlsContainer).eq(a(".slides").index(d.container));d.containerExists=d.controlsContainer.length>0}if(d.vars.manualControls!=""){d.manualControls=a(d.vars.manualControls,((d.containerExists)?d.controlsContainer:d));d.manualExists=d.manualControls.length>0}if(d.vars.randomize){d.slides.sort(function(){return(Math.round(Math.random())-0.5)});d.container.empty().append(d.slides)}if(d.vars.animation.toLowerCase()=="slide"){if(d.transitions){d.setTransition(0)}d.css({overflow:"hidden"});if(d.vars.animationLoop){d.cloneCount=2;d.cloneOffset=1;d.container.append(d.slides.filter(":first").clone().addClass("clone")).prepend(d.slides.filter(":last").clone().addClass("clone"))}d.newSlides=a(".slides > li",d);var m=(-1*(d.currentSlide+d.cloneOffset));if(d.vertical){d.newSlides.css({display:"block",width:"100%","float":"left"});d.container.height((d.count+d.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){d.css({position:"relative"}).height(d.slides.filter(":first").height());d.args[d.prop]=(d.transitions)?"translate3d(0,"+m*d.height()+"px,0)":m*d.height()+"px";d.container.css(d.args)},100)}else{d.args[d.prop]=(d.transitions)?"translate3d("+m*d.width()+"px,0,0)":m*d.width()+"px";d.container.width((d.count+d.cloneCount)*200+"%").css(d.args);setTimeout(function(){d.newSlides.width(d.width()).css({"float":"left",display:"block"})},100)}}else{d.transitions=false;d.slides.css({width:"100%","float":"left",marginRight:"-100%"}).eq(d.currentSlide).fadeIn(d.vars.animationDuration)}if(d.vars.controlNav){if(d.manualExists){d.controlNav=d.manualControls}else{var e=a('<ol class="flex-control-nav"></ol>');var s=1;for(var t=0;t<d.count;t++){e.append("<li><a>"+s+"</a></li>");s++}if(d.containerExists){a(d.controlsContainer).append(e);d.controlNav=a(".flex-control-nav li a",d.controlsContainer)}else{d.append(e);d.controlNav=a(".flex-control-nav li a",d)}}d.controlNav.eq(d.currentSlide).addClass("active");d.controlNav.bind(d.eventType,function(i){i.preventDefault();if(!a(this).hasClass("active")){(d.controlNav.index(a(this))>d.currentSlide)?d.direction="next":d.direction="prev";d.flexAnimate(d.controlNav.index(a(this)),d.vars.pauseOnAction)}})}if(d.vars.directionNav){var v=a('<ul class="flex-direction-nav"><li><a class="prev" href="#">'+d.vars.prevText+'</a></li><li><a class="next" href="#">'+d.vars.nextText+"</a></li></ul>");if(d.containerExists){a(d.controlsContainer).append(v);d.directionNav=a(".flex-direction-nav li a",d.controlsContainer)}else{d.append(v);d.directionNav=a(".flex-direction-nav li a",d)}if(!d.vars.animationLoop){if(d.currentSlide==0){d.directionNav.filter(".prev").addClass("disabled")}else{if(d.currentSlide==d.count-1){d.directionNav.filter(".next").addClass("disabled")}}}d.directionNav.bind(d.eventType,function(i){i.preventDefault();var j=(a(this).hasClass("next"))?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}})}if(d.vars.keyboardNav&&a("ul.slides").length==1){function h(i){if(d.animating){return}else{if(i.keyCode!=39&&i.keyCode!=37){return}else{if(i.keyCode==39){var j=d.getTarget("next")}else{if(i.keyCode==37){var j=d.getTarget("prev")}}if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}}}}a(document).bind("keyup",h)}if(d.vars.mousewheel){d.mousewheelEvent=(/Firefox/i.test(navigator.userAgent))?"DOMMouseScroll":"mousewheel";d.bind(d.mousewheelEvent,function(y){y.preventDefault();y=y?y:window.event;var i=y.detail?y.detail*-1:y.wheelDelta/40,j=(i<0)?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}})}if(d.vars.slideshow){if(d.vars.pauseOnHover&&d.vars.slideshow){d.hover(function(){d.pause()},function(){if(!d.manualPause){d.resume()}})}d.animatedSlides=setInterval(d.animateSlides,d.vars.slideshowSpeed)}if(d.vars.pausePlay){var q=a('<div class="flex-pauseplay"><span></span></div>');if(d.containerExists){d.controlsContainer.append(q);d.pausePlay=a(".flex-pauseplay span",d.controlsContainer)}else{d.append(q);d.pausePlay=a(".flex-pauseplay span",d)}var n=(d.vars.slideshow)?"pause":"play";d.pausePlay.addClass(n).text((n=="pause")?d.vars.pauseText:d.vars.playText);d.pausePlay.bind(d.eventType,function(i){i.preventDefault();if(a(this).hasClass("pause")){d.pause();d.manualPause=true}else{d.resume();d.manualPause=false}})}if("ontouchstart" in document.documentElement){var w,u,l,r,o,x,p=false;d.each(function(){if("ontouchstart" in document.documentElement){this.addEventListener("touchstart",g,false)}});function g(i){if(d.animating){i.preventDefault()}else{if(i.touches.length==1){d.pause();r=(d.vertical)?d.height():d.width();x=Number(new Date());l=(d.vertical)?(d.currentSlide+d.cloneOffset)*d.height():(d.currentSlide+d.cloneOffset)*d.width();w=(d.vertical)?i.touches[0].pageY:i.touches[0].pageX;u=(d.vertical)?i.touches[0].pageX:i.touches[0].pageY;d.setTransition(0);this.addEventListener("touchmove",k,false);this.addEventListener("touchend",f,false)}}}function k(i){o=(d.vertical)?w-i.touches[0].pageY:w-i.touches[0].pageX;p=(d.vertical)?(Math.abs(o)<Math.abs(i.touches[0].pageX-u)):(Math.abs(o)<Math.abs(i.touches[0].pageY-u));if(!p){i.preventDefault();if(d.vars.animation=="slide"&&d.transitions){if(!d.vars.animationLoop){o=o/((d.currentSlide==0&&o<0||d.currentSlide==d.count-1&&o>0)?(Math.abs(o)/r+2):1)}d.args[d.prop]=(d.vertical)?"translate3d(0,"+(-l-o)+"px,0)":"translate3d("+(-l-o)+"px,0,0)";d.container.css(d.args)}}}function f(j){d.animating=false;if(d.animatingTo==d.currentSlide&&!p&&!(o==null)){var i=(o>0)?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(i)&&Number(new Date())-x<550&&Math.abs(o)>20||Math.abs(o)>r/2){d.flexAnimate(i,d.vars.pauseOnAction)}else{d.flexAnimate(d.currentSlide,d.vars.pauseOnAction)}}this.removeEventListener("touchmove",k,false);this.removeEventListener("touchend",f,false);w=null;u=null;o=null;l=null}}if(d.vars.animation.toLowerCase()=="slide"){a(window).resize(function(){if(!d.animating){if(d.vertical){d.height(d.slides.filter(":first").height());d.args[d.prop]=(-1*(d.currentSlide+d.cloneOffset))*d.slides.filter(":first").height()+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}else{d.newSlides.width(d.width());d.args[d.prop]=(-1*(d.currentSlide+d.cloneOffset))*d.width()+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}}})}d.vars.start(d)};d.flexAnimate=function(g,f){if(!d.animating){d.animating=true;d.animatingTo=g;d.vars.before(d);if(f){d.pause()}if(d.vars.controlNav){d.controlNav.removeClass("active").eq(g).addClass("active")}d.atEnd=(g==0||g==d.count-1)?true:false;if(!d.vars.animationLoop&&d.vars.directionNav){if(g==0){d.directionNav.removeClass("disabled").filter(".prev").addClass("disabled")}else{if(g==d.count-1){d.directionNav.removeClass("disabled").filter(".next").addClass("disabled")}else{d.directionNav.removeClass("disabled")}}}if(!d.vars.animationLoop&&g==d.count-1){d.pause();d.vars.end(d)}if(d.vars.animation.toLowerCase()=="slide"){var e=(d.vertical)?d.slides.filter(":first").height():d.slides.filter(":first").width();if(d.currentSlide==0&&g==d.count-1&&d.vars.animationLoop&&d.direction!="next"){d.slideString="0px"}else{if(d.currentSlide==d.count-1&&g==0&&d.vars.animationLoop&&d.direction!="prev"){d.slideString=(-1*(d.count+1))*e+"px"}else{d.slideString=(-1*(g+d.cloneOffset))*e+"px"}}d.args[d.prop]=d.slideString;if(d.transitions){d.setTransition(d.vars.animationDuration);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.slideString+",0)":"translate3d("+d.slideString+",0,0)";d.container.css(d.args).one("webkitTransitionEnd transitionend",function(){d.wrapup(e)})}else{d.container.animate(d.args,d.vars.animationDuration,function(){d.wrapup(e)})}}else{d.slides.eq(d.currentSlide).fadeOut(d.vars.animationDuration);d.slides.eq(g).fadeIn(d.vars.animationDuration,function(){d.wrapup()})}}};d.wrapup=function(e){if(d.vars.animation=="slide"){if(d.currentSlide==0&&d.animatingTo==d.count-1&&d.vars.animationLoop){d.args[d.prop]=(-1*d.count)*e+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}else{if(d.currentSlide==d.count-1&&d.animatingTo==0&&d.vars.animationLoop){d.args[d.prop]=-1*e+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}}}d.animating=false;d.currentSlide=d.animatingTo;d.vars.after(d)};d.animateSlides=function(){if(!d.animating){d.flexAnimate(d.getTarget("next"))}};d.pause=function(){clearInterval(d.animatedSlides);if(d.vars.pausePlay){d.pausePlay.removeClass("pause").addClass("play").text(d.vars.playText)}};d.resume=function(){d.animatedSlides=setInterval(d.animateSlides,d.vars.slideshowSpeed);if(d.vars.pausePlay){d.pausePlay.removeClass("play").addClass("pause").text(d.vars.pauseText)}};d.canAdvance=function(e){if(!d.vars.animationLoop&&d.atEnd){if(d.currentSlide==0&&e==d.count-1&&d.direction!="next"){return false}else{if(d.currentSlide==d.count-1&&e==0&&d.direction=="next"){return false}else{return true}}}else{return true}};d.getTarget=function(e){d.direction=e;if(e=="next"){return(d.currentSlide==d.count-1)?0:d.currentSlide+1}else{return(d.currentSlide==0)?d.count-1:d.currentSlide-1}};d.setTransition=function(e){d.container.css({"-webkit-transition-duration":(e/1000)+"s"})};d.init()};a.flexslider.defaults={animation:"fade",slideDirection:"horizontal",slideshow:true,slideshowSpeed:7000,animationDuration:600,directionNav:true,controlNav:true,keyboardNav:true,mousewheel:false,prevText:"Previous",nextText:"Next",pausePlay:false,pauseText:"Pause",playText:"Play",randomize:false,slideToStart:0,animationLoop:true,pauseOnAction:true,pauseOnHover:false,controlsContainer:"",manualControls:"",start:function(){},before:function(){},after:function(){},end:function(){}};a.fn.flexslider=function(b){return this.each(function(){if(a(this).find(".slides li").length==1){a(this).find(".slides li").fadeIn(400)}else{if(a(this).data("flexslider")!=true){new a.flexslider(a(this),b)}}})}})(jQuery);

/*! 
 * fancyBox 2.0.1
 * Copyright 2011, Janis Skarnelis (www.fancyapps.com)
 * License: www.fancyapps.com/fancybox/#license
 *	
 */
(function (window, document, $) {
	var W = $(window),
		D = $(document),
		F = $.fancybox = function () {
			F.open.apply( this, arguments );
		},
		didResize = false,
		resizeTimer = null;

	$.extend(F, {
		// The current version of fancyBox
		version: '2.0.1',

		defaults: {
			padding: 15,
			margin: 20,

			width: 800,
			height: 600,
			minWidth: 200,
			minHeight: 200,
			maxWidth: 9999,
			maxHeight: 9999,

			autoSize: true,
			fitToView: true,
			aspectRatio: false,
			topRatio: 0.5,

			fixed: !$.browser.msie || $.browser.version > 6,
			scrolling: 'auto', // 'auto', 'yes' or 'no'
			wrapCSS: 'fancybox-default',

			arrows: true,
			closeBtn: true,
			closeClick: true,
			mouseWheel: true,
			autoPlay: false,
			playSpeed: 3000,

			loop: true,
			ajax: {},
			keys: {
				next: [13, 32, 34, 39, 40], // enter, space, page down, right arrow, down arrow
				prev: [8, 33, 37, 38], // backspace, page up, left arrow, up arrow
				close: [27] // escape key
			},

			// Override some properties
			index: 0,
			type: null,
			href: null,
			content: null,
			title: null,

			// HTML templates
			tpl: {
				wrap: '<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',
				image: '<img class="fancybox-image" src="{href}" alt="" />',
				iframe: '<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="{scrolling}" src="{href}"></iframe>',
				swf: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',
				error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
				closeBtn: '<div title="Close" class="fancybox-item fancybox-close"></div>',
				next: '<a title="Next" class="fancybox-item fancybox-next"><span></span></a>',
				prev: '<a title="Previous" class="fancybox-item fancybox-prev"><span></span></a>'
			},

			// Properties for each animation type
			// Opening fancyBox
			openEffect: 'fade', // 'elastic', 'fade' or 'none'
			openSpeed: 500,
			openEasing: 'swing',
			openOpacity: true,
			openMethod: 'zoomIn',

			// Closing fancyBox
			closeEffect: 'fade', // 'elastic', 'fade' or 'none'
			closeSpeed: 500,
			closeEasing: 'swing',
			closeOpacity: true,
			closeMethod: 'zoomOut',

			// Changing next gallery item
			nextEffect: 'elastic', // 'elastic', 'fade' or 'none'
			nextSpeed: 300,
			nextEasing: 'swing',
			nextMethod: 'changeIn',

			// Changing previous gallery item
			prevEffect: 'elastic', // 'elastic', 'fade' or 'none'
			prevSpeed: 300,
			prevEasing: 'swing',
			prevMethod: 'changeOut',

			// Enabled helpers
			helpers: {
				overlay: {
					speedIn: 0,
					speedOut: 0,
					opacity: 0.85,
					css: {
						cursor: 'pointer',
						'background-color': 'rgba(0, 0, 0, 0.85)' //Browsers who don`t support rgba will fall back to default color value defined at CSS file
					},
					closeClick: true
				},
				title: {
					type: 'float' // 'float', 'inside', 'outside' or 'over'
				}
			},

			// Callbacks
			onCancel: $.noop, // If canceling
			beforeLoad: $.noop, // Before loading
			afterLoad: $.noop, // After loading
			beforeShow: $.noop, // Before changing in current item
			afterShow: $.noop, // After opening
			beforeClose: $.noop, // Before closing
			afterClose: $.noop // After closing
		},

		//Current state
		group: {}, // Selected group
		opts: {}, // Group options
		coming: null, // Element being loaded
		current: null, // Currently loaded element
		isOpen: false, // Is currently open
		isOpened: false, // Have been fully opened at least once
		wrap: null,
		outer: null,
		inner: null,

		player: {
			timer: null,
			isActive: false
		},

		// Loaders
		ajaxLoad: null,
		imgPreload: null,

		// Some collections
		transitions: {},
		helpers: {},

		/*
		 *	Static methods
		 */

		open: function (group, opts) {
			// Normalize group
			if (!$.isArray(group)) {
				group = [group];
			}

			if (!group.length) {
				return;
			}

			//Kill existing instances
			F.close(true);

			//extend the defaults
			F.opts = $.extend(true, {}, F.defaults, opts);
			F.group = group;

			F._start(F.opts.index || 0);
		},

		cancel: function () {
			if (F.coming && false === F.trigger('onCancel')) {
				return;
			}

			F.coming = null;

			F.hideLoading();

			if (F.ajaxLoad) {
				F.ajaxLoad.abort();
			}

			F.ajaxLoad = null;

			if (F.imgPreload) {
				F.imgPreload.onload = F.imgPreload.onabort = F.imgPreload.onerror = null;
			}
		},

		close: function (a) {
			F.cancel();

			if (!F.current || false === F.trigger('beforeClose')) {
				return;
			}

			//If forced or is still opening then remove immediately
			if (!F.isOpen || (a && a[0] === true)) {
				$(".fancybox-wrap").stop().trigger('onReset').remove();

				F._afterZoomOut();

			} else {
				F.isOpen = F.isOpened = false;

				$(".fancybox-item").remove();

				F.wrap.stop(true).removeClass('fancybox-opened');
				F.inner.css('overflow', 'hidden');

				F.transitions[F.current.closeMethod]();
			}
		},

		play: function (a) {
			var clear = function () {
					clearTimeout(F.player.timer);
				},
				set = function () {
					clear();

					if (F.current && F.player.isActive) {
						F.player.timer = setTimeout(F.next, F.current.playSpeed);
					}
				},
				stop = function () {
					clear();

					D.unbind('.player');

					F.player.isActive = false;

					F.trigger('onPlayEnd');
				},
				start = function () {
					if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
						F.player.isActive = true;

						set();

						D.bind({
							'onCancel.player onComplete.player onUpdate.player': set,
							'onClose.player': stop,
							'onStart.player': clear
						});

						F.trigger('onPlayStart');
					}
				};

			if (F.player.isActive || (a && a[0] === false)) {
				stop();
			} else {
				start();
			}
		},

		next: function () {
			F.current && F.jumpto(F.current.index + 1);
		},

		prev: function () {
			F.current && F.jumpto(F.current.index - 1);
		},

		jumpto: function (index) {
			if (!F.current) {
				return;
			}

			index = parseInt(index, 10);

			if (F.group.length > 1 && F.current.loop) {
				if (index >= F.group.length) {
					index = 0;

				} else if (index < 0) {
					index = F.group.length - 1;
				}
			}

			if (typeof F.group[index] !== 'undefined') {
				F.cancel();

				F._start(index);
			}
		},

		reposition: function (a) {
			if (F.isOpen) {
				F.wrap.css(F._getPosition(a));
			}
		},

		update: function () {
			if (F.isOpen) {
				// It's a very bad idea to attach handlers to the window scroll event, run this code after a delay
				if (!didResize) {
					resizeTimer = setInterval(function () {
						if (didResize) {
							didResize = false;

							clearTimeout(resizeTimer);

							if (F.current) {
								if (F.current.autoSize) {
									F.inner.height('auto');
									F.current.height = F.inner.height();
								}

								F._setDimension();

								if (F.current.canGrow) {
									F.inner.height('auto');
								}

								F.reposition();

								F.trigger('onUpdate');
							}
						}
					}, 100);
				}

				didResize = true;
			}
		},

		toggle: function () {
			if (F.isOpen) {
				F.current.fitToView = !F.current.fitToView;

				F.update();
			}
		},

		hideLoading: function () {
			$("#fancybox-loading").remove();
		},

		showLoading: function () {
			F.hideLoading();

			$('<div id="fancybox-loading"></div>').click(F.cancel).appendTo('body');
		},

		getViewport: function () {
			return {
				x: W.scrollLeft(),
				y: W.scrollTop(),
				w: W.width(),
				h: W.height()
			};
		},

		// Unbind the keyboard / clicking actions
		unbindEvents: function () {
			D.unbind('.fb');
			W.unbind('.fb');
		},

		bindEvents: function () {
			var current = F.current,
				keys = current.keys;

			if (!current) {
				return;
			}

			W.bind('resize.fb, orientationchange.fb', F.update);

			if (keys) {
				D.bind('keydown.fb', function (e) {
					// Ignore key events within form elements
					if ($.inArray(e.target.tagName.toLowerCase(), ['input', 'textarea', 'select', 'button']) > -1) {
						return;
					}

					if ($.inArray(e.keyCode, keys.close) > -1) {
						F.close();
						e.preventDefault();

					} else if ($.inArray(e.keyCode, keys.next) > -1) {
						F.next();
						e.preventDefault();

					} else if ($.inArray(e.keyCode, keys.prev) > -1) {
						F.prev();
						e.preventDefault();
					}
				});
			}

			if ($.fn.mousewheel && current.mouseWheel && F.group.length > 1) {
				F.wrap.bind('mousewheel.fb', function (e, delta) {
					if ($(e.target).get(0).clientHeight === 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
						e.preventDefault();

						F[delta > 0 ? 'prev' : 'next']();
					}
				});
			}
		},

		trigger: function (event) {
			var ret, obj = $.inArray(event, ['onCancel', 'beforeLoad', 'afterLoad']) > -1 ? 'coming' : 'current';

			if (!F[obj]) {
				return;
			}

			if ($.isFunction(F[obj][event])) {
				ret = F[obj][event].apply(F[obj], Array.prototype.slice.call(arguments, 1));
			}

			if (ret === false) {
				return false;
			}

			if (F[obj].helpers) {
				$.each(F[obj].helpers, function (helper, opts) {
					if (opts && typeof F.helpers[helper] !== 'undefined' && $.isFunction(F.helpers[helper][event])) {
						F.helpers[helper][event](opts);
					}
				});
			}

			$.event.trigger(event + '.fb');
		},

		isImage: function (str) {
			return str && str.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i);
		},

		isSWF: function (str) {
			return str && str.match(/\.(swf)(.*)?$/i);
		},

		_start: function (index) {
			var element = F.group[index] || null,
				isDom,
				href,
				type,
				rez;
				coming = $.extend(true, {}, F.opts, ($.isPlainObject(element) ? element : {}), {
					index : index,
					element : element
				});

			// Convert margin property to array - top, right, bottom, left
			if (typeof coming.margin === 'number') {
				coming.margin = [coming.margin, coming.margin, coming.margin, coming.margin];
			}

			//Give a chance for callback or helpers to update coming item (type, title, etc)
			F.coming = coming;

			if (false === F.trigger('beforeLoad')) {
				F.coming = null;
				return;
			}

			//If custom content exists than use it as element
			if (coming.content) {
				element = coming.content;
				type = 'html';
			}

			if (typeof element == 'object' && (element.nodeType || element instanceof $)) {
				isDom = true;
				coming.href = $(element).attr('href') || coming.href;
				coming.title = $(element).attr('title') || coming.title;
			}

			type = coming.type;
			href = coming.href;
			element = coming.element;

			//Check if content type is set, if not, try to get
			if (!type) {
				//If we have source path we can use it to load content ... 
				if (href) {
					if (isDom) {
						rez = $(element).data('fancybox-type');

						if (!rez && element.className) {
							rez = element.className.match(/fancybox\.(\w+)/);
							rez = rez ? rez[1] : false;
						}
					}

					if (rez) {
						type = rez;

					} else if (F.isImage(href)) {
						type = 'image';

					} else if (F.isSWF(href)) {
						type = 'swf';

					} else if (href.match(/^#/)) {
						type = 'inline';

					} else {
						coming.content = href;
					}
				}

				// ...if not - display element itself
				if (!type) {
					type = isDom ? 'inline' : 'html';
				}

				coming.type = type;
			}

			if (!coming.content) {
				coming.content = type === 'inline' && href ? $(href) : element;
			}

			F.coming = coming;

			if (type === 'image') {
				F._loadImage();

			} else if (type === 'ajax') {
				F._loadAjax();

			} else {
				if (!type || (type === 'inline' && !coming.content.length)) {
					F._error();

				} else {
					F._afterLoad();
				}
			}
		},

		_error: function () {
			F.coming.type = 'html';
			F.coming.minHeight = 0;
			F.coming.autoSize = true;
			F.coming.content = F.coming.tpl.error;

			F._afterLoad();
		},

		_loadImage: function () {
			// Reset preload image so it is later possible to check "complete" property
			F.imgPreload = new Image();

			F.imgPreload.onload = function () {
				this.onload = this.onerror = null;

				F.coming.width = this.width;
				F.coming.height = this.height;

				F._afterLoad();
			};

			F.imgPreload.onerror = function () {
				this.onload = this.onerror = null;

				F._error();
			};

			F.imgPreload.src = F.coming.href;

			if (!F.imgPreload.complete) {
				F.showLoading();
			}
		},

		_loadAjax: function () {
			F.showLoading();

			F.ajaxLoad = $.ajax($.extend({}, F.coming.ajax, {
				url: F.coming.href,
				error: function (jqXHR, textStatus, errorThrown) {
					if (textStatus !== 'abort' && jqXHR.status > 0) {
						F.coming.content = errorThrown;

						F._error();

					} else {
						F.hideLoading();
					}
				},
				success: function (data, textStatus, jqXHR) {
					if (textStatus === 'success') {
						F.coming.content = data;

						F._afterLoad();
					}
				}
			}));
		},

		_afterLoad: function () {
			F.hideLoading();

			if (!F.coming || false === F.trigger('afterLoad', F.current)) {
				F.coming = false;

				return;
			}

			if (F.isOpened) {
				$(".fancybox-item").remove();

				F.wrap.stop(true).removeClass('fancybox-opened');

				F.transitions[F.current.prevMethod]();

			} else {
				$(".fancybox-wrap").stop().trigger('onReset').remove();
			}

			F.isOpen = false;
			F.current = F.coming;
			F.coming = false;

			//Build the neccessary markup
			F.wrap = $(F.current.tpl.wrap).addClass(F.current.wrapCSS).appendTo('body');
			F.outer = $('.fancybox-outer', F.wrap).css('padding', F.current.padding + 'px');
			F.inner = $('.fancybox-inner', F.wrap);

			F._setContent();

			F.unbindEvents();
			F.bindEvents();

			//Give a chance for helpers or callbacks to update elements
			F.trigger('beforeShow');

			F._setDimension();

			if (F.isOpened) {
				F.transitions[F.current.nextMethod]();

			} else {
				F.transitions[F.current.openMethod]();
			}
		},

		_setContent: function () {
			var content, loadingBay, current = F.current,
				type = current.type;

			switch (type) {
				case 'inline':
				case 'ajax':
				case 'html':
					if (type === 'inline') {
						content = current.content.show().detach();

						if (content.parent().hasClass('fancybox-inner')) {
							content.parents('.fancybox-wrap').trigger('onReset').remove();
						}

						$(F.wrap).bind('onReset', function () {
							content.appendTo('body').hide();
						});

					} else {
						content = current.content;
					}

					if (current.autoSize) {
						loadingBay = $('<div class="fancybox-tmp"></div>').appendTo($("body")).append(content);

						current.width = loadingBay.outerWidth();
						current.height = loadingBay.outerHeight(true);

						content = loadingBay.children().detach();

						loadingBay.remove();
					}

				break;

				case 'image':
					content = current.tpl.image.replace('{href}', current.href);

					current.aspectRatio = true;
				break;

				case 'swf':
					content = current.tpl.swf.replace(/\{width\}/g, current.width).replace(/\{height\}/g, current.height).replace(/\{href\}/g, current.href);
				break;

				case 'iframe':
					content = current.tpl.iframe.replace('{href}', current.href).replace('{scrolling}', current.scrolling).replace('{rnd}', new Date().getTime());
				break;
			}

			if ($.inArray(type, ['image', 'swf', 'iframe']) > -1) {
				current.autoSize = false;
				current.scrolling = false;
			}

			F.current = current;

			F.inner.append(content);
		},

		_setDimension: function () {
			var viewport = F.getViewport(),
				margin = F.current.margin,
				padding2 = F.current.padding * 2,
				width = F.current.width + padding2,
				height = F.current.height + padding2,
				ratio = F.current.width / F.current.height,

				maxWidth = F.current.maxWidth,
				maxHeight = F.current.maxHeight,
				minWidth = F.current.minWidth,
				minHeight = F.current.minHeight,
				height_;

			viewport.w -= (margin[1] + margin[3]);
			viewport.h -= (margin[0] + margin[2]);

			if (width.toString().indexOf('%') > -1) {
				width = ((viewport.w * parseFloat(width)) / 100);
			}

			if (height.toString().indexOf('%') > -1) {
				height = ((viewport.h * parseFloat(height)) / 100);
			}

			if (F.current.fitToView) {
				maxWidth = Math.min(viewport.w, maxWidth);
				maxHeight = Math.min(viewport.h, maxHeight);
			}

			maxWidth = Math.max(minWidth, maxWidth);
			maxHeight = Math.max(minHeight, maxHeight);

			if (F.current.aspectRatio) {
				if (width > maxWidth) {
					width = maxWidth;
					height = ((width - padding2) / ratio) + padding2;
				}

				if (height > maxHeight) {
					height = maxHeight;
					width = ((height - padding2) * ratio) + padding2;
				}

				if (width < minWidth) {
					width = minWidth;
					height = ((width - padding2) / ratio) + padding2;
				}

				if (height < minHeight) {
					height = minHeight;
					width = ((height - padding2) * ratio) + padding2;
				}

			} else {
				width = Math.max(minWidth, Math.min(width, maxWidth));
				height = Math.max(minHeight, Math.min(height, maxHeight));
			}

			width = Math.round(width);
			height = Math.round(height);

			//Reset dimensions
			$(F.wrap.add(F.outer).add(F.inner)).width('auto').height('auto');

			F.inner.width(width - padding2).height(height - padding2);
			F.wrap.width(width);

			height_ = F.wrap.height(); // Real wrap height

			//Fit wrapper inside
			if (width > maxWidth || height_ > maxHeight) {
				while ((width > maxWidth || height_ > maxHeight) && width > minWidth && height_ > minHeight) {
					height = height - 10;

					if (F.current.aspectRatio) {
						width = Math.round(((height - padding2) * ratio) + padding2);

						if (width < minWidth) {
							width = minWidth;
							height = ((width - padding2) / ratio) + padding2;
						}

					} else {
						width = width - 10;
					}

					F.inner.width(width - padding2).height(height - padding2);
					F.wrap.width(width);

					height_ = F.wrap.height();
				}
			}

			F.current.dim = {
				width: width,
				height: height_
			};

			F.current.canGrow = F.current.autoSize && height > minHeight && height < maxHeight;
			F.current.canShrink = false;
			F.current.canExpand = false;

			if ((width - padding2) < F.current.width || (height - padding2) < F.current.height) {
				F.current.canExpand = true;

			} else if ((width > viewport.w || height_ > viewport.h) && width > minWidth && height > minHeight) {
				F.current.canShrink = true;
			}
		},

		_getPosition: function (a) {
			var viewport = F.getViewport(),
				margin = F.current.margin,
				width = F.wrap.width() + margin[1] + margin[3],
				height = F.wrap.height() + margin[0] + margin[2],
				rez = {
					position: 'absolute',
					top: margin[0] + viewport.y,
					left: margin[3] + viewport.x
				};

			if (F.current.fixed && (!a || a[0] === false) && height <= viewport.h && width <= viewport.w) {
				rez = {
					position: 'fixed',
					top: margin[0],
					left: margin[3]
				};
			}

			rez.top = Math.ceil(Math.max(rez.top, rez.top + ((viewport.h - height) * F.current.topRatio))) + 'px';
			rez.left = Math.ceil(Math.max(rez.left, rez.left + ((viewport.w - width) * 0.5))) + 'px';

			return rez;
		},

		_afterZoomIn: function () {
			var current = F.current;

			F.isOpen = F.isOpened = true;

			F.wrap.addClass('fancybox-opened').css('overflow', 'visible');

			F.update();

			F.inner.css('overflow', current.scrolling === 'auto' ? 'auto' : (current.scrolling === 'yes' ? 'scroll' : 'hidden'));

			//Assign a click event
			if (current.closeClick) {
				F.inner.bind('click.fb', F.close);
			}

			//Create a close button
			if (current.closeBtn) {
				$(F.current.tpl.closeBtn).appendTo(F.wrap).bind('click.fb', F.close);
			}

			//Create navigation arrows
			if (current.arrows && F.group.length > 1) {
				if (current.loop || current.index > 0) {
					$(current.tpl.prev).appendTo(F.wrap).bind('click.fb', F.prev);
				}

				if (current.loop || current.index < F.group.length - 1) {
					$(current.tpl.next).appendTo(F.wrap).bind('click.fb', F.next);
				}
			}

			F.trigger('afterShow');

			if (F.opts.autoPlay && !F.player.isActive) {
				F.opts.autoPlay = false;

				F.play();
			}
		},

		_afterZoomOut: function () {
			F.unbindEvents();

			F.trigger('afterClose');

			F.wrap.trigger('onReset').remove();

			$.extend(F, {
				group: {},
				opts: {},
				current: null,
				isOpened: false,
				isOpen: false,
				wrap: null,
				outer: null,
				inner: null
			});
		}
	});

	/*
	 *	Default transitions
	 */

	F.transitions = {
		getOrigPosition: function () {
			var element = F.current.element,
				pos = {},
				width = 50,
				height = 50,
				image, viewport;

			if (element && element.nodeName && $(element).is(':visible')) {
				image = $(element).find('img:first');

				if (image.length) {
					pos = image.offset();
					width = image.outerWidth();
					height = image.outerHeight();

				} else {
					pos = $(element).offset();
				}

			} else {
				viewport = F.getViewport();
				pos.top = viewport.y + (viewport.h - height) * 0.5;
				pos.left = viewport.x + (viewport.w - width) * 0.5;
			}

			pos = {
				top: Math.ceil(pos.top) + 'px',
				left: Math.ceil(pos.left) + 'px',
				width: Math.ceil(width) + 'px',
				height: Math.ceil(height) + 'px'
			};

			return pos;
		},

		step: function (now, fx) {
			var ratio, innerValue, outerValue;

			if (fx.prop === 'width' || fx.prop === 'height') {
				innerValue = outerValue = Math.ceil(now - (F.current.padding * 2));

				if (fx.prop === 'height') {
					ratio = (now - fx.start) / (fx.end - fx.start);

					if (fx.start > fx.end) {
						ratio = 1 - ratio;
					}

					innerValue -= F.innerSpace * ratio;
					outerValue -= F.outerSpace * ratio;
				}

				F.inner[fx.prop](innerValue);
				F.outer[fx.prop](outerValue);
			}
		},

		zoomIn: function () {
			var startPos, endPos, dim = F.current.dim,
				space = dim.height - (F.current.padding * 2);

			F.innerSpace = space - F.inner.height();
			F.outerSpace = space - F.outer.height();

			if (F.current.openEffect === 'elastic') {
				endPos = $.extend({}, dim, F._getPosition(true));

				//Remove "position" property
				delete endPos.position;

				startPos = this.getOrigPosition();

				if (F.current.openOpacity) {
					startPos.opacity = 0;
					endPos.opacity = 1;
				}

				F.wrap.css(startPos).animate(endPos, {
					duration: F.current.openSpeed,
					easing: F.current.openEasing,
					step: this.step,
					complete: F._afterZoomIn
				});

			} else {
				F.wrap.css($.extend({}, F.current.dim, F._getPosition()));

				if (F.current.openEffect === 'fade') {
					F.wrap.hide().fadeIn(F.current.openSpeed, F._afterZoomIn);

				} else {
					F._afterZoomIn();
				}
			}
		},

		zoomOut: function () {
			var endPos, space = F.wrap.height() - (F.current.padding * 2);

			if (F.current.closeEffect === 'elastic') {
				if (F.wrap.css('position') === 'fixed') {
					F.wrap.css(F._getPosition(true));
				}

				F.innerSpace = space - F.inner.height();
				F.outerSpace = space - F.outer.height();

				endPos = this.getOrigPosition();

				if (F.current.closeOpacity) {
					endPos.opacity = 0;
				}

				F.wrap.animate(endPos, {
					duration: F.current.closeSpeed,
					easing: F.current.closeEasing,
					step: this.step,
					complete: F._afterZoomOut
				});

			} else {
				F.wrap.fadeOut(F.current.closeEffect === 'fade' ? F.current.Speed : 0, F._afterZoomOut);
			}
		},

		changeIn: function () {
			var startPos;

			if (F.current.nextEffect === 'elastic') {
				startPos = F._getPosition(true);
				startPos.opacity = 0;
				startPos.top = (parseInt(startPos.top, 10) - 200) + 'px';

				F.wrap.css(startPos).animate({
					opacity: 1,
					top: '+=200px'
				}, {
					duration: F.current.nextSpeed,
					complete: F._afterZoomIn
				});

			} else {
				F.wrap.css(F._getPosition());

				if (F.current.nextEffect === 'fade') {
					F.wrap.hide().fadeIn(F.current.nextSpeed, F._afterZoomIn);

				} else {
					F._afterZoomIn();
				}
			}
		},

		changeOut: function () {
			function cleanUp() {
				$(this).trigger('onReset').remove();
			}

			F.wrap.removeClass('fancybox-opened');

			if (F.current.prevEffect === 'elastic') {
				F.wrap.animate({
					'opacity': 0,
					top: '+=200px'
				}, {
					duration: F.current.prevSpeed,
					complete: cleanUp
				});

			} else {
				F.wrap.fadeOut(F.current.prevEffect === 'fade' ? F.current.prevSpeed : 0, cleanUp);
			}
		}
	};

	/*
	 *	Overlay helper
	 */

	F.helpers.overlay = {
		overlay: null,

		update: function () {
			var width, scrollWidth, offsetWidth;

			//Reset width/height so it will not mess
			this.overlay.width(0).height(0);

			if ($.browser.msie) {
				scrollWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
				offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);

				width = scrollWidth < offsetWidth ? W.width() : scrollWidth;

			} else {
				width = D.width();
			}

			this.overlay.width(width).height(D.height());
		},

		beforeShow: function (opts) {
			if (this.overlay) {
				return;
			}

			this.overlay = $('<div id="fancybox-overlay"></div>').css(opts.css || {
				background: 'black'
			}).appendTo('body');

			if (opts.closeClick) {
				this.overlay.bind('click.fb', F.close);
			}

			W.bind("resize.fb", $.proxy(this.update, this));

			this.update();

			this.overlay.fadeTo(opts.speedIn || "fast", opts.opacity || 1);
		},

		onUpdate: function () {
			//Update as content may change document dimensions
			this.update();
		},

		afterClose: function (opts) {
			if (this.overlay) {
				this.overlay.fadeOut(opts.speedOut || "fast", function () {
					$(this).remove();
				});
			}

			this.overlay = null;
		}
	};

	/*
	 *	Title helper
	 */

	F.helpers.title = {
		beforeShow: function (opts) {
			var title, text = F.current.title || F.current.element.title || '';

			if (text) {
				title = $('<div class="fancybox-title fancybox-title-' + opts.type + '-wrap">' + text + '</div>').appendTo('body');

				if (opts.type === 'float') {
					//This helps for some browsers
					title.width(title.width());

					title.wrapInner('<span class="child"></span>');

					//Increase bottom margin so this title will also fit into viewport
					F.current.margin[2] += Math.abs(parseInt(title.css('margin-bottom'), 10));
				}

				title.appendTo(opts.type === 'over' ? F.inner : (opts.type === 'outside' ? F.wrap : F.outer));
			}
		}
	};

	// jQuery plugin initialization
	$.fn.fancybox = function (options) {
		var opts = options || {},
			selector = this.selector || '';

		function run(e) {
			var group = [];

			e.preventDefault();

			if (this.rel && this.rel !== '' && this.rel !== 'nofollow') {
				group = selector.length ? $(selector).filter('[rel="' + this.rel + '"]') : $('[rel="' + this.rel + '"]');
			}

			if (group.length) {
				opts.index = group.index(this);

				F(group.get(), opts);

			} else {
				F(this, opts);
			}

			return false;
		}

		if (selector) {
			D.undelegate(selector, 'click.fb-start').delegate(selector, 'click.fb-start', run);

		} else {
			$(this).unbind('click.fb-start').bind('click.fb-start', run);
		}
	};
}(window, document, jQuery));

/*	
 *	jQuery carouFredSel 5.1.1
 *	Demo's and documentation:
 *	caroufredsel.frebsite.nl
 *	
 *	Copyright (c) 2011 Fred Heusschen
 *	www.frebsite.nl
 *
 *	Dual licensed under the MIT and GPL licenses.
 *	http://en.wikipedia.org/wiki/MIT_License
 *	http://en.wikipedia.org/wiki/GNU_General_Public_License
 */


eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('(E($){7($.1M.1G)H;$.1M.1G=E(r,u){7(1a.Q==0){12(I,\'4S 3Z 5Y 1r "\'+1a.3z+\'".\');H 1a}7(1a.Q>1){H 1a.1O(E(){$(1a).1G(r,u)})}8 w=1a,$18=1a[0];w.41=E(o,b,c){o=3A($18,o);7(o.12){D.12=o.12;12(D,\'5Z "12" 60 4T 4U 61 36 62 63 42-1e.\')}8 e=[\'9\',\'1c\',\'U\',\'X\',\'Z\',\'13\'];1r(8 a=0,l=e.Q;a<l;a++){o[e[a]]=3A($18,o[e[a]])}7(F o.1c==\'11\'){7(o.1c<=50)o.1c={\'9\':o.1c};N o.1c={\'1f\':o.1c}}N{7(F o.1c==\'1i\')o.1c={\'1x\':o.1c}}7(F o.9==\'11\')o.9={\'M\':o.9};N 7(o.9==\'15\')o.9={\'M\':o.9,\'O\':o.9,\'1n\':o.9};7(F o.9!=\'1e\')o.9={};7(b)2v=$.25(I,{},$.1M.1G.43,o);6=$.25(I,{},$.1M.1G.43,o);7(F 6.9.16!=\'1e\')6.9.16={};7(6.9.2w==0&&F c==\'11\'){6.9.2w=c}z.26=(6.26==\'44\'||6.26==\'1o\')?\'Z\':\'X\';8 f=[[\'O\',\'3B\',\'27\',\'1n\',\'4V\',\'2x\',\'1o\',\'2y\',\'1s\',0,1,2,3],[\'1n\',\'4V\',\'2x\',\'O\',\'3B\',\'27\',\'2y\',\'1o\',\'3C\',3,2,1,0]];8 g=f[0].Q,4W=(6.26==\'2z\'||6.26==\'1o\')?0:1;6.d={};1r(8 d=0;d<g;d++){6.d[f[0][d]]=f[4W][d]}8 h=w.T();7(6[6.d[\'O\']]==\'U\'){8 i=3D(h,6,\'27\');6[6.d[\'O\']]=i}7(6[6.d[\'1n\']]==\'U\'){8 i=3D(h,6,\'2x\');6[6.d[\'1n\']]=i}7(!6.9[6.d[\'O\']]){6.9[6.d[\'O\']]=(45(h,6,\'27\'))?\'15\':h[6.d[\'27\']](I)}7(!6.9[6.d[\'1n\']]){6.9[6.d[\'1n\']]=(45(h,6,\'2x\'))?\'15\':h[6.d[\'2x\']](I)}7(!6[6.d[\'1n\']]){6[6.d[\'1n\']]=6.9[6.d[\'1n\']]}7(F 6.9.M==\'1e\'){6.9.16.2J=6.9.M.2J;6.9.16.28=6.9.M.28;6.9.M=K}7(F 6.9.M==\'1i\'){6.9.16.3a=6.9.M;6.9.M=K}7(!6.9.M){7(6.9[6.d[\'O\']]==\'15\'){6.9.16.15=I}7(!6.9.16.15){7(F 6[6.d[\'O\']]==\'11\'){6.9.M=1H.3b(6[6.d[\'O\']]/6.9[6.d[\'O\']])}N{8 j=46($1E.3E(),6,\'3B\');6.9.M=1H.3b(j/6.9[6.d[\'O\']]);6[6.d[\'O\']]=6.9.M*6.9[6.d[\'O\']];7(!6.9.16.3a)6.1y=K}7(6.9.M==\'64\'||6.9.M<1){12(I,\'1U a 47 11 3c M 9: 65 36 "15".\');6.9.16.15=I}}}7(!6[6.d[\'O\']]){7(!6.9.16.15&&6.9[6.d[\'O\']]!=\'15\'){6[6.d[\'O\']]=6.9.M*6.9[6.d[\'O\']];6.1y=K}N{6[6.d[\'O\']]=\'15\'}}7(6.9.16.15){6.3F=(6[6.d[\'O\']]==\'15\')?46($1E.3E(),6,\'3B\'):6[6.d[\'O\']];7(6.1y===K){6[6.d[\'O\']]=\'15\'}6.9.M=2K(h,6,0);7(6.9.M>J.P){6.9.M=J.P}}7(F 6.1b==\'1z\'){6.1b=0}7(F 6.1y==\'1z\'){6.1y=(6[6.d[\'O\']]==\'15\')?K:\'48\'}6.9.M=3G(6.9.M,6,6.9.16.3a);6.9.16.29=6.9.M;6.1j=K;6.1b=4X(6.1b);7(6.1y==\'2y\')6.1y=\'1o\';7(6.1y==\'4a\')6.1y=\'2z\';1u(6.1y){R\'48\':R\'1o\':R\'2z\':7(6[6.d[\'O\']]!=\'15\'){8 p=3H(2L(h,6),6);6.1j=I;6.1b[6.d[1]]=p[1];6.1b[6.d[3]]=p[0]}14;2A:6.1y=K;6.1j=(6.1b[0]==0&&6.1b[1]==0&&6.1b[2]==0&&6.1b[3]==0)?K:I;14}7(F 6.1P==\'1k\'&&6.1P)6.1P=\'66\'+w.67(\'68\');7(F 6.9.2M!=\'11\')6.9.2M=6.9.M;7(F 6.1c.1f!=\'11\')6.1c.1f=4Y;7(F 6.1c.9!=\'11\'){7(6.1c.9!=\'4b\'&&6.1c.9!=\'M\'){6.1c.9=(6.9.16.15)?\'15\':6.9.M}}6.U=3d($18,6.U,\'U\');6.X=3d($18,6.X);6.Z=3d($18,6.Z);6.13=3d($18,6.13,\'13\');6.U=$.25(I,{},6.1c,6.U);6.X=$.25(I,{},6.1c,6.X);6.Z=$.25(I,{},6.1c,6.Z);6.13=$.25(I,{},6.1c,6.13);7(F 6.13.3I!=\'1k\')6.13.3I=K;7(F 6.13.4c!=\'E\')6.13.4c=$.1M.1G.4Z;7(F 6.U.1B!=\'1k\')6.U.1B=I;7(F 6.U.4d!=\'11\')6.U.4d=0;7(F 6.U.2N!=\'11\')6.U.2N=(6.U.1f<10)?69:6.U.1f*5;7(6.1V){6.1V=4e(6.1V)}7(D.12){12(D,\'2O O: \'+6.O);12(D,\'2O 1n: \'+6.1n);7(6[6.d[\'O\']]==\'15\')12(D,\'6a \'+6.d[\'O\']+\': \'+6.3F);12(D,\'51 6b: \'+6.9.O);12(D,\'51 6c: \'+6.9.1n);12(D,\'3J 3c 9 M: \'+6.9.M);7(6.U.1B)12(D,\'3J 3c 9 4f 6d: \'+6.U.9);7(6.X.1d)12(D,\'3J 3c 9 4f 52: \'+6.X.9);7(6.Z.1d)12(D,\'3J 3c 9 4f 53: \'+6.Z.9)}};w.54=E(){w.1p(\'4g\',I);7(w.V(\'2h\')==\'3K\'||w.V(\'2h\')==\'6e\'){12(D,\'6f 6g-6h "2h" 4T 4U "6i" 55 "56".\')}8 a={\'4h\':w.V(\'4h\'),\'2h\':w.V(\'2h\'),\'2y\':w.V(\'2y\'),\'2z\':w.V(\'2z\'),\'4a\':w.V(\'4a\'),\'1o\':w.V(\'1o\'),\'O\':w.V(\'O\'),\'1n\':w.V(\'1n\'),\'4i\':w.V(\'4i\'),\'1s\':w.V(\'1s\'),\'3C\':w.V(\'3C\'),\'4j\':w.V(\'4j\')};$1E.V(a).V({\'6j\':\'2P\',\'2h\':(a.2h==\'3K\')?\'3K\':\'56\'});w.1p(\'57\',a).V({\'4h\':\'3L\',\'2h\':\'3K\',\'2y\':0,\'1o\':0,\'4i\':0,\'1s\':0,\'3C\':0,\'4j\':0});7(6.1j){w.T().1O(E(){8 m=2a($(1a).V(6.d[\'1s\']));7(2i(m))m=0;$(1a).1p(\'1I\',m)})}};w.59=E(){w.4k();w.W(G(\'4l\',D),E(e,a){e.19();z.1W=I;7(6.U.1B){6.U.1B=K;w.S(G(\'2Q\',D),a)}H I});w.W(G(\'5a\',D),E(e){e.19();7(z.1J){3e(L)}H I});w.W(G(\'2Q\',D),E(e,a,b){e.19();1t=2R(1t);7(a&&z.1J){L.1W=I;8 c=2j()-L.2B;L.1f-=c;7(L.1g)L.1g.1f-=c;7(L.1F)L.1F.1f-=c;3e(L,K)}7(!z.2k&&!z.1J){7(b)1t.3f+=2j()-1t.2B}z.2k=I;7(6.U.5b){8 d=6.U.2N-1t.3f,3g=3M-1H.2S(d*3M/6.U.2N);6.U.5b.1v($18,3g,d)}H I});w.W(G(\'1B\',D),E(e,b,c,d){e.19();1t=2R(1t);8 v=[b,c,d],t=[\'1i\',\'11\',\'1k\'],a=2T(v,t);8 b=a[0],c=a[1],d=a[2];7(b!=\'X\'&&b!=\'Z\')b=z.26;7(F c!=\'11\')c=0;7(F d!=\'1k\')d=K;7(d){z.1W=K;6.U.1B=I}7(!6.U.1B){e.1Q();H 12(D,\'2O 5c: 1U 2C.\')}z.2k=K;1t.2B=2j();8 f=6.U.2N+c;3h=f-1t.3f;3g=3M-1H.2S(3h*3M/f);1t.U=6k(E(){7(6.U.5d){6.U.5d.1v($18,3g,3h)}7(z.1J){w.S(G(\'1B\',D),b)}N{w.S(G(b,D),6.U)}},3h);7(6.U.5e){6.U.5e.1v($18,3g,3h)}H I});w.W(G(\'2D\',D),E(e){e.19();7(L.1W){L.1W=K;z.2k=K;z.1J=I;L.2B=2j();1X(L)}N{w.S(G(\'1B\',D))}H I});w.W(G(\'X\',D)+\' \'+G(\'Z\',D),E(e,b,f,g){e.19();7(z.1W||w.5f(\':2P\')){e.1Q();H 12(D,\'2O 5c 55 2P: 1U 2C.\')}8 v=[b,f,g],t=[\'1e\',\'11/1i\',\'E\'],a=2T(v,t);8 b=a[0],f=a[1],g=a[2];8 h=e.4m.4n(D.2U.3i.Q);7(F b!=\'1e\'||b==2b)b=6[h];7(F g==\'E\')b.1R=g;7(F f!=\'11\'){8 i=[f,b.9,6[h].9];1r(8 a=0,l=i.Q;a<l;a++){7(F i[a]==\'11\'||i[a]==\'4b\'||i[a]==\'M\'){f=i[a];14}}7(f==\'4b\'){e.1Q();H w.1A(h+\'6l\',[b,g])}7(f==\'M\'){7(!6.9.16.15)f=6.9.M}}7(L.1W){w.S(G(\'2D\',D));w.S(G(\'2V\',D),[h,[b,f,g]]);e.1Q();H 12(D,\'2O 6m 2C.\')}7(6.9.2M>=J.P){e.1Q();H 12(D,\'1U 5g 9 (\'+J.P+\', \'+6.9.2M+\' 5h): 1U 2C.\')}7(b.1f>0){7(z.1J){7(b.2V)w.S(G(\'2V\',D),[h,[b,f,g]]);e.1Q();H 12(D,\'2O 6n 2C.\')}}7(b.4o&&!b.4o.1v($18)){e.1Q();H 12(D,\'6o "4o" 6p K.\')}1t.3f=0;w.S(\'5i\'+h,[b,f]);7(6.1V){8 s=6.1V,c=[b,f];1r(8 j=0,l=s.Q;j<l;j++){8 d=h;7(!s[j][1])c[0]=s[j][0].1A(\'5j\',h);7(!s[j][2])d=(d==\'X\')?\'Z\':\'X\';c[1]=f+s[j][3];s[j][0].S(\'5i\'+d,c)}}H I});w.W(G(\'6q\',D,K),E(e,f,g){e.19();8 h=w.T();7(!6.1S){7(J.Y==0){7(6.2W){w.S(G(\'Z\',D),J.P-1)}H e.1Q()}}7(6.1j)1C(h,6);7(F g!=\'11\'){7(6.9.16.15){g=4p(h,6,J.P-1)}N{g=6.9.M}}7(!6.1S){7(J.P-g<J.Y){g=J.P-J.Y}}7(6.9.16.15){8 i=2K(h,6,J.P-g);7(6.9.M+g<=i&&g<J.P){g++;i=2K(h,6,J.P-g)}6.9.16.29=6.9.M;6.9.M=3G(i,6,6.9.16.3a)}7(6.1j)1C(h,6,I);7(g==0){e.1Q();H 12(D,\'0 9 36 1c: 1U 2C.\')}12(D,\'5k \'+g+\' 9 52.\');J.Y+=g;2l(J.Y>=J.P)J.Y-=J.P;7(!6.1S){7(J.Y==0&&f.3N)f.3N.1v($18);7(!6.2W)2E(6,J.Y)}w.T().1l(J.P-g).6r(w);7(J.P<6.9.M+g){w.T().1l(0,(6.9.M+g)-J.P).3O(I).3j(w)}8 h=w.T(),2c=5l(h,6,g),1K=5m(h,6),2d=h.1Y(g-1),1Z=2c.2F(),2e=1K.2F();7(6.1j)1C(h,6);7(6.1y)8 p=3H(1K,6);7(f.1w==\'5n\'&&6.9.M<g){8 j=h.1l(6.9.16.29,g).3k(),3P=6.9[6.d[\'O\']];6.9[6.d[\'O\']]=\'15\'}N{8 j=K}8 k=2X(h.1l(0,g),6,\'O\'),20=3Q(2m(1K,6,I),6,!6.1j);7(j)6.9[6.d[\'O\']]=3P;7(6.1j){1C(h,6,I);1C(1Z,6,6.1b[6.d[1]]);1C(2d,6,6.1b[6.d[3]])}7(6.1y){6.1b[6.d[1]]=p[1];6.1b[6.d[3]]=p[0]}8 l={},4q={},2Y={},2Z={},1m=f.1f;7(f.1w==\'3L\')1m=0;N 7(1m==\'U\')1m=6.1c.1f/6.1c.9*g;N 7(1m<=0)1m=0;N 7(1m<10)1m=k/1m;L=1T(1m,f.1x);7(6[6.d[\'O\']]==\'15\'||6[6.d[\'1n\']]==\'15\'){L.17.1h([$1E,20])}7(6.1j){8 m=6.1b[6.d[3]];2Y[6.d[\'1s\']]=2d.1p(\'1I\');4q[6.d[\'1s\']]=2e.1p(\'1I\')+6.1b[6.d[1]];2Z[6.d[\'1s\']]=1Z.1p(\'1I\');7(2e.4r(2d).Q){L.17.1h([2d,2Y])}7(2e.4r(1Z).Q){L.17.1h([1Z,2Z])}L.17.1h([2e,4q])}N{8 m=0}l[6.d[\'1o\']]=m;8 n=[2c,1K,20,1m];7(f.21)f.21.3l($18,n);1N.21=3m(1N.21,$18,n);1u(f.1w){R\'2n\':R\'22\':R\'2o\':R\'23\':L.1g=1T(L.1f,L.1x);L.1F=1T(L.1f,L.1x);L.1f=0;14}1u(f.1w){R\'22\':R\'2o\':R\'23\':8 o=w.3O().3j($1E);14}1u(f.1w){R\'23\':o.T().1l(0,g).1D();R\'22\':R\'2o\':o.T().1l(6.9.M).1D();14}1u(f.1w){R\'2n\':L.1g.17.1h([w,{\'24\':0}]);14;R\'22\':o.V({\'24\':0});L.1g.17.1h([w,{\'O\':\'+=0\'},E(){o.1D()}]);L.1F.17.1h([o,{\'24\':1}]);14;R\'2o\':L=4s(L,w,o,6,I);14;R\'23\':L=4t(L,w,o,6,I,g);14}8 q=E(){8 b=6.9.M+g-J.P;7(b>0){w.T().1l(J.P).1D();2c=w.T().1l(J.P-(g-b)).5o().6s(w.T().1l(0,b).5o())}7(j)j.3n();7(6.1j){8 c=w.T().1Y(6.9.M+g-1);c.V(6.d[\'1s\'],c.1p(\'1I\'))}L.17=[];7(L.1g)L.1g=1T(L.4u,L.1x);8 d=E(){1u(f.1w){R\'2n\':R\'22\':w.V(\'5p\',\'\');14}L.1F=1T(0,2b);z.1J=K;8 a=[2c,1K,20];7(f.1R)f.1R.3l($18,a);1N.1R=3m(1N.1R,$18,a);7(1L.Q){w.S(G(1L[0][0],D),1L[0][1]);1L.5q()}7(!z.2k)w.S(G(\'1B\',D))};1u(f.1w){R\'2n\':L.1g.17.1h([w,{\'24\':1},d]);1X(L.1g);14;R\'23\':L.1g.17.1h([w,{\'O\':\'+=0\'},d]);1X(L.1g);14;2A:d();14}};L.17.1h([w,l,q]);z.1J=I;w.V(6.d[\'1o\'],-k);1t=2R(1t);1X(L);4v(6.1P,w.1A(G(\'3o\',D)));w.S(G(\'2G\',D),[K,20]);H I});w.W(G(\'6t\',D,K),E(e,f,g){e.19();8 h=w.T();7(!6.1S){7(J.Y==6.9.M){7(6.2W){w.S(G(\'X\',D),J.P-1)}H e.1Q()}}7(6.1j)1C(h,6);7(F g!=\'11\'){g=6.9.M}8 i=(J.Y==0)?J.P:J.Y;7(!6.1S){7(6.9.16.15){8 j=2K(h,6,g),4w=4p(h,6,i-1)}N{8 j=6.9.M,4w=6.9.M}7(g+j>i){g=i-4w}}7(6.9.16.15){8 j=4x(h,6,g,i);2l(6.9.M-g>=j&&g<J.P){g++;j=4x(h,6,g,i)}6.9.16.29=6.9.M;6.9.M=3G(j,6,6.9.16.3a)}7(6.1j)1C(h,6,I);7(g==0){e.1Q();H 12(D,\'0 9 36 1c: 1U 2C.\')}12(D,\'5k \'+g+\' 9 53.\');J.Y-=g;2l(J.Y<0)J.Y+=J.P;7(!6.1S){7(J.Y==6.9.M&&f.3N)f.3N.1v($18);7(!6.2W)2E(6,J.Y)}7(J.P<6.9.M+g){w.T().1l(0,(6.9.M+g)-J.P).3O(I).3j(w)}8 h=w.T(),2c=4y(h,6),1K=4z(h,6,g),2d=h.1Y(g-1),1Z=2c.2F(),2e=1K.2F();7(6.1j)1C(h,6);7(6.1y)8 p=3H(1K,6);7(f.1w==\'5n\'&&6.9.16.29<g){8 k=h.1l(6.9.16.29,g).3k(),3P=6.9[6.d[\'O\']];6.9[6.d[\'O\']]=\'15\'}N{8 k=K}8 l=2X(h.1l(0,g),6,\'O\'),20=3Q(2m(1K,6,I),6,!6.1j);7(k)6.9[6.d[\'O\']]=3P;7(6.1j){1C(h,6,I);1C(1Z,6,6.1b[6.d[1]]);1C(2e,6,6.1b[6.d[1]])}7(6.1y){6.1b[6.d[1]]=p[1];6.1b[6.d[3]]=p[0]}8 m={},2Z={},2Y={},1m=f.1f;7(f.1w==\'3L\')1m=0;N 7(1m==\'U\')1m=6.1c.1f/6.1c.9*g;N 7(1m<=0)1m=0;N 7(1m<10)1m=l/1m;L=1T(1m,f.1x);7(6[6.d[\'O\']]==\'15\'||6[6.d[\'1n\']]==\'15\'){L.17.1h([$1E,20])}7(6.1j){2Z[6.d[\'1s\']]=1Z.1p(\'1I\');2Y[6.d[\'1s\']]=2d.1p(\'1I\')+6.1b[6.d[3]];2e.V(6.d[\'1s\'],2e.1p(\'1I\')+6.1b[6.d[1]]);7(2d.4r(1Z).Q){L.17.1h([1Z,2Z])}L.17.1h([2d,2Y])}m[6.d[\'1o\']]=-l;8 n=[2c,1K,20,1m];7(f.21)f.21.3l($18,n);1N.21=3m(1N.21,$18,n);1u(f.1w){R\'2n\':R\'22\':R\'2o\':R\'23\':L.1g=1T(L.1f,L.1x);L.1F=1T(L.1f,L.1x);L.1f=0;14}1u(f.1w){R\'22\':R\'2o\':R\'23\':8 o=w.3O().3j($1E);14}1u(f.1w){R\'23\':o.T().1l(6.9.16.29).1D();14;R\'22\':R\'2o\':o.T().1l(0,g).1D();o.T().1l(6.9.M).1D();14}1u(f.1w){R\'2n\':L.1g.17.1h([w,{\'24\':0}]);14;R\'22\':o.V({\'24\':0});L.1g.17.1h([w,{\'O\':\'+=0\'},E(){o.1D()}]);L.1F.17.1h([o,{\'24\':1}]);14;R\'2o\':L=4s(L,w,o,6,K);14;R\'23\':L=4t(L,w,o,6,K,g);14}8 q=E(){8 b=6.9.M+g-J.P,5r=(6.1j)?6.1b[6.d[3]]:0;w.V(6.d[\'1o\'],5r);7(b>0){w.T().1l(J.P).1D()}8 c=w.T().1l(0,g).3j(w).2F();7(b>0){1K=2L(h,6)}7(k)k.3n();7(6.1j){7(J.P<6.9.M+g){8 d=w.T().1Y(6.9.M-1);d.V(6.d[\'1s\'],d.1p(\'1I\')+6.1b[6.d[3]])}c.V(6.d[\'1s\'],c.1p(\'1I\'))}L.17=[];7(L.1g)L.1g=1T(L.4u,L.1x);8 e=E(){1u(f.1w){R\'2n\':R\'22\':w.V(\'5p\',\'\');14}L.1F=1T(0,2b);z.1J=K;8 a=[2c,1K,20];7(f.1R)f.1R.3l($18,a);1N.1R=3m(1N.1R,$18,a);7(1L.Q){w.S(G(1L[0][0],D),1L[0][1]);1L.5q()}7(!z.2k)w.S(G(\'1B\',D))};1u(f.1w){R\'2n\':L.1g.17.1h([w,{\'24\':1},e]);1X(L.1g);14;R\'23\':L.1g.17.1h([w,{\'O\':\'+=0\'},e]);1X(L.1g);14;2A:e();14}};L.17.1h([w,m,q]);z.1J=I;1t=2R(1t);1X(L);4v(6.1P,w.1A(G(\'3o\',D)));w.S(G(\'2G\',D),[K,20]);H I});w.W(G(\'2H\',D),E(e,b,c,d,f,g,h){e.19();8 v=[b,c,d,f,g,h],t=[\'1i/11/1e\',\'11\',\'1k\',\'1e\',\'1i\',\'E\'],a=2T(v,t);8 f=a[3],g=a[4],h=a[5];b=31(a[0],a[1],a[2],J,w);7(b==0)H;7(F f!=\'1e\')f=K;7(z.1J){7(F f!=\'1e\'||f.1f>0)H K}7(g!=\'X\'&&g!=\'Z\'){7(6.1S){7(b<=J.P/2)g=\'Z\';N g=\'X\'}N{7(J.Y==0||J.Y>b)g=\'Z\';N g=\'X\'}}7(g==\'X\')b=J.P-b;w.S(G(g,D),[f,b,h]);H I});w.W(G(\'6u\',D),E(e,a,b){e.19();8 c=w.1A(G(\'3p\',D));H w.1A(G(\'4A\',D),[c-1,a,\'X\',b])});w.W(G(\'6v\',D),E(e,a,b){e.19();8 c=w.1A(G(\'3p\',D));H w.1A(G(\'4A\',D),[c+1,a,\'Z\',b])});w.W(G(\'4A\',D),E(e,a,b,c,d){e.19();7(F a!=\'11\')a=w.1A(G(\'3p\',D));8 f=6.13.9||6.9.M,28=1H.3b(J.P/f);7(a<0)a=28;7(a>28)a=0;H w.1A(G(\'2H\',D),[a*f,0,I,b,c,d])});w.W(G(\'5s\',D),E(e,s){e.19();7(s)s=31(s,0,I,J,w);N s=0;s+=J.Y;7(s!=0){2l(s>J.P)s-=J.P;w.6w(w.T().1l(s))}H I});w.W(G(\'1V\',D),E(e,s){e.19();7(s)s=4e(s);N 7(6.1V)s=6.1V;N H 12(D,\'4S 6x 36 1V.\');8 n=w.1A(G(\'3o\',D)),x=I;1r(8 j=0,l=s.Q;j<l;j++){7(!s[j][0].1A(G(\'2H\',D),[n,s[j][3],I])){x=K}}H x});w.W(G(\'2V\',D),E(e,a,b){e.19();7(F a==\'E\'){a.1v($18,1L)}N 7(32(a)){1L=a}N 7(F a!=\'1z\'){1L.1h([a,b])}H 1L});w.W(G(\'6y\',D),E(e,b,c,d,f){e.19();8 v=[b,c,d,f],t=[\'1i/1e\',\'1i/11/1e\',\'1k\',\'11\'],a=2T(v,t);8 b=a[0],c=a[1],d=a[2],f=a[3];7(F b==\'1e\'&&F b.3q==\'1z\')b=$(b);7(F b==\'1i\')b=$(b);7(F b!=\'1e\'||F b.3q==\'1z\'||b.Q==0)H 12(D,\'1U a 47 1e.\');7(F c==\'1z\')c=\'3R\';7(6.1j){b.1O(E(){8 m=2a($(1a).V(6.d[\'1s\']));7(2i(m))m=0;$(1a).1p(\'1I\',m)})}8 g=c,3r=\'3r\';7(c==\'3R\'){7(d){7(J.Y==0){c=J.P-1;3r=\'5t\'}N{c=J.Y;J.Y+=b.Q}7(c<0)c=0}N{c=J.P-1;3r=\'5t\'}}N{c=31(c,f,d,J,w)}7(g!=\'3R\'&&!d){7(c<J.Y)J.Y+=b.Q}7(J.Y>=J.P)J.Y-=J.P;8 h=w.T().1Y(c);7(h.Q){h[3r](b)}N{w.5u(b)}J.P=w.T().Q;8 i=3s(w,6);3t(6,J.P,D);2E(6,J.Y);w.S(G(\'4B\',D));w.S(G(\'2G\',D),[I,i]);H I});w.W(G(\'6z\',D),E(e,b,c,d){e.19();8 v=[b,c,d],t=[\'1i/11/1e\',\'1k\',\'11\'],a=2T(v,t);8 b=a[0],c=a[1],d=a[2];7(F b==\'1z\'||b==\'3R\'){w.T().2F().1D()}N{b=31(b,d,c,J,w);8 f=w.T().1Y(b);7(f.Q){7(b<J.Y)J.Y-=f.Q;f.1D()}}J.P=w.T().Q;8 g=3s(w,6);3t(6,J.P,D);2E(6,J.Y);w.S(G(\'2G\',D),[I,g]);H I});w.W(G(\'21\',D)+\' \'+G(\'1R\',D),E(e,a){e.19();8 b=e.4m.4n(D.2U.3i.Q);7(32(a))1N[b]=a;7(F a==\'E\')1N[b].1h(a);H 1N[b]});w.W(G(\'5v\',D,K),E(e,a){e.19();H w.1A(G(\'3o\',D),a)});w.W(G(\'3o\',D),E(e,a){e.19();7(J.Y==0)8 b=0;N 8 b=J.P-J.Y;7(F a==\'E\')a.1v($18,b);H b});w.W(G(\'3p\',D),E(e,a){e.19();8 b=6.13.9||6.9.M;8 c=1H.2S(J.P/b-1);7(J.Y==0)8 d=0;N 7(J.Y<J.P%b)8 d=0;N 7(J.Y==b&&!6.1S)8 d=c;N 8 d=1H.6A((J.P-J.Y)/b);7(d<0)d=0;7(d>c)d=c;7(F a==\'E\')a.1v($18,d);H d});w.W(G(\'6B\',D),E(e,a){e.19();$i=2L(w.T(),6);7(F a==\'E\')a.1v($18,$i);H $i});w.W(G(\'2k\',D)+\' \'+G(\'1W\',D)+\' \'+G(\'1J\',D),E(e,a){e.19();8 b=e.4m.4n(D.2U.3i.Q);7(F a==\'E\')a.1v($18,z[b]);H z[b]});w.W(G(\'5j\',D,K),E(e,a,b,c){e.19();H w.1A(G(\'42\',D),[a,b,c])});w.W(G(\'42\',D),E(e,a,b,c){e.19();8 d=K;7(F a==\'E\'){a.1v($18,6)}N 7(F a==\'1e\'){2v=$.25(I,{},2v,a);7(b!==K)d=I;N 6=$.25(I,{},6,a)}N 7(F a!=\'1z\'){7(F b==\'E\'){8 f=3S(\'6.\'+a);7(F f==\'1z\')f=\'\';b.1v($18,f)}N 7(F b!=\'1z\'){7(F c!==\'1k\')c=I;3S(\'2v.\'+a+\' = b\');7(c!==K)d=I;N 3S(\'6.\'+a+\' = b\')}N{H 3S(\'6.\'+a)}}7(d){1C(w.T(),6);w.41(2v);w.4C();8 g=3s(w,6);w.S(G(\'2G\',D),[I,g])}H 6});w.W(G(\'4B\',D),E(e,a,b){e.19();7(F a==\'1z\'||a.Q==0)a=$(\'6C\');N 7(F a==\'1i\')a=$(a);7(F a!=\'1e\')H 12(D,\'1U a 47 1e.\');7(F b!=\'1i\'||b.Q==0)b=\'a.5w\';a.6D(b).1O(E(){8 h=1a.5x||\'\';7(h.Q>0&&w.T().5y($(h))!=-1){$(1a).2p(\'4D\').4D(E(e){e.2f();w.S(G(\'2H\',D),h)})}});H I});w.W(G(\'2G\',D),E(e,b,c){e.19();7(!6.13.1q)H;7(F b==\'1k\'&&b){6.13.1q.T().1D();8 d=6.13.9||6.9.M;1r(8 a=0,l=1H.2S(J.P/d);a<l;a++){8 i=w.T().1Y(31(a*d,0,I,J,w));6.13.1q.5u(6.13.4c(a+1,i))}6.13.1q.1O(E(){$(1a).T().2p(6.13.3u).1O(E(a){$(1a).W(6.13.3u,E(e){e.2f();w.S(G(\'2H\',D),[a*d,0,I,6.13])})})})}6.13.1q.1O(E(){$(1a).T().33(\'5z\').1Y(w.1A(G(\'3p\',D))).3v(\'5z\')});H I});w.W(G(\'5A\',D,K),E(e,a){e.19();w.S(G(\'5B\',D),a);H I});w.W(G(\'5B\',D),E(e,a){e.19();1t=2R(1t);w.1p(\'4g\',K);w.S(G(\'5a\',D));7(a){w.S(G(\'5s\',D))}7(6.1j){1C(w.T(),6)}w.V(w.1p(\'57\'));w.4k();w.4E();$1E.6E(w);H I})};w.4k=E(){w.2p(G(\'\',D,K))};w.4C=E(){w.4E();3t(6,J.P,D);2E(6,J.Y);7(6.U.2g){8 c=3w(6.U.2g);$1E.W(G(\'3T\',D,K),E(){w.S(G(\'2Q\',D),[c[0],c[1]])}).W(G(\'3U\',D,K),E(){w.S(G(\'2D\',D))})}7(6.X.1d){6.X.1d.W(G(6.X.3u,D,K),E(e){e.2f();w.S(G(\'X\',D))});7(6.X.2g){8 c=3w(6.X.2g);6.X.1d.W(G(\'3T\',D,K),E(){w.S(G(\'2Q\',D),[c[0],c[1]])}).W(G(\'3U\',D,K),E(){w.S(G(\'2D\',D))})}}7(6.Z.1d){6.Z.1d.W(G(6.Z.3u,D,K),E(e){e.2f();w.S(G(\'Z\',D))});7(6.Z.2g){8 c=3w(6.Z.2g);6.Z.1d.W(G(\'3T\',D,K),E(){w.S(G(\'2Q\',D),[c[0],c[1]])}).W(G(\'3U\',D,K),E(){w.S(G(\'2D\',D))})}}7($.1M.2q){7(6.X.2q){7(!z.4F){z.4F=I;$1E.2q(E(e,a){7(a>0){e.2f();8 b=4G(6.X.2q);w.S(G(\'X\',D),b)}})}}7(6.Z.2q){7(!z.4H){z.4H=I;$1E.2q(E(e,a){7(a<0){e.2f();8 b=4G(6.Z.2q);w.S(G(\'Z\',D),b)}})}}}7($.1M.3x){8 d=(6.X.4I)?E(){w.S(G(\'X\',D))}:2b,3y=(6.Z.4I)?E(){w.S(G(\'Z\',D))}:2b;7(3y||3y){7(!z.3x){z.3x=I;8 f={\'6F\':30,\'6G\':30,\'6H\':I};1u(6.26){R\'44\':R\'5C\':f.6I=3y;f.6J=d;14;2A:f.6K=3y;f.6L=d}$1E.3x(f)}}}7(6.13.1q){7(6.13.2g){8 c=3w(6.13.2g);6.13.1q.W(G(\'3T\',D,K),E(){w.S(G(\'2Q\',D),[c[0],c[1]])}).W(G(\'3U\',D,K),E(){w.S(G(\'2D\',D))})}}7(6.X.2r||6.Z.2r){$(34).W(G(\'5D\',D,K),E(e){8 k=e.5E;7(k==6.Z.2r){e.2f();w.S(G(\'Z\',D))}7(k==6.X.2r){e.2f();w.S(G(\'X\',D))}})}7(6.13.3I){$(34).W(G(\'5D\',D,K),E(e){8 k=e.5E;7(k>=49&&k<58){k=(k-49)*6.9.M;7(k<=J.P){e.2f();w.S(G(\'2H\',D),[k,0,I,6.13])}}})}7(6.U.1B){w.S(G(\'1B\',D),6.U.4d)}};w.4E=E(){$(34).2p(G(\'\',D,K));$1E.2p(G(\'\',D,K));7(6.X.1d)6.X.1d.2p(G(\'\',D,K));7(6.Z.1d)6.Z.1d.2p(G(\'\',D,K));7(6.13.1q)6.13.1q.2p(G(\'\',D,K));3t(6,\'3k\',D);2E(6,\'33\');7(6.13.1q){6.13.1q.T().1D()}};7(w.1p(\'4g\')){8 y=w.1A(\'5v\');w.S(\'5A\',I)}N{8 y=K}8 z={\'26\':\'Z\',\'2k\':I,\'1J\':K,\'1W\':K,\'4H\':K,\'4F\':K,\'3x\':K},J={\'P\':w.T().Q,\'Y\':0},1t={\'6M\':2b,\'U\':2b,\'2V\':2b,\'2B\':2j(),\'3f\':0},L={\'1W\':K,\'1f\':0,\'2B\':0,\'1x\':\'\',\'17\':[]},1N={\'21\':[],\'1R\':[]},1L=[],D=$.25(I,{},$.1M.1G.5F,u),6={},2v=r,$1E=w.6N(\'<\'+D.4J.3Z+\' 6O="\'+D.4J.5G+\'" />\').3E();D.3z=w.3z;w.41(2v,I,y);w.54();w.59();w.4C();7(6.1P){6.9.2w=5H(6.1P);8 A=6.1P+\'=\';8 B=34.1P.2I(\';\');1r(8 a=0,l=B.Q;a<l;a++){8 c=B[a];2l(c.5I(0)==\' \'){c=c.3V(1,c.Q)}7(c.2s(A)==0){6.9.2w=c.3V(A.Q,c.Q);14}}}7(6.9.2w!=0){8 s=6.9.2w;7(s===I){s=3W.6P.5x;7(!s.Q)s=0}N 7(s===\'5J\'){s=1H.3b(1H.5J()*J.P)}w.S(G(\'2H\',D),[s,0,I,{1w:\'3L\'}])}8 C=3s(w,6,K),5K=2L(w.T(),6);7(6.5L){6.5L.1v($18,5K,C)}w.S(G(\'2G\',D),[I,C]);w.S(G(\'4B\',D));H w};$.1M.1G.43={\'1V\':K,\'2W\':I,\'1S\':I,\'26\':\'1o\',\'9\':{\'2w\':0},\'1c\':{\'1x\':\'6Q\',\'1f\':4Y,\'2g\':K,\'2q\':K,\'4I\':K,\'3u\':\'4D\',\'2V\':K}};$.1M.1G.5F={\'12\':K,\'2U\':{\'3i\':\'\',\'5M\':\'6R\'},\'4J\':{\'3Z\':\'6S\',\'5G\':\'6T\'}};$.1M.1G.4Z=E(a,b){H\'<a 6U="#"><5N>\'+a+\'</5N></a>\'};E 1T(d,e){H{17:[],1f:d,4u:d,1x:e,2B:2j()}}E 1X(s){7(F s.1g==\'1e\'){1X(s.1g)}1r(8 a=0,l=s.17.Q;a<l;a++){8 b=s.17[a];7(!b)6V;7(b[3])b[0].4l();b[0].5O(b[1],{5P:b[2],1f:s.1f,1x:s.1x})}7(F s.1F==\'1e\'){1X(s.1F)}}E 3e(s,c){7(F c!=\'1k\')c=I;7(F s.1g==\'1e\'){3e(s.1g,c)}1r(8 a=0,l=s.17.Q;a<l;a++){8 b=s.17[a];b[0].4l(I);7(c){b[0].V(b[1]);7(F b[2]==\'E\')b[2]()}}7(F s.1F==\'1e\'){3e(s.1F,c)}}E 2R(t){7(t.U)6W(t.U);H t}E 3m(b,t,c){7(b.Q){1r(8 a=0,l=b.Q;a<l;a++){b[a].3l(t,c)}}H[]}E 6X(a,c,x,d,f){8 o={\'1f\':d,\'1x\':a.1x};7(F f==\'E\')o.5P=f;c.5O({24:x},o)}E 4s(a,b,c,o,d){8 e=2m(4y(b.T(),o),o,I)[0],4K=2m(c.T(),o,I)[0],3X=(d)?-4K:e,2t={},35={};2t[o.d[\'O\']]=4K;2t[o.d[\'1o\']]=3X;35[o.d[\'1o\']]=0;a.1g.17.1h([b,{\'24\':1}]);a.1F.17.1h([c,35,E(){$(1a).1D()}]);c.V(2t);H a}E 4t(a,b,c,o,d,n){8 e=2m(4z(b.T(),o,n),o,I)[0],4L=2m(c.T(),o,I)[0],3X=(d)?-4L:e,2t={},35={};2t[o.d[\'O\']]=4L;2t[o.d[\'1o\']]=0;35[o.d[\'1o\']]=3X;a.1F.17.1h([c,35,E(){$(1a).1D()}]);c.V(2t);H a}E 3t(o,t,c){7(t==\'3n\'||t==\'3k\'){8 f=t}N 7(o.9.2M>=t){12(c,\'1U 5g 9: 6Y 6Z (\'+t+\' 9, \'+o.9.2M+\' 5h).\');8 f=\'3k\'}N{8 f=\'3n\'}8 s=(f==\'3n\')?\'33\':\'3v\';7(o.X.1d)o.X.1d[f]()[s](\'2P\');7(o.Z.1d)o.Z.1d[f]()[s](\'2P\');7(o.13.1q)o.13.1q[f]()[s](\'2P\')}E 2E(o,f){7(o.1S||o.2W)H;8 a=(f==\'33\'||f==\'3v\')?f:K;7(o.Z.1d){8 b=a||(f==o.9.M)?\'3v\':\'33\';o.Z.1d[b](\'5Q\')}7(o.X.1d){8 b=a||(f==0)?\'3v\':\'33\';o.X.1d[b](\'5Q\')}}E 3A(a,b){7(F b==\'E\')b=b.1v(a);7(F b==\'1z\')b={};H b}E 3d(a,b,c){7(F c!=\'1i\')c=\'\';b=3A(a,b);7(F b==\'1i\'){8 d=4M(b);7(d==-1)b=$(b);N b=d}7(c==\'13\'){7(F b==\'1k\')b={\'3I\':b};7(F b.3q!=\'1z\')b={\'1q\':b};7(F b.1q==\'E\')b.1q=b.1q.1v(a);7(F b.1q==\'1i\')b.1q=$(b.1q);7(F b.9!=\'11\')b.9=K}N 7(c==\'U\'){7(F b==\'1k\')b={\'1B\':b};7(F b==\'11\')b={\'2N\':b}}N{7(F b.3q!=\'1z\')b={\'1d\':b};7(F b==\'11\')b={\'2r\':b};7(F b.1d==\'E\')b.1d=b.1d.1v(a);7(F b.1d==\'1i\')b.1d=$(b.1d);7(F b.2r==\'1i\')b.2r=4M(b.2r)}H b}E 31(a,b,c,d,e){7(F a==\'1i\'){7(2i(a))a=$(a);N a=2a(a)}7(F a==\'1e\'){7(F a.3q==\'1z\')a=$(a);a=e.T().5y(a);7(a==-1)a=0;7(F c!=\'1k\')c=K}N{7(F c!=\'1k\')c=I}7(2i(a))a=0;N a=2a(a);7(2i(b))b=0;N b=2a(b);7(c){a+=d.Y}a+=b;7(d.P>0){2l(a>=d.P){a-=d.P}2l(a<0){a+=d.P}}H a}E 4p(i,o,s){8 t=0,x=0;1r(8 a=s;a>=0;a--){t+=i.1Y(a)[o.d[\'27\']](I);7(t>o.3F)H x;7(a==0)a=i.Q;x++}}E 2K(i,o,s){8 t=0,x=0;1r(8 a=s,l=i.Q-1;a<=l;a++){t+=i.1Y(a)[o.d[\'27\']](I);7(t>o.3F)H x;7(a==l)a=-1;x++}}E 4x(i,o,s,l){8 v=2K(i,o,s);7(!o.1S){7(s+v>l)v=l-s}H v}E 2L(i,o){H i.1l(0,o.9.M)}E 5l(i,o,n){H i.1l(n,o.9.16.29+n)}E 5m(i,o){H i.1l(0,o.9.M)}E 4y(i,o){H i.1l(0,o.9.16.29)}E 4z(i,o,n){H i.1l(n,o.9.M+n)}E 1C(i,o,m){8 x=(F m==\'1k\')?m:K;7(F m!=\'11\')m=0;i.1O(E(){8 t=2a($(1a).V(o.d[\'1s\']));7(2i(t))t=0;$(1a).1p(\'5R\',t);$(1a).V(o.d[\'1s\'],((x)?$(1a).1p(\'5R\'):m+$(1a).1p(\'1I\')))})}E 3s(a,o,p){8 b=a.3E(),$i=a.T(),$v=2L($i,o),3Y=3Q(2m($v,o,I),o,p);b.V(3Y);7(o.1j){8 c=$v.2F();c.V(o.d[\'1s\'],c.1p(\'1I\')+o.1b[o.d[1]]);a.V(o.d[\'2y\'],o.1b[o.d[0]]);a.V(o.d[\'1o\'],o.1b[o.d[3]])}a.V(o.d[\'O\'],3Y[o.d[\'O\']]+(2X($i,o,\'O\')*2));a.V(o.d[\'1n\'],4N($i,o,\'1n\'));H 3Y}E 2m(i,o,a){5S=2X(i,o,\'O\',a);5T=4N(i,o,\'1n\',a);H[5S,5T]}E 4N(i,o,a,b){7(F b!=\'1k\')b=K;7(F o[o.d[a]]==\'11\'&&b)H o[o.d[a]];7(F o.9[o.d[a]]==\'11\')H o.9[o.d[a]];8 c=(a.4O().2s(\'O\')>-1)?\'27\':\'2x\';H 3D(i,o,c)}E 3D(i,o,a){8 s=0;i.1O(E(){8 m=$(1a)[o.d[a]](I);7(s<m)s=m});H s}E 46(b,o,c){8 d=b[o.d[c]](),4P=(o.d[c].4O().2s(\'O\')>-1)?[\'70\',\'71\']:[\'72\',\'73\'];1r(a=0,l=4P.Q;a<l;a++){8 m=2a(b.V(4P[a]));7(2i(m))m=0;d-=m}H d}E 2X(i,o,a,b){7(F b!=\'1k\')b=K;7(F o[o.d[a]]==\'11\'&&b)H o[o.d[a]];7(F o.9[o.d[a]]==\'11\')H o.9[o.d[a]]*i.Q;8 d=(a.4O().2s(\'O\')>-1)?\'27\':\'2x\',s=0;i.1O(E(){8 j=$(1a);7(j.5f(\':M\')){s+=j[o.d[d]](I)}});H s}E 45(i,o,a){8 s=K,v=K;i.1O(E(){c=$(1a)[o.d[a]](I);7(s===K)s=c;N 7(s!=c)v=I;7(s==0)v=I});H v}E G(n,c,a,b){7(F a!=\'1k\')a=I;7(F b!=\'1k\')b=I;7(a)n=c.2U.3i+n;7(b)n=n+\'.\'+c.2U.5M;H n}E 3Q(a,o,p){7(F p!=\'1k\')p=I;8 b=(o.1j&&p)?o.1b:[0,0,0,0];8 c={};c[o.d[\'O\']]=a[0]+b[1]+b[3];c[o.d[\'1n\']]=a[1]+b[0]+b[2];H c}E 2T(c,d){8 e=[];1r(8 a=0,5U=c.Q;a<5U;a++){1r(8 b=0,5V=d.Q;b<5V;b++){7(d[b].2s(F c[a])>-1&&!e[b]){e[b]=c[a];14}}}H e}E 4X(p){7(F p==\'1z\')H[0,0,0,0];7(F p==\'11\')H[p,p,p,p];N 7(F p==\'1i\')p=p.2I(\'74\').5W(\'\').2I(\'75\').5W(\'\').2I(\' \');7(!32(p)){H[0,0,0,0]}1r(8 i=0;i<4;i++){p[i]=2a(p[i])}1u(p.Q){R 0:H[0,0,0,0];R 1:H[p[0],p[0],p[0],p[0]];R 2:H[p[0],p[1],p[0],p[1]];R 3:H[p[0],p[1],p[2],p[1]];2A:H[p[0],p[1],p[2],p[3]]}}E 3H(a,o){8 x=(F o[o.d[\'O\']]==\'11\')?1H.2S(o[o.d[\'O\']]-2X(a,o,\'O\')):0;1u(o.1y){R\'1o\':H[0,x];R\'2z\':H[x,0];R\'48\':2A:H[1H.2S(x/2),1H.3b(x/2)]}}E 3G(x,o,a){8 v=x;7(F a==\'1i\'){8 p=a.2I(\'+\'),m=a.2I(\'-\');7(m.Q>p.Q){8 b=I,4Q=m[0],2u=m[1]}N{8 b=K,4Q=p[0],2u=p[1]}1u(4Q){R\'76\':v=(x%2==1)?x-1:x;14;R\'77\':v=(x%2==0)?x-1:x;14;2A:v=x;14}2u=2a(2u);7(!2i(2u)){7(b)2u=-2u;v+=2u}}8 i=o.9.16;7(i.2J||i.28){7(F i.2J==\'11\'&&v<i.2J)v=i.2J;7(F i.28==\'11\'&&v>i.28)v=i.28}7(v<1)v=1;H v}E 4e(s){7(!32(s))s=[[s]];7(!32(s[0]))s=[s];1r(8 j=0,l=s.Q;j<l;j++){7(F s[j][0]==\'1i\')s[j][0]=$(s[j][0]);7(F s[j][1]!=\'1k\')s[j][1]=I;7(F s[j][2]!=\'1k\')s[j][2]=I;7(F s[j][3]!=\'11\')s[j][3]=0}H s}E 4M(k){7(k==\'2z\')H 39;7(k==\'1o\')H 37;7(k==\'44\')H 38;7(k==\'5C\')H 40;H-1}E 4v(n,v){7(n)34.1P=n+\'=\'+v+\'; 78=/\'}E 5H(n){n+=\'=\';8 b=34.1P.2I(\';\');1r(8 a=0,l=b.Q;a<l;a++){8 c=b[a];2l(c.5I(0)==\' \'){c=c.3V(1,c.Q)}7(c.2s(n)==0){H c.3V(n.Q,c.Q)}}H 0}E 3w(p){7(p&&F p==\'1i\'){8 i=(p.2s(\'79\')>-1)?I:K,r=(p.2s(\'2D\')>-1)?I:K}N{8 i=r=K}H[i,r]}E 4G(a){H(F a==\'11\')?a:2b}E 32(a){H F(a)==\'1e\'&&(a 7a 7b)}E 2j(){H 7c 7d().2j()}E 12(d,m){7(F d==\'1e\'){8 s=\' (\'+d.3z+\')\';d=d.12}N{8 s=\'\'}7(!d)H K;7(F m==\'1i\')m=\'1G\'+s+\': \'+m;N m=[\'1G\'+s+\':\',m];7(3W.4R&&3W.4R.5X)3W.4R.5X(m);H K}$.1M.5w=E(o){H 1a.1G(o)}})(7e);',62,449,'||||||opts|if|var|items||||||||||||||||||||||||||||||conf|function|typeof|cf_e|return|true|itms|false|scrl|visible|else|width|total|length|case|trigger|children|auto|css|bind|prev|first|next||number|debug|pagination|break|variable|visibleConf|anims|tt0|stopPropagation|this|padding|scroll|button|object|duration|pre|push|string|usePadding|boolean|slice|a_dur|height|left|data|container|for|marginRight|tmrs|switch|call|fx|easing|align|undefined|triggerHandler|play|sz_resetMargin|remove|wrp|post|carouFredSel|Math|cfs_origCssMargin|isScrolling|c_new|queu|fn|clbk|each|cookie|stopImmediatePropagation|onAfter|circular|sc_setScroll|Not|synchronise|isStopped|sc_startScroll|eq|l_old|w_siz|onBefore|crossfade|uncover|opacity|extend|direction|outerWidth|max|old|parseInt|null|c_old|l_cur|l_new|preventDefault|pauseOnHover|position|isNaN|getTime|isPaused|while|ms_getSizes|fade|cover|unbind|mousewheel|key|indexOf|css_o|adj|opts_orig|start|outerHeight|top|right|default|startTime|scrolling|resume|nv_enableNavi|last|updatePageStatus|slideTo|split|min|gn_getVisibleItemsNext|gi_getCurrentItems|minimum|pauseDuration|Carousel|hidden|pause|sc_clearTimers|ceil|cf_sortParams|events|queue|infinite|ms_getTotalSize|a_cur|a_old||gn_getItemIndex|is_array|removeClass|document|ani_o|to||||adjust|floor|of|go_getNaviObject|sc_stopScroll|timePassed|perc|dur2|prefix|appendTo|hide|apply|sc_callCallbacks|show|currentPosition|currentPage|jquery|before|sz_setSizes|nv_showNavi|event|addClass|bt_pauseOnHoverConfig|touchwipe|wN|selector|go_getObject|innerWidth|marginBottom|ms_getTrueLargestSize|parent|maxDimention|cf_getItemsAdjust|cf_getAlignPadding|keys|Number|absolute|none|100|onEnd|clone|orgW|cf_mapWrapperSizes|end|eval|mouseenter|mouseleave|substring|window|cur_l|sz|element||_cfs_init|configuration|defaults|up|ms_hasVariableSizes|ms_getTrueInnerSize|valid|center||bottom|page|anchorBuilder|delay|cf_getSynchArr|scrolled|cfs_isCarousel|float|marginTop|marginLeft|_cfs_unbind_events|stop|type|substr|conditions|gn_getVisibleItemsPrev|a_new|not|fx_cover|fx_uncover|orgDuration|cf_setCookie|xI|gn_getVisibleItemsNextTestCircular|gi_getOldItemsNext|gi_getNewItemsNext|slideToPage|linkAnchors|_cfs_bind_buttons|click|_cfs_unbind_buttons|mousewheelPrev|bt_mousesheelNumber|mousewheelNext|wipe|wrapper|new_w|old_w|cf_getKeyCode|ms_getLargestSize|toLowerCase|arr|sta|console|No|should|be|innerHeight|dx|cf_getPadding|500|pageAnchorBuilder||Item|backward|forward|_cfs_build|or|relative|cfs_origCss||_cfs_bind_events|finish|onPausePause|stopped|onPauseEnd|onPauseStart|is|enough|needed|_cfs_slide_|_cfs_configuration|Scrolling|gi_getOldItemsPrev|gi_getNewItemsPrev|directscroll|get|filter|shift|new_m|jumpToStart|after|append|_cfs_currentPosition|caroufredsel|hash|index|selected|_cfs_destroy|destroy|down|keyup|keyCode|configs|classname|cf_readCookie|charAt|random|itm|onCreate|namespace|span|animate|complete|disabled|cfs_tempCssMargin|s1|s2|l1|l2|join|log|found|The|option|moved|the|second|Infinity|Set|caroufredsel_cookie_|attr|id|2500|Available|widths|heights|automatically|fixed|Carousels|CSS|attribute|static|overflow|setTimeout|Page|resumed|currently|Callback|returned|_cfs_slide_prev|prependTo|concat|_cfs_slide_next|prevPage|nextPage|prepend|carousel|insertItem|removeItem|round|currentVisible|body|find|replaceWith|min_move_x|min_move_y|preventDefaultEvents|wipeUp|wipeDown|wipeLeft|wipeRight|timer|wrap|class|location|swing|cfs|div|caroufredsel_wrapper|href|continue|clearTimeout|fx_fade|hiding|navigation|paddingLeft|paddingRight|paddingTop|paddingBottom|px|em|even|odd|path|immediate|instanceof|Array|new|Date|jQuery'.split('|'),0,{}))
