
/* -- FILE: [lib/content/javascripts/old/standard.js]*/
// This is Nux s.r.o. standard library
NLoad=function(emailClass,loginId){this.emailClass=emailClass;this.loginId=loginId;this.loadEmails();this.focusLogin();return};NLoad.load=function(emailClass,loginId){var loader=function(){new NLoad(emailClass,loginId);};return $(window).ready(loader);};NLoad.prototype.loadEmails=function(){$("span."+this.emailClass).each(function(){var text=$(this).text();if($(this).attr("title"))var address=$(this).attr("title");else var address=text;address=address.replace('&#64;','@');address=address.replace('&#46;','.');$(this).html('<a href="mailto:'+address+'">'+text+'</a>')});return};NLoad.prototype.focusLogin=function(){var login=document.getElementById(this.loginId);if(login)login.focus();return};function openWindow(location){window.open(location);return false};
NController=function(instanceName){this.instanceName=instanceName};NController.prototype.email=function(coded,linkname,makeLink,sameAddress){var cipher='ZabcXYdeWVfUTghSiRQjklPmONnMoLpqKJrIHstGuFvEwDxCyBz1A234568790';var shift=coded.length;var link='';var ltr=null;for(var i=0;i<coded.length;i++){if(cipher.indexOf(coded.charAt(i))==-1){ltr=coded.charAt(i);link+=(ltr)}else{ltr=(cipher.indexOf(coded.charAt(i))-shift+cipher.length)%cipher.length;link+=(cipher.charAt(ltr))}}if(sameAddress)linkname=link;if(makeLink!==false)document.write('<a class="email" href="mailto:'+link+'">'+linkname+'</a>');else document.write(linkname);return};NController.prototype.flashEmbed=function(flashPath,width,height,bgColor,quality,menu,border,transparent,flashVars,loop){var embedVar="";loop=loop==null?"true":loop;transparent=transparent==null?"transparent":transparent;border=border==null?"false":border;quality=quality==null?"high":quality;embedVar='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+flashPath+'" /><param name="flashvars" value="'+flashVars+'" /><param name="quality" value="'+quality+'" /><param name="menu" value="'+menu+'" /><param name="loop" value="'+loop+'" /><param name="bgcolor" value="'+bgColor+'" /><param name="wmode" value="'+transparent+'" /><embed src="'+flashPath+'" flashvars="'+flashVars+'" quality="'+quality+'" menu="'+menu+'" loop="'+loop+'" bgcolor="'+bgColor+'" width="'+width+'" height="'+height+'" wmode="'+transparent+'" name="'+flashPath+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';document.write(embedVar)};NController.prototype.getOffset=function(what,id){var el=document.getElementById(id);var offset=0;do{switch(what){case"left":offset+=el.offsetLeft;break;case"top":offset+=el.offsetTop;break}el=el.offsetParent}while(el);return offset};NController.prototype.getLeft=function(id){return this.getOffset('left',id)};NController.prototype.getTop=function(id){return this.getOffset('top',id)};NController.prototype.getScrollLeft=function(){return document.documentElement.scrollLeft||window.pageXOffset||0};NController.prototype.getScrollTop=function(){if(document.documentElement.scrollTop)return document.documentElement.scrollTop;else if(window.pageYOffset)return window.pageYOffset;else return 0};NController.prototype.windowWidth=function(){return window.innerWidth||document.documentElement.clientWidth||0};NController.prototype.windowHeight=function(){return window.innerHeight||document.documentElement.clientHeight||0};NController.prototype.windowScrollWidth=function(){return document.documentElement.scrollWidth};NController.prototype.windowScrollHeight=function(){return document.documentElement.scrollHeight};var controller=new NController("controller");var loader = new NLoad();NLoad.load("noJsEmail", "username");

// Textarea resizers
(function ($) {
    var textarea, staticOffset;
    var iLastMousePos = 0;
    var iMin = 32;
    var grip;
    $.fn.TextAreaResizer = function () {
        return this.each(function () {
            textarea = $(this).addClass('processed'), staticOffset = null;
            minHeight = window.parseInt($(textarea).css('min-height'));
            maxHeight = window.parseInt($(textarea).css('max-height'));

            if (minHeight != maxHeight && $(textarea).css('resize') != 'none')
            {
                $(textarea).css('resize', 'vertical');
                $(this).wrap('<div class="resizable-textarea"><span></span></div>');/*.parent().append($('<div class="grippie"></div>').bind("mousedown", {
                    el: this
                }, startDrag));*/
                grip = $('div.grippie', $(this).parent())[0];
                $(grip).css('width', $(textarea).width()+4);
            }
        })
    };

    function startDrag(e) {
        textarea = $(e.data.el);
        textarea.blur();
        iLastMousePos = mousePosition(e).y;
        staticOffset = textarea.height() - iLastMousePos;
        textarea.css('opacity', 0.25);
        $(document).mousemove(performDrag).mouseup(endDrag);
        return false
    }
    function performDrag(e) {
        var iThisMousePos = mousePosition(e).y;
        var iMousePos = staticOffset + iThisMousePos;
        if (iLastMousePos >= (iThisMousePos)) {
            iMousePos -= 5
        }
        iLastMousePos = iThisMousePos;
        iMousePos = Math.max(iMin, iMousePos);
        textarea.height(iMousePos + 'px');
        if (iMousePos < iMin) {
            endDrag(e)
        }
        return false
    }
    function endDrag(e) {
        $(document).unbind('mousemove', performDrag).unbind('mouseup', endDrag);
        textarea.css('opacity', 1);
        console.log('drop')
        textarea.focus();
        textarea = null;
        staticOffset = null;
        iLastMousePos = 0;
    }
    function mousePosition(e) {
        return {
            x: e.clientX + document.documentElement.scrollLeft,
            y: e.clientY + document.documentElement.scrollTop
        }
    }
})(jQuery);

$(document).ready(function() {
    $("textarea").TextAreaResizer();
});


/* -- FILE: [javascripts/bgcover.js]*/
/*!
 * jquery.backgroundcover.js
 * https://github.com/duncanmcdougall/jQuery-Background-Cover
 * Copyright 2013 Duncan McDougall and other contributors; Licensed MIT
 */(function(e){"use strict";e.fn.backgroundCover=function(){var t=this,n=function(){e(t).each(function(t,n){var r=e(n).parent();e(n).css({position:"absolute","max-width":"none",display:"block"});e(n).parents().length<3&&e(n).css("zIndex","-1");r.css({position:"relative",overflow:"hidden"});var i=r.outerWidth(),s=r.outerHeight(),o=e(n).attr("width"),u=e(n).attr("height");if(o<i){var a=i/o;o=i;u*=a}if(u<s){var a=s/u;u=s;o*=a}if(o>i&&u>s){var f=i/o,l=s/u;if(f>l){o=i;u*=f}else{u=s;o*=l}}e(n).width(o).height(u);if(u>s){var c=(u-s)/2;e(n).css("top",-c)}else e(n).css("top","");if(o>i){var c=(o-i)/2;e(n).css("left",-c)}else e(n).css("left","")})};n();e(window).resize(function(){n()})}})(jQuery);

/* -- FILE: [javascripts/enquire.min.js]*/
// enquire.js v2.0.2 - Awesome Media Queries in JavaScript
// Copyright (c) 2013 Nick Williams - http://wicky.nillia.ms/enquire.js
// License: MIT (http://www.opensource.org/licenses/mit-license.php)

(function(t){"use strict";function i(t,i){var s,n=0,e=t.length;for(n;e>n&&(s=i(t[n],n),s!==!1);n++);}function s(t){return"[object Array]"===Object.prototype.toString.apply(t)}function n(t){return"function"==typeof t}function e(t){this.options=t,!t.deferSetup&&this.setup()}function o(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=h(t);var s=this;this.listener=function(t){s.mql=t,s.assess()},this.mql.addListener(this.listener)}function r(){if(!h)throw Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!h("only all").matches}var h=t.matchMedia;e.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},o.prototype={addHandler:function(t){var i=new e(t);this.handlers.push(i),this.matches()&&i.on()},removeHandler:function(t){var s=this.handlers;i(s,function(i,n){return i.equals(t)?(i.destroy(),!s.splice(n,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){i(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";i(this.handlers,function(i){i[t]()})}},r.prototype={register:function(t,e,r){var h=this.queries,a=r&&this.browserIsIncapable;return h[t]||(h[t]=new o(t,a)),n(e)&&(e={match:e}),s(e)||(e=[e]),i(e,function(i){h[t].addHandler(i)}),this},unregister:function(t,i){var s=this.queries[t];return s&&(i?s.removeHandler(i):(s.clear(),delete this.queries[t])),this}},t.enquire=t.enquire||new r})(this);

/* -- FILE: [javascripts/jquery.mousewheel.js]*/
/*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.1.3
 *
 * Requires: 1.2.2+
 */

(function (factory) {
    if ( typeof define === 'function' && define.amd ) {
        // AMD. Register as an anonymous module.
        define(['jquery'], factory);
    } else if (typeof exports === 'object') {
        // Node/CommonJS style for Browserify
        module.exports = factory;
    } else {
        // Browser globals
        factory(jQuery);
    }
}(function ($) {

    var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'];
    var toBind = 'onwheel' in document || document.documentMode >= 9 ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'];
    var lowestDelta, lowestDeltaXY;

    if ( $.event.fixHooks ) {
        for ( var i = toFix.length; i; ) {
            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
        }
    }

    $.event.special.mousewheel = {
        setup: function() {
            if ( this.addEventListener ) {
                for ( var i = toBind.length; i; ) {
                    this.addEventListener( toBind[--i], handler, false );
                }
            } else {
                this.onmousewheel = handler;
            }
        },

        teardown: function() {
            if ( this.removeEventListener ) {
                for ( var i = toBind.length; i; ) {
                    this.removeEventListener( toBind[--i], handler, false );
                }
            } else {
                this.onmousewheel = null;
            }
        }
    };

    $.fn.extend({
        mousewheel: function(fn) {
            return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
        },

        unmousewheel: function(fn) {
            return this.unbind("mousewheel", fn);
        }
    });


    function handler(event) {
        var orgEvent = event || window.event,
            args = [].slice.call(arguments, 1),
            delta = 0,
            deltaX = 0,
            deltaY = 0,
            absDelta = 0,
            absDeltaXY = 0,
            fn;
        event = $.event.fix(orgEvent);
        event.type = "mousewheel";

        // Old school scrollwheel delta
        if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta; }
        if ( orgEvent.detail )     { delta = orgEvent.detail * -1; }

        // New school wheel delta (wheel event)
        if ( orgEvent.deltaY ) {
            deltaY = orgEvent.deltaY * -1;
            delta  = deltaY;
        }
        if ( orgEvent.deltaX ) {
            deltaX = orgEvent.deltaX;
            delta  = deltaX * -1;
        }

        // Webkit
        if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY; }
        if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = orgEvent.wheelDeltaX * -1; }

        // Look for lowest delta to normalize the delta values
        absDelta = Math.abs(delta);
        if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; }
        absDeltaXY = Math.max(Math.abs(deltaY), Math.abs(deltaX));
        if ( !lowestDeltaXY || absDeltaXY < lowestDeltaXY ) { lowestDeltaXY = absDeltaXY; }

        // Get a whole value for the deltas
        fn = delta > 0 ? 'floor' : 'ceil';
        delta  = Math[fn](delta / lowestDelta);
        deltaX = Math[fn](deltaX / lowestDeltaXY);
        deltaY = Math[fn](deltaY / lowestDeltaXY);

        // Add event and delta to the front of the arguments
        args.unshift(event, delta, deltaX, deltaY);

        return ($.event.dispatch || $.event.handle).apply(this, args);
    }

}));


/* -- FILE: [javascripts/jquery.hotkeys.js]*/
/*
 * jQuery Hotkeys Plugin
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Based upon the plugin by Tzury Bar Yochay:
 * http://github.com/tzuryby/hotkeys
 *
 * Original idea by:
 * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/

(function(jQuery){

	jQuery.hotkeys = {
		version: "0.8",

		specialKeys: {
			8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
			20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
			37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 
			96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
			104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", 
			112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 
			120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
		},

		shiftNums: {
			"`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", 
			"8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<", 
			".": ">",  "/": "?",  "\\": "|"
		}
	};

	function keyHandler( handleObj ) {
		// Only care when a possible input has been specified
		if ( typeof handleObj.data !== "string" ) {
			return;
		}

		var origHandler = handleObj.handler,
			keys = handleObj.data.toLowerCase().split(" "),
			textAcceptingInputTypes = ["text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", "datetime-local", "search", "color"];

		handleObj.handler = function( event ) {
			// Don't fire in text-accepting inputs that we didn't directly bind to
			if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
				jQuery.inArray(event.target.type, textAcceptingInputTypes) > -1 ) ) {
				return;
			}

			// Keypress represents characters, not special keys
			var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
				character = String.fromCharCode( event.which ).toLowerCase(),
				key, modif = "", possible = {};

			// check combinations (alt|ctrl|shift+anything)
			if ( event.altKey && special !== "alt" ) {
				modif += "alt+";
			}

			if ( event.ctrlKey && special !== "ctrl" ) {
				modif += "ctrl+";
			}

			// TODO: Need to make sure this works consistently across platforms
			if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
				modif += "meta+";
			}

			if ( event.shiftKey && special !== "shift" ) {
				modif += "shift+";
			}

			if ( special ) {
				possible[ modif + special ] = true;

			} else {
				possible[ modif + character ] = true;
				possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;

				// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
				if ( modif === "shift+" ) {
					possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
				}
			}

			for ( var i = 0, l = keys.length; i < l; i++ ) {
				if ( possible[ keys[i] ] ) {
					return origHandler.apply( this, arguments );
				}
			}
		};
	}

	jQuery.each([ "keydown", "keyup", "keypress" ], function() {
		jQuery.event.special[ this ] = { add: keyHandler };
	});

})( jQuery );

/* -- FILE: [javascripts/form-elements.js]*/
$(function () {
    /*
        ================
        Transform a radio button
        ================
    */
    $(".cms_form input:radio").transformRadio({
        base: "class"
        /* ,
        checked : "/content/images/design/2013/fancyform/chk_on.png",
        unchecked : "/content/images/design/2013/fancyform/chk_off.png" */
    });

    /*
        ================
        Transform a checkbox
        ================
    */
    $(".cms_form input:checkbox").transformCheckbox({
        base: "class"
        /*,
        checked : "/content/images/design/2013/fancyform/chk_on.png",
        unchecked : "/content/images/design/2013/fancyform/chk_off.png"    */
    });

    /*
        ================
        Transform a select
        ================
    */

    $(".cms_form select:not([multiple])").transformSelect({
        showFirstItemInDrop: false
    });
    $(".cms_form select[multiple]").transformSelect({
        showFirstItemInDrop: false
    });


    // add custom scrollbar
    $(".cms_form .transformSelectDropdown").jScrollPane({
        autoReinitialise: true,
        verticalDragMinHeight: 20,
        verticalDragMaxHeight: 30,
        verticalGutter: 15
    });

    $("#events-past-form").change(function () {
        window.location.href = $(this).find('option:selected').attr('value');
    });

});



$(window).load(function () {
    $('.hasDatepicker input[type="text"]').each(function () {
        $(this).datepicker();
    });
});

/* -- FILE: [javascripts/jquery.bxslider.min.js]*/
/**
 * BxSlider v4.1 - Fully loaded, responsive content slider
 * http://bxslider.com
 *
 * Copyright 2012, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com
 * Written while drinking Belgian ales and listening to jazz
 *
 * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
 */
(function(e){var t={},n={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};e.fn.bxSlider=function(s){if(0!=this.length){if(this.length>1)return this.each(function(){e(this).bxSlider(s)}),this;var o={},r=this;t.el=this;var a=e(window).width(),l=e(window).height(),d=function(){o.settings=e.extend({},n,s),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSlides&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlides&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.startSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.startSlide},o.carousel=o.settings.minSlides>1||o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left",o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in t)if(void 0!==e.style[t[i]])return o.cssPrefix=t[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix+"-transform",!0;return!1}(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),c()},c=function(){if(r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),o.viewport=r.parent(),o.loader=e('<div class="bx-loading" />'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?215*o.children.length+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.easing?r.css("-"+o.cssPrefix+"-transition-timing-function",o.settings.easing):o.settings.easing||(o.settings.easing="swing"),v(),o.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),o.viewport.parent().css({maxWidth:u()}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyle:"none",position:"relative"}),o.children.width(p()),"horizontal"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargin),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBottom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"absolute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:50,display:"block"})),o.controls.el=e('<div class="bx-controls" />'),o.settings.captions&&E(),o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var t="vertical"==o.settings.mode?o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,t).clone().addClass("bx-clone"),n=o.children.slice(-t).clone().addClass("bx-clone");r.append(i).prepend(n)}o.active.last=o.settings.startSlide==f()-1,o.settings.video&&r.fitVids();var s=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(s=r.children()),o.settings.ticker||(o.settings.pager&&w(),o.settings.controls&&T(),o.settings.auto&&o.settings.autoControls&&C(),(o.settings.controls||o.settings.autoControls||o.settings.pager)&&o.viewport.after(o.controls.el)),s.imagesLoaded(g)},g=function(){o.loader.remove(),m(),"vertical"==o.settings.mode&&(o.settings.adaptiveHeight=!0),o.viewport.height(h()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),o.initialized=!0,e(window).bind("resize",X),o.settings.auto&&o.settings.autoStart&&L(),o.settings.ticker&&W(),o.settings.pager&&M(o.settings.startSlide),o.settings.controls&&D(),o.settings.touchEnabled&&!o.settings.ticker&&O()},h=function(){var t=0,n=e();if("vertical"==o.settings.mode||o.settings.adaptiveHeight)if(o.carousel){var s=1==o.settings.moveSlides?o.active.index:o.active.index*x();for(n=o.children.eq(s),i=1;o.settings.maxSlides-1>=i;i++)n=s+i>=o.children.length?n.add(o.children.eq(i-1)):n.add(o.children.eq(s+i))}else n=o.children.eq(o.active.index);else n=o.children;return"vertical"==o.settings.mode?(n.each(function(){t+=e(this).outerHeight()}),o.settings.slideMargin>0&&(t+=o.settings.slideMargin*(o.settings.minSlides-1))):t=Math.max.apply(Math,n.map(function(){return e(this).outerHeight(!1)}).get()),t},u=function(){var e="100%";return o.settings.slideWidth>0&&(e="horizontal"==o.settings.mode?o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-1)*o.settings.slideMargin:o.settings.slideWidth),e},p=function(){var e=o.settings.slideWidth,t=o.viewport.width();return 0==o.settings.slideWidth||o.settings.slideWidth>t&&!o.carousel||"vertical"==o.settings.mode?e=t:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(t>o.maxThreshold||o.minThreshold>t&&(e=(t-o.settings.slideMargin*(o.settings.minSlides-1))/o.settings.minSlides)),e},v=function(){var e=1;if("horizontal"==o.settings.mode&&o.settings.slideWidth>0)if(o.viewport.width()<o.minThreshold)e=o.settings.minSlides;else if(o.viewport.width()>o.maxThreshold)e=o.settings.maxSlides;else{var t=o.children.first().width();e=Math.floor(o.viewport.width()/t)}else"vertical"==o.settings.mode&&(e=o.settings.minSlides);return e},f=function(){var e=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)e=o.children.length/x();else for(var t=0,i=0;o.children.length>t;)++e,t=i+v(),i+=o.settings.moveSlides<=v()?o.settings.moveSlides:v();else e=Math.ceil(o.children.length/v());return e},x=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=v()?o.settings.moveSlides:v()},m=function(){if(o.children.length>o.settings.maxSlides&&o.active.last&&!o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var e=o.children.last(),t=e.position();S(-(t.left-(o.viewport.width()-e.width())),"reset",0)}else if("vertical"==o.settings.mode){var i=o.children.length-o.settings.minSlides,t=o.children.eq(i).position();S(-t.top,"reset",0)}}else{var t=o.children.eq(o.active.index*x()).position();o.active.index==f()-1&&(o.active.last=!0),void 0!=t&&("horizontal"==o.settings.mode?S(-t.left,"reset",0):"vertical"==o.settings.mode&&S(-t.top,"reset",0))}},S=function(e,t,i,n){if(o.usingCSS){var s="vertical"==o.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==t?(r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),I()})):"reset"==t?r.css(o.animProp,s):"ticker"==t&&(r.css("-"+o.cssPrefix+"-transition-timing-function","linear"),r.css(o.animProp,s),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(n.resetValue,"reset",0),H()}))}else{var a={};a[o.animProp]=e,"slide"==t?r.animate(a,i,o.settings.easing,function(){I()}):"reset"==t?r.css(o.animProp,e):"ticker"==t&&r.animate(a,speed,"linear",function(){S(n.resetValue,"reset",0),H()})}},b=function(){var t="";pagerQty=f();for(var i=0;pagerQty>i;i++){var n="";o.settings.buildPager&&e.isFunction(o.settings.buildPager)?(n=o.settings.buildPager(i),o.pagerEl.addClass("bx-custom-pager")):(n=i+1,o.pagerEl.addClass("bx-default-pager")),t+='<div class="bx-pager-item"><a href="" data-slide-index="'+i+'" class="bx-pager-link">'+n+"</a></div>"}o.pagerEl.html(t)},w=function(){o.settings.pagerCustom?o.pagerEl=e(o.settings.pagerCustom):(o.pagerEl=e('<div class="bx-pager" />'),o.settings.pagerSelector?e(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-pager").append(o.pagerEl),b()),o.pagerEl.delegate("a","click",z)},T=function(){o.controls.next=e('<a class="bx-next" href="">'+o.settings.nextText+"</a>"),o.controls.prev=e('<a class="bx-prev" href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",A),o.controls.prev.bind("click",P),o.settings.nextSelector&&e(o.settings.nextSelector).append(o.controls.next),o.settings.prevSelector&&e(o.settings.prevSelector).append(o.controls.prev),o.settings.nextSelector||o.settings.prevSelector||(o.controls.directionEl=e('<div class="bx-controls-direction" />'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.controls.el.addClass("bx-has-controls-direction").append(o.controls.directionEl))},C=function(){o.controls.start=e('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+o.settings.startText+"</a></div>"),o.controls.stop=e('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=e('<div class="bx-controls-auto" />'),o.controls.autoEl.delegate(".bx-start","click",y),o.controls.autoEl.delegate(".bx-stop","click",k),o.settings.autoControlsCombine?o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.start).append(o.controls.stop),o.settings.autoControlsSelector?e(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("bx-has-controls-auto").append(o.controls.autoEl),q(o.settings.autoStart?"stop":"start")},E=function(){o.children.each(function(){var t=e(this).find("img:first").attr("title");void 0!=t&&e(this).append('<div class="bx-caption"><span>'+t+"</span></div>")})},A=function(e){o.settings.auto&&r.stopAuto(),r.goToNextSlide(),e.preventDefault()},P=function(e){o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),e.preventDefault()},y=function(e){r.startAuto(),e.preventDefault()},k=function(e){r.stopAuto(),e.preventDefault()},z=function(t){o.settings.auto&&r.stopAuto();var i=e(t.currentTarget),n=parseInt(i.attr("data-slide-index"));n!=o.active.index&&r.goToSlide(n),t.preventDefault()},M=function(t){return"short"==o.settings.pagerType?(o.pagerEl.html(t+1+o.settings.pagerShortSeparator+o.children.length),void 0):(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,n){e(n).find("a").eq(t).addClass("active")}),void 0)},I=function(){if(o.settings.infiniteLoop){var e="";0==o.active.index?e=o.children.eq(0).position():o.active.index==f()-1&&o.carousel?e=o.children.eq((f()-1)*x()).position():o.active.index==o.children.length-1&&(e=o.children.eq(o.children.length-1).position()),"horizontal"==o.settings.mode?S(-e.left,"reset",0):"vertical"==o.settings.mode&&S(-e.top,"reset",0)}o.working=!1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)},q=function(e){o.settings.autoControlsCombine?o.controls.autoEl.html(o.controls[e]):(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.bx-"+e+")").addClass("active"))},D=function(){!o.settings.infiniteLoop&&o.settings.hideControlOnEnd?0==o.active.index?(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.active.index==f()-1?(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")):1==f()&&(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled"))},L=function(){o.settings.autoDelay>0?setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function(){o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},W=function(){var t=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var i=o.children.first().position();t="horizontal"==o.settings.mode?-i.left:-i.top}S(t,"reset",0),o.settings.pager=!1,o.settings.controls=!1,o.settings.autoControls=!1,o.settings.tickerHover&&!o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var t=0;o.children.each(function(){t+="horizontal"==o.settings.mode?e(this).outerWidth(!0):e(this).outerHeight(!0)});var i=o.settings.speed/t,n="horizontal"==o.settings.mode?"left":"top",s=i*(t-Math.abs(parseInt(r.css(n))));H(s)}),H()},H=function(e){speed=e?e:o.settings.speed;var t={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?t=r.find(".bx-clone").first().position():i=o.children.first().position();var n="horizontal"==o.settings.mode?-t.left:-t.top,s="horizontal"==o.settings.mode?-i.left:-i.top,a={resetValue:s};S(n,"ticker",speed,a)},O=function(){o.touch={start:{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",N)},N=function(e){if(o.working)e.preventDefault();else{o.touch.originalPos=r.position();var t=e.originalEvent;o.touch.start.x=t.changedTouches[0].pageX,o.touch.start.y=t.changedTouches[0].pageY,o.viewport.bind("touchmove",B),o.viewport.bind("touchend",Q)}},B=function(e){var t=e.originalEvent,i=Math.abs(t.changedTouches[0].pageX-o.touch.start.x),n=Math.abs(t.changedTouches[0].pageY-o.touch.start.y);if(3*i>n&&o.settings.preventDefaultSwipeX?e.preventDefault():3*n>i&&o.settings.preventDefaultSwipeY&&e.preventDefault(),"fade"!=o.settings.mode&&o.settings.oneToOneTouch){var s=0;if("horizontal"==o.settings.mode){var r=t.changedTouches[0].pageX-o.touch.start.x;s=o.touch.originalPos.left+r}else{var r=t.changedTouches[0].pageY-o.touch.start.y;s=o.touch.originalPos.top+r}S(s,"reset",0)}},Q=function(e){o.viewport.unbind("touchmove",B);var t=e.originalEvent,i=0;if(o.touch.end.x=t.changedTouches[0].pageX,o.touch.end.y=t.changedTouches[0].pageY,"fade"==o.settings.mode){var n=Math.abs(o.touch.start.x-o.touch.end.x);n>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var n=0;"horizontal"==o.settings.mode?(n=o.touch.end.x-o.touch.start.x,i=o.touch.originalPos.left):(n=o.touch.end.y-o.touch.start.y,i=o.touch.originalPos.top),!o.settings.infiniteLoop&&(0==o.active.index&&n>0||o.active.last&&0>n)?S(i,"reset",200):Math.abs(n)>=o.settings.swipeThreshold?(0>n?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):S(i,"reset",200)}o.viewport.unbind("touchend",Q)},X=function(){var t=e(window).width(),i=e(window).height();(a!=t||l!=i)&&(a=t,l=i,r.redrawSlider())};return r.goToSlide=function(t,i){if(!o.working&&o.active.index!=t)if(o.working=!0,o.oldIndex=o.active.index,o.active.index=0>t?f()-1:t>=f()?0:t,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.index),"next"==i?o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"prev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.index),o.active.last=o.active.index>=f()-1,o.settings.pager&&M(o.active.index),o.settings.controls&&D(),"fade"==o.settings.mode)o.settings.adaptiveHeight&&o.viewport.height()!=h()&&o.viewport.animate({height:h()},o.settings.adaptiveHeightSpeed),o.children.filter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.index).css("zIndex",51).fadeIn(o.settings.speed,function(){e(this).css("zIndex",50),I()});else{o.settings.adaptiveHeight&&o.viewport.height()!=h()&&o.viewport.animate({height:h()},o.settings.adaptiveHeightSpeed);var n=0,s={left:0,top:0};if(!o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode){var a=o.children.eq(o.children.length-1);s=a.position(),n=o.viewport.width()-a.width()}else{var l=o.children.length-o.settings.minSlides;s=o.children.eq(l).position()}else if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?o.settings.maxSlides-x():(f()-1)*x()-(o.children.length-o.settings.maxSlides),a=r.children(".bx-clone").eq(d);s=a.position()}else if("next"==i&&0==o.active.index)s=r.find(".bx-clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(t>=0){var c=t*x();s=o.children.eq(c).position()}var g="horizontal"==o.settings.mode?-(s.left-n):-s.top;S(g,"slide",o.settings.speed)}},r.goToNextSlide=function(){if(o.settings.infiniteLoop||!o.active.last){var e=parseInt(o.active.index)+1;r.goToSlide(e,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||0!=o.active.index){var e=parseInt(o.active.index)-1;r.goToSlide(e,"prev")}},r.startAuto=function(e){o.interval||(o.interval=setInterval(function(){"next"==o.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!=e&&q("stop"))},r.stopAuto=function(e){o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!=e&&q("start"))},r.getCurrentSlide=function(){return o.active.index},r.getSlideCount=function(){return o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-clone")).width(p()),o.viewport.css("height",h()),o.settings.ticker||m(),o.active.last&&(o.active.index=f()-1),o.active.index>=f()&&(o.active.last=!0),o.settings.pager&&!o.settings.pagerCustom&&(b(),M(o.active.index))},r.destroySlider=function(){o.initialized&&(o.initialized=!1,e(".bx-clone",this).remove(),o.children.removeAttr("style"),this.removeAttr("style").unwrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.next.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.pagerEl.remove(),e(".bx-caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval(o.interval),e(window).unbind("resize",X))},r.reloadSlider=function(e){void 0!=e&&(s=e),r.destroySlider(),d()},d(),this}}})(jQuery),function(e,t){var i="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";e.fn.imagesLoaded=function(n){function s(){var t=e(g),i=e(h);a&&(h.length?a.reject(d,t,i):a.resolve(d)),e.isFunction(n)&&n.call(r,d,t,i)}function o(t,n){t.src===i||-1!==e.inArray(t,c)||(c.push(t),n?h.push(t):g.push(t),e.data(t,"imagesLoaded",{isBroken:n,src:t.src}),l&&a.notifyWith(e(t),[n,d,e(g),e(h)]),d.length===c.length&&(setTimeout(s),d.unbind(".imagesLoaded")))}var r=this,a=e.isFunction(e.Deferred)?e.Deferred():0,l=e.isFunction(a.notify),d=r.find("img").add(r.filter("img")),c=[],g=[],h=[];return e.isPlainObject(n)&&e.each(n,function(e,t){"callback"===e?n=t:a&&a[e](t)}),d.length?d.bind("load.imagesLoaded error.imagesLoaded",function(e){o(e.target,"error"===e.type)}).each(function(n,s){var r=s.src,a=e.data(s,"imagesLoaded");a&&a.src===r?o(s,a.isBroken):s.complete&&s.naturalWidth!==t?o(s,0===s.naturalWidth||0===s.naturalHeight):(s.readyState||s.complete)&&(s.src=i,s.src=r)}):s(),a?a.promise(r):r}}(jQuery);

/* -- FILE: [javascripts/jquery.fancyform.min.js]*/
(function(t){t.simpleEllipsis=function(e,t){return e.length<t?e:e.substring(0,t)+"..."};var n=!!("ontouchstart"in window),r=function(){var e=t(this),n=e.data("options")||e.data("settings"),r;for(r in n){e.parent().removeClass(r)}};t.fn.extend({caret:function(t,n){var r=this[0],i=this.val(),s,o,u;if(r){if(typeof t=="undefined"){if(r.selectionStart){t=r.selectionStart;n=r.selectionEnd}else if(document.selection){this.focus();s=document.selection.createRange();if(s==null){return{start:0,end:e.value.length,length:0}}o=r.createTextRange();u=o.duplicate();o.moveToBookmark(s.getBookmark());u.setEndPoint("EndToStart",o);return{start:u.text.length-(u.text.split("\n").length+1)+2,end:u.text.length+s.text.length-(u.text.split("\n").length+1)+2,length:s.text.length,text:s.text}}}else{if(typeof n!="number")n=-1;if(typeof t!="number"||t<0)t=0;if(n>i.length)n=i.length;n=Math.max(t,n);t=Math.min(t,n);r.focus();if(r.selectionStart){r.selectionStart=t;r.selectionEnd=n}else if(document.selection){s=r.createTextRange();s.collapse(true);s.moveStart("character",t);s.moveEnd("character",n-t);s.select()}}return{start:t,end:n}}},transformCheckbox:function(e){var n={base:"image",checked:"",unchecked:"",disabledChecked:"",disabledUnchecked:"",tristateHalfChecked:"",changeHandler:function(e){},trigger:"self",tristate:0},i=t.extend(n,e),s={setImage:function(){var e=t(this),n=e.data("settings"),i;if(e.is(":disabled")){i=e.is(":checked")?"disabledChecked":"disabledUnchecked"}else if(e.hasClass("half-checked")){i="tristateHalfChecked"}else if(e.is(":checked")){i="checked"}else{i="unchecked"}if(n.base=="image"){e.next().attr("src",n[i])}else{r.call(this);e.parent().addClass(i)}},setProp:function(e,n,r){t(e).prop(n,r).change();s.setImage.call(e);if(n=="checked"&&!t(e).data("settings").type){t("[name='"+t(e).attr("name")+"']").each(function(){s.setImage.call(this)})}},uncheck:function(){s.setProp(this,"checked",0)},check:function(){s.setProp(this,"checked",1)},disable:function(){s.setProp(this,"disabled",1)},enable:function(){s.setProp(this,"disabled",0)},imageClick:function(e){var n=t(this),r=n.data("settings");if(!n.is(":disabled")){if(n.is(":checked")&&r.type){s.uncheck.call(n);i.changeHandler.call(n,1)}else{s.check.call(n);i.changeHandler.call(n,0)}s.handleTriState.call(n)}e.preventDefault()},handleTriState:function(){var e=t(this),n=e.data("settings"),r=e.parent(),i=r.find("ul"),o=r.closest("li");if(n.tristate){if(e.hasClass("half-checked")||e.is(":checked")){e.removeClass("half-checked");s.check.call(e);i.find("input:checkbox").removeClass("half-checked").each(s.check)}else if(e.not(":checked")){e.removeClass("half-checked");i.find("input:checkbox").each(s.uncheck)}i.find("input:checkbox").each(s.setImage);if(e.parent().parent().parent().is("li")){s.handleTriStateLevel.call(e.parent().parent().parent())}e.trigger("transformCheckbox.tristate")}},handleTriStateLevel:function(){var e=t(this),n=e.find("input:checkbox").first(),r=e.find("ul"),i=r.find("input:checkbox"),o=i.filter(":checked");n.removeClass("half-checked");if(i.length==o.length){s.check.call(n)}else if(o.length){n.addClass("half-checked")}else{s.uncheck.call(n)}s.setImage.call(n);if(e.parent().parent().is("li")){s.handleTriStateLevel.call(e.parent().parent())}}};return this.each(function(){if(typeof e=="string"){s[e].call(this)}else{var n=t(this);if(!n.data("tf.init")){n.data("tf.init",1).data("settings",i);i.type=n.is("[type=checkbox]");n.hide();if(i.base=="image"){n.after("<img />")}else{n.wrap("<span class='trans-element-"+(i.type?"checkbox":"radio")+"' />")}s.setImage.call(this);var r=t('label[for="'+n.attr("id")+'"]');if(r.length<=0){r=n.closest("label")}if(i.base=="image"){switch(i.trigger){case"parent":n.parent().click(t.proxy(s.imageClick,this));break;case"self":n.next("img").click(t.proxy(s.imageClick,this));if(r.length>0){r.click(t.proxy(s.imageClick,this))}break}}else{switch(i.trigger){case"parent":n.parent().parent().click(t.proxy(s.imageClick,this));break;case"self":n.parent().click(t.proxy(s.imageClick,this));if(r.length>0){r.click(t.proxy(s.imageClick,this))}break}}}}})},transformSelect:function(e){var r={dropDownClass:"transformSelect",showFirstItemInDrop:1,acceptManualInput:0,useManualInputAsFilter:0,subTemplate:function(e){if(t(this)[0].type=="select-multiple"){return"<span><input type='checkbox' value='"+t(e).val()+"' "+(t(e).is(":selected")?"checked='checked'":"")+" name='"+t(this).attr("name").replace("_backup","")+"' />"+t(e).text()+"</span>"}else{return"<span>"+t(e).text()+"</span>"}},initValue:function(){return t(this).text()},valueTemplate:function(){return t(this).text()},ellipsisLength:null,addDropdownToBody:0};var i=t(this).data("settings"),s={init:function(){var e=this,r=t(e),o=0,u=r.find("option:first");r.hide();if(r.find("option:selected").length&&e.type!="select-multiple"){u=r.find("option:selected");o=r.find("option").index(u)}var a="<ul class='"+i.dropDownClass+" trans-element'><li>";if(i.acceptManualInput&&!n){var f=r.data("value")||i.initValue.call(u);a+="<ins></ins><input type='text' name='"+r.attr("name").replace("_backup","")+"' value='"+f+"' />";if(r.attr("name").indexOf("_backup")<0){r.attr("name",r.attr("name")+"_backup")}}else{if(i.ellipsisLength){a+='<span title="'+u.text()+'">'+t.simpleEllipsis(i.initValue.call(u),i.ellipsisLength)+"</span>"}else{a+="<span>"+i.initValue.call(u)+"</span>"}}a+="<ul style='display: none;'>";r.children().each(function(t){if(!t&&!i.showFirstItemInDrop){}else{a+=s[this.tagName=="OPTION"?"getLIOptionChild":"getLIOptgroupChildren"].call(e,this)}});a+="</ul></li></ul>";var l=t(a),c=l.find("ul li:not(.group)"),h=l.find("input");r.after(l);if(r.is(":disabled")){s.disabled.call(e,1)}if(e.type=="select-multiple"&&!n){if(r.attr("name")&&r.attr("name").indexOf("_backup")==-1){r.attr("name",r.attr("name")+"_backup")}c.click(s.selectCheckbox)}else{c.click(s.selectNewValue);h.click(s.openDrop).keydown(function(e){if(t.inArray(e.which,[9,13])>=0)s.closeAllDropdowns()}).prev("ins").click(s.openDrop)}if(i.useManualInputAsFilter){h.keyup(s.filterByInput)}l.find("span:first").click(s.openDrop);l.find("ul:first").data("trans-element",l).addClass("transformSelectDropdown");l.data("trans-element-drop",l.find("ul:first"));if(i.addDropdownToBody){l.find("ul:first").appendTo("body")}t("html").unbind("click.transformSelect").bind("click.transformSelect",s.closeDropDowns);if(t.hotkeys&&!t("body").data("trans-element-select")){t("body").data("trans-element-select",1);t(document).bind("keydown","up",function(e){var n=t(".trans-focused"),r,i;if(!n.length||n.find("input").length)return 0;r=n.prevAll("select").first();i=r[0].selectedIndex-1;if(i<0){i=r.find("option").length-1}s.selectIndex.call(r,i);return 0}).bind("keydown","down",function(e){var n=t(".trans-focused"),r,i;if(!n.length||n.find("input").length)return 0;r=n.prevAll("select").first();i=r[0].selectedIndex+1;if(i>r.find("option").length-1){i=0}s.selectIndex.call(r,i);return 0})}if(n){if(!i.showFirstItemInDrop){r.find("option:first").remove()}r.appendTo(l.find("li:first")).show().css({opacity:0,position:"absolute",width:"100%",height:"100%",left:0,top:0});l.find("li:first").css({position:"relative"});r.change(s.mobileChange)}},getUL:function(){return n?t(this).closest("ul"):t(this).next(".trans-element:first")},getSelect:function(e){return n?e.find("select"):e.prevAll("select:first")},disabled:function(e){s.getUL.call(this)[e?"addClass":"removeClass"]("disabled")},repaint:function(){var e=s.getUL.call(this);e.data("trans-element-drop").remove();e.remove();s.init.call(this)},filterByInput:function(){var e=t(this),n=e.val().toLowerCase(),r=e.closest("ul"),i=r.data("trans-element-drop"),s=i.find("li");if(!n){s.show()}else{s.each(function(){var e=t(this);if(!!e.data("settings").alwaysvisible){e.show()}else{e[e.text().toLowerCase().indexOf(n)<0?"hide":"show"]()}})}},selectIndex:function(e){var n=t(this),r=s.getUL.call(this),i=r.data("trans-element-drop");try{i.find("li").filter(function(){}).first().trigger("click");return t(this).text()==n.find("option").eq(e).text()}catch(o){}},selectValue:function(e){var n=t(this),r=s.getUL.call(this),i=r.data("trans-element-drop");s.selectIndex.call(this,n.find(e?"option[value='"+e+"']":"option:not([value])").index())},getLIOptionChild:function(e){var n=t(e).attr("data-settings")||"",r=(t(e).attr("class")||"")+(t(e).is(":selected")?" selected":"");return"<li data-settings='"+n+"' class='"+r+"'>"+i.subTemplate.call(this,t(e))+"</li>"},getLIOptgroupChildren:function(e){var n=this,r="<li class='group'><span>"+t(e).attr("label")+"</span><ul>";t(e).find("option").each(function(){r+=s.getLIOptionChild.call(n,this)});r+="</ul></li>";return r},getLIIndex:function(e){var t=0,n=e.closest(".group"),r;if(n.length){t=e.closest(".transformSelectDropdown").find("li").index(e)-n.prevAll(".group").length-1}else{t=e.parent().find("li").index(e)-e.prevAll(".group").length}if(!i.showFirstItemInDrop){t+=1}return t},selectNewValue:function(){var e=t(this),n=e.closest(".transformSelectDropdown"),r=n.data("trans-element"),o=s.getSelect(r),u=s.getLIIndex(e);o[0].selectedIndex=u;if(r.find("input").length){r.find("input").val(i.valueTemplate.call(e))}else{sel=o.find("option:selected");r.find("span:first").html(i.ellipsisLength?t.simpleEllipsis(i.valueTemplate.call(sel),i.ellipsisLength):i.valueTemplate.call(sel))}n.find(".selected").removeClass("selected");e.addClass("selected");s.closeAllDropdowns();o.trigger("change");t(".trans-element").removeClass("trans-focused");r.addClass("trans-focused");if(t.fn.validate){o.valid()}},mobileChange:function(){var e=t(this),n=s.getUL.call(this),r=e.find("option:selected");if(this.type!="select-multiple"){n.find("span:first").html(i.ellipsisLength?t.simpleEllipsis(i.valueTemplate.call(r),i.ellipsisLength):i.valueTemplate.call(r))}},selectCheckbox:function(e){var n=t(this),r=n.closest(".transformSelectDropdown"),i=r.data("trans-element"),o=s.getSelect(i),u=n.closest("li"),a=u.find(":checkbox"),f,l;if(t(e.target).is("li")){u=n}f=s.getLIIndex(u);if(!t(e.target).is(":checkbox")){a.prop("checked",!a.is(":checked"))}o.find("option").eq(f).prop("selected",a.is(":checked"));if(a.data("tfc.init")){a.transformCheckbox("setImage")}if(!t(e.target).is(":checkbox")){a.change()}o.change()},openDrop:function(){var e=t(this).closest(".trans-element"),n=e.data("trans-element-drop"),r=t(this).parent();if(e.hasClass("disabled")){return 0}if(r.hasClass("open")&&!t(this).is("input")){s.closeAllDropdowns()}else{r.css({"z-index":1200}).addClass("open");n.css({"z-index":1200}).show();s.hideAllOtherDropdowns.call(this)}if(i.addDropdownToBody){n.css({position:"absolute",top:r.offset().top+r.outerHeight(),left:r.offset().left})}},hideAllOtherDropdowns:function(){var e=t("body").find("*"),n=e.index(t(this).parent());t("body").find("ul.trans-element").each(function(){var r=t(this).data("trans-element-drop");if(n-1!=e.index(t(this))){r.hide().css("z-index",0).parent().css("z-index",0).removeClass("open")}})},closeDropDowns:function(e){if(!t(e.target).closest(".trans-element").length){s.closeAllDropdowns()}},closeAllDropdowns:function(){t("ul.trans-element").each(function(){t(this).data("trans-element-drop").hide();t(this).find("li:first").removeClass("open")}).removeClass("trans-focused")}};if(typeof e=="string"){s[e].apply(this,Array.prototype.slice.call(arguments,1));return this}return this.each(function(){var n=t(this);if(!n.data("tfs.init")){i=t.extend(r,e);n.data("settings",i);n.data("tfs.init",1);s.init.call(this)}})},transformFile:function(e){var n={file:function(e,n){return this.each(function(){var r=t(this),i=t("<div></div>").appendTo(r).css({position:"absolute",overflow:"hidden","-moz-opacity":"0",filter:"alpha(opacity: 0)",opacity:"0",zoom:"1",width:r.outerWidth()+"px",height:r.outerHeight()+"px","z-index":1}),s=0,o,u=function(){var t=o=i.html("<input "+(window.FormData?"multiple ":"")+'type="file" style="border:none; position:absolute">').find("input");s=s||t.width();t.change(function(){t.unbind("change");u();e(t[0])})},a=function(e){i.offset(r.offset());if(e){o.offset({left:e.pageX-s+25,top:e.pageY-10});f()}},f=function(){r.addClass(n+"MouseOver")},l=function(){r.removeClass(n+"MouseOver")};u();r.mouseover(a);r.mousemove(a);r.mouseout(l);a()})}};return this.each(function(r){if(!t(this).data("tff.init")){t(this).data("tff.init",1);var i=t(this).hide(),s=null,o=i.attr("name"),u=!e?"customInput":e.cssClass?e.cssClass:"customInput",a=!e?"Browse...":e.label?e.label:"Browse...";if(!i.attr("id")){i.attr("id","custom_input_file_"+(new Date).getTime()+Math.floor(Math.random()*1e5))}s=i.attr("id");i.after('<span id="'+s+'_custom_input" class="'+u+'"><span class="inputPath" id="'+s+'_custom_input_path"> </span><span class="inputButton">'+a+"</span></span>");n.file.call(t("#"+s+"_custom_input"),function(e){e.id=s;e.name=o;t("#"+s).replaceWith(e).removeAttr("style").hide();t("#"+s+"_custom_input_path").html(t("#"+s).val().replace(/\\/g,"/").replace(/.*\//,""))},u)}})},transformTextarea:function(e,n){var r={hiddenTextareaClass:"hiddenTextarea"},i=t.extend(r,e),s={init:function(){var e=t(this);if(e.css("line-height")=="normal"){e.css("line-height","12px")}var n={"line-height":e.css("line-height"),"font-family":e.css("font-family"),"font-size":e.css("font-size"),border:"1px solid black",width:e.width(),"letter-spacing":e.css("letter-spacing"),"text-indent":e.css("text-indent"),padding:e.css("padding"),overflow:"hidden","white-space":e.css("white-space")};e.css(n).keyup(s.keyup).keydown(s.keyup).bind("mousewheel",s.mousewheel).after(t("<div />")).next().addClass(i.hiddenTextareaClass).css(n).css("width",e.width()-5).hide()},mousewheel:function(e,n){e.preventDefault();var r=t(this).css("line-height"),i=t(this)[0].scrollTop+parseFloat(r)*n*-1;s.scrollToPx.call(this,i)},keyup:function(e){if(t.inArray(e.which,[37,38,39,40])>=0){s.checkCaretScroll.call(this)}else{s.checkScroll.call(this,e.which)}s.scrollCallBack.call(this)},checkCaretScroll:function(){var e=t(this),n=e.caret().start,r=e.val(),o=e.scrollTop(),u=parseInt(e.css("line-height")),a=r.substr(0,n),f=r.substr(n),l=e.next("."+i.hiddenTextareaClass),c;if(n){if(r.substr(n-1,1)=="\n"){a=r.substr(0,n+1)}s.toDiv.call(this,0,a,f);if(l.height()>e.height()+o){c=o+u}else if(l.height()<=o){c=o-u}if(c){s.scrollToPx.call(this,c)}}},checkScroll:function(e){var n=t(this),r=n.next("."+i.hiddenTextareaClass),o=n.caret().start,u=n.val(),a=u.substr(0,o),f=u.substr(o);s.toDiv.call(this,1,a,f);if(n.scrollTop()+n.height()>r.height()){return}if(r.data("old-height")!=r.data("new-height")){var l=r.data("new-height")-r.data("old-height");s.scrollToPx.call(this,n.scrollTop()+l)}},toDiv:function(e,n,r){var s=t(this),o=s.next("."+i.hiddenTextareaClass),u=/\n/g,a=/\s\s/g,f=/\s/g,l=s.val(),c=0,h=0,p="<br />";if(n)l=n;if(u.test(l.substring(l.length-1))){c=1}if(u.test(l.substring(l.length-2,l.length-1))&&f.test(l.substring(l.length-1))){h=1}if(e)o.data("old-height",o.height());l=l.replace(u,"<br>").replace(a,"  ").replace(a,"  ").replace(/<br>/ig,p);o.html(l);if((c||h)&&t.trim(r)){if(h&&t.browser.msie)o.append(p);o.append(p)}if(e){o.data("new-height",o.height())}},scrollToPercentage:function(e){if(e>=0&&e<=100){var n=t(this),r=n.next("."+i.hiddenTextareaClass),o=parseFloat(n[0].scrollHeight)-n.height(),u=o*e/100;s.scrollToPx.call(this,u)}},scrollToPx:function(e){var n=this;t(n).scrollTop(s.roundToLineHeight.call(n,e));s.scrollCallBack.call(n)},roundToLineHeight:function(e){var n=parseInt(t(this).css("line-height"));return Math.ceil(e/n)*n},remove:function(){t(this).unbind("keyup").css({overflow:"auto",border:""}).next("div").remove()},scrollCallBack:function(){var e=this,n=t(e),r=n[0],i=parseFloat(r.scrollHeight)-n.height(),s=parseFloat(r.scrollTop)/i*100;s=s>100?100:s;s=s<0?0:s;s=isNaN(s)?100:s;n.trigger("scrollToPx",[r.scrollTop,s])}};if(typeof e=="string"){s[e].call(this,n);return this}return this.each(function(){if(!t(this).next().hasClass(i.hiddenTextareaClass)){s.init.call(this);s.toDiv.call(this,1)}})}});t.fn.transformRadio=t.fn.transformCheckbox})(jQuery)

/* -- FILE: [javascripts/jquery.jscrollpane.min.js]*/
/*!
 * jScrollPane - v2.0.17 - 2013-08-17
 * http://jscrollpane.kelvinluck.com/
 *
 * Copyright (c) 2013 Kelvin Luck
 * Dual licensed under the MIT or GPL licenses.
 */
!function(a,b,c){a.fn.jScrollPane=function(d){function e(d,e){function f(b){var e,h,j,l,m,n,q=!1,r=!1;if(P=b,Q===c)m=d.scrollTop(),n=d.scrollLeft(),d.css({overflow:"hidden",padding:0}),R=d.innerWidth()+tb,S=d.innerHeight(),d.width(R),Q=a('<div class="jspPane" />').css("padding",sb).append(d.children()),T=a('<div class="jspContainer" />').css({width:R+"px",height:S+"px"}).append(Q).appendTo(d);else{if(d.css("width",""),q=P.stickToBottom&&C(),r=P.stickToRight&&D(),l=d.innerWidth()+tb!=R||d.outerHeight()!=S,l&&(R=d.innerWidth()+tb,S=d.innerHeight(),T.css({width:R+"px",height:S+"px"})),!l&&ub==U&&Q.outerHeight()==V)return d.width(R),void 0;ub=U,Q.css("width",""),d.width(R),T.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Q.css("overflow","auto"),U=b.contentWidth?b.contentWidth:Q[0].scrollWidth,V=Q[0].scrollHeight,Q.css("overflow",""),W=U/R,X=V/S,Y=X>1,Z=W>1,Z||Y?(d.addClass("jspScrollable"),e=P.maintainPosition&&(ab||db),e&&(h=A(),j=B()),g(),i(),k(),e&&(y(r?U-R:h,!1),x(q?V-S:j,!1)),H(),E(),N(),P.enableKeyboardNavigation&&J(),P.clickOnTrack&&o(),L(),P.hijackInternalLinks&&M()):(d.removeClass("jspScrollable"),Q.css({top:0,left:0,width:T.width()-tb}),F(),I(),K(),p()),P.autoReinitialise&&!rb?rb=setInterval(function(){f(P)},P.autoReinitialiseDelay):!P.autoReinitialise&&rb&&clearInterval(rb),m&&d.scrollTop(0)&&x(m,!1),n&&d.scrollLeft(0)&&y(n,!1),d.trigger("jsp-initialised",[Z||Y])}function g(){Y&&(T.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),eb=T.find(">.jspVerticalBar"),fb=eb.find(">.jspTrack"),$=fb.find(">.jspDrag"),P.showArrows&&(jb=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",m(0,-1)).bind("click.jsp",G),kb=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",m(0,1)).bind("click.jsp",G),P.arrowScrollOnHover&&(jb.bind("mouseover.jsp",m(0,-1,jb)),kb.bind("mouseover.jsp",m(0,1,kb))),l(fb,P.verticalArrowPositions,jb,kb)),hb=S,T.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){hb-=a(this).outerHeight()}),$.hover(function(){$.addClass("jspHover")},function(){$.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),$.addClass("jspActive");var c=b.pageY-$.position().top;return a("html").bind("mousemove.jsp",function(a){r(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),h())}function h(){fb.height(hb+"px"),ab=0,gb=P.verticalGutter+fb.outerWidth(),Q.width(R-gb-tb);try{0===eb.position().left&&Q.css("margin-left",gb+"px")}catch(a){}}function i(){Z&&(T.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />'))),lb=T.find(">.jspHorizontalBar"),mb=lb.find(">.jspTrack"),bb=mb.find(">.jspDrag"),P.showArrows&&(pb=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",m(-1,0)).bind("click.jsp",G),qb=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",m(1,0)).bind("click.jsp",G),P.arrowScrollOnHover&&(pb.bind("mouseover.jsp",m(-1,0,pb)),qb.bind("mouseover.jsp",m(1,0,qb))),l(mb,P.horizontalArrowPositions,pb,qb)),bb.hover(function(){bb.addClass("jspHover")},function(){bb.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),bb.addClass("jspActive");var c=b.pageX-bb.position().left;return a("html").bind("mousemove.jsp",function(a){t(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),nb=T.innerWidth(),j())}function j(){T.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){nb-=a(this).outerWidth()}),mb.width(nb+"px"),db=0}function k(){if(Z&&Y){var b=mb.outerHeight(),c=fb.outerWidth();hb-=b,a(lb).find(">.jspCap:visible,>.jspArrow").each(function(){nb+=a(this).outerWidth()}),nb-=c,S-=c,R-=b,mb.parent().append(a('<div class="jspCorner" />').css("width",b+"px")),h(),j()}Z&&Q.width(T.outerWidth()-tb+"px"),V=Q.outerHeight(),X=V/S,Z&&(ob=Math.ceil(1/W*nb),ob>P.horizontalDragMaxWidth?ob=P.horizontalDragMaxWidth:ob<P.horizontalDragMinWidth&&(ob=P.horizontalDragMinWidth),bb.width(ob+"px"),cb=nb-ob,u(db)),Y&&(ib=Math.ceil(1/X*hb),ib>P.verticalDragMaxHeight?ib=P.verticalDragMaxHeight:ib<P.verticalDragMinHeight&&(ib=P.verticalDragMinHeight),$.height(ib+"px"),_=hb-ib,s(ab))}function l(a,b,c,d){var e,f="before",g="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split"),b==f?g=b:b==g&&(f=b,e=c,c=d,d=e),a[f](c)[g](d)}function m(a,b,c){return function(){return n(a,b,this,c),this.blur(),!1}}function n(b,c,d,e){d=a(d).addClass("jspActive");var f,g,h=!0,i=function(){0!==b&&vb.scrollByX(b*P.arrowButtonSpeed),0!==c&&vb.scrollByY(c*P.arrowButtonSpeed),g=setTimeout(i,h?P.initialDelay:P.arrowRepeatFreq),h=!1};i(),f=e?"mouseout.jsp":"mouseup.jsp",e=e||a("html"),e.bind(f,function(){d.removeClass("jspActive"),g&&clearTimeout(g),g=null,e.unbind(f)})}function o(){p(),Y&&fb.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d,e=a(this),f=e.offset(),g=b.pageY-f.top-ab,h=!0,i=function(){var a=e.offset(),c=b.pageY-a.top-ib/2,f=S*P.scrollPagePercent,k=_*f/(V-S);if(0>g)ab-k>c?vb.scrollByY(-f):r(c);else{if(!(g>0))return j(),void 0;c>ab+k?vb.scrollByY(f):r(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}}),Z&&mb.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d,e=a(this),f=e.offset(),g=b.pageX-f.left-db,h=!0,i=function(){var a=e.offset(),c=b.pageX-a.left-ob/2,f=R*P.scrollPagePercent,k=cb*f/(U-R);if(0>g)db-k>c?vb.scrollByX(-f):t(c);else{if(!(g>0))return j(),void 0;c>db+k?vb.scrollByX(f):t(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}})}function p(){mb&&mb.unbind("mousedown.jsp"),fb&&fb.unbind("mousedown.jsp")}function q(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),$&&$.removeClass("jspActive"),bb&&bb.removeClass("jspActive")}function r(a,b){Y&&(0>a?a=0:a>_&&(a=_),b===c&&(b=P.animateScroll),b?vb.animate($,"top",a,s):($.css("top",a),s(a)))}function s(a){a===c&&(a=$.position().top),T.scrollTop(0),ab=a;var b=0===ab,e=ab==_,f=a/_,g=-f*(V-S);(wb!=b||yb!=e)&&(wb=b,yb=e,d.trigger("jsp-arrow-change",[wb,yb,xb,zb])),v(b,e),Q.css("top",g),d.trigger("jsp-scroll-y",[-g,b,e]).trigger("scroll")}function t(a,b){Z&&(0>a?a=0:a>cb&&(a=cb),b===c&&(b=P.animateScroll),b?vb.animate(bb,"left",a,u):(bb.css("left",a),u(a)))}function u(a){a===c&&(a=bb.position().left),T.scrollTop(0),db=a;var b=0===db,e=db==cb,f=a/cb,g=-f*(U-R);(xb!=b||zb!=e)&&(xb=b,zb=e,d.trigger("jsp-arrow-change",[wb,yb,xb,zb])),w(b,e),Q.css("left",g),d.trigger("jsp-scroll-x",[-g,b,e]).trigger("scroll")}function v(a,b){P.showArrows&&(jb[a?"addClass":"removeClass"]("jspDisabled"),kb[b?"addClass":"removeClass"]("jspDisabled"))}function w(a,b){P.showArrows&&(pb[a?"addClass":"removeClass"]("jspDisabled"),qb[b?"addClass":"removeClass"]("jspDisabled"))}function x(a,b){var c=a/(V-S);r(c*_,b)}function y(a,b){var c=a/(U-R);t(c*cb,b)}function z(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),T.scrollTop(0),T.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=B(),j=h+S,h>n||c?l=n-P.verticalGutter:n+f>j&&(l=n-S+f+P.verticalGutter),isNaN(l)||x(l,d),i=A(),k=i+R,i>o||c?m=o-P.horizontalGutter:o+g>k&&(m=o-R+g+P.horizontalGutter),isNaN(m)||y(m,d)}function A(){return-Q.position().left}function B(){return-Q.position().top}function C(){var a=V-S;return a>20&&a-B()<10}function D(){var a=U-R;return a>20&&a-A()<10}function E(){T.unbind(Bb).bind(Bb,function(a,b,c,d){var e=db,f=ab;return vb.scrollBy(c*P.mouseWheelSpeed,-d*P.mouseWheelSpeed,!1),e==db&&f==ab})}function F(){T.unbind(Bb)}function G(){return!1}function H(){Q.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){z(a.target,!1)})}function I(){Q.find(":input,a").unbind("focus.jsp")}function J(){function b(){var a=db,b=ab;switch(c){case 40:vb.scrollByY(P.keyboardSpeed,!1);break;case 38:vb.scrollByY(-P.keyboardSpeed,!1);break;case 34:case 32:vb.scrollByY(S*P.scrollPagePercent,!1);break;case 33:vb.scrollByY(-S*P.scrollPagePercent,!1);break;case 39:vb.scrollByX(P.keyboardSpeed,!1);break;case 37:vb.scrollByX(-P.keyboardSpeed,!1)}return e=a!=db||b!=ab}var c,e,f=[];Z&&f.push(lb[0]),Y&&f.push(eb[0]),Q.focus(function(){d.focus()}),d.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(d){if(d.target===this||f.length&&a(d.target).closest(f).length){var g=db,h=ab;switch(d.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:c=d.keyCode,b();break;case 35:x(V-S),c=null;break;case 36:x(0),c=null}return e=d.keyCode==c&&g!=db||h!=ab,!e}}).bind("keypress.jsp",function(a){return a.keyCode==c&&b(),!e}),P.hideFocus?(d.css("outline","none"),"hideFocus"in T[0]&&d.attr("hideFocus",!0)):(d.css("outline",""),"hideFocus"in T[0]&&d.attr("hideFocus",!1))}function K(){d.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function L(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&Q.find(d)&&(0===T.scrollTop()?c=setInterval(function(){T.scrollTop()>0&&(z(b,!0),a(document).scrollTop(T.position().top),clearInterval(c))},50):(z(b,!0),a(document).scrollTop(T.position().top)))}}function M(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate("a[href*=#]","click",function(c){var d,e,f,g,h,i,j=this.href.substr(0,this.href.indexOf("#")),k=location.href;if(-1!==location.href.indexOf("#")&&(k=location.href.substr(0,location.href.indexOf("#"))),j===k){d=escape(this.href.substr(this.href.indexOf("#")+1));try{e=a("#"+d+', a[name="'+d+'"]')}catch(l){return}e.length&&(f=e.closest(".jspScrollable"),g=f.data("jsp"),g.scrollToElement(e,!0),f[0].scrollIntoView&&(h=a(b).scrollTop(),i=e.offset().top,(h>i||i>h+a(b).height())&&f[0].scrollIntoView()),c.preventDefault())}}))}function N(){var a,b,c,d,e,f=!1;T.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=A(),b=B(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=db,j=ab;return vb.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==db&&j==ab}}).bind("touchend.jsp",function(){f=!1}).bind("click.jsp-touchclick",function(){return e?(e=!1,!1):void 0})}function O(){var a=B(),b=A();d.removeClass("jspScrollable").unbind(".jsp"),d.replaceWith(Ab.append(Q.children())),Ab.scrollTop(a),Ab.scrollLeft(b),rb&&clearInterval(rb)}var P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb=this,wb=!0,xb=!0,yb=!1,zb=!1,Ab=d.clone(!1,!1).empty(),Bb=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===d.css("box-sizing")?(sb=0,tb=0):(sb=d.css("paddingTop")+" "+d.css("paddingRight")+" "+d.css("paddingBottom")+" "+d.css("paddingLeft"),tb=(parseInt(d.css("paddingLeft"),10)||0)+(parseInt(d.css("paddingRight"),10)||0)),a.extend(vb,{reinitialise:function(b){b=a.extend({},P,b),f(b)},scrollToElement:function(a,b,c){z(a,b,c)},scrollTo:function(a,b,c){y(a,c),x(b,c)},scrollToX:function(a,b){y(a,b)},scrollToY:function(a,b){x(a,b)},scrollToPercentX:function(a,b){y(a*(U-R),b)},scrollToPercentY:function(a,b){x(a*(V-S),b)},scrollBy:function(a,b,c){vb.scrollByX(a,c),vb.scrollByY(b,c)},scrollByX:function(a,b){var c=A()+Math[0>a?"floor":"ceil"](a),d=c/(U-R);t(d*cb,b)},scrollByY:function(a,b){var c=B()+Math[0>a?"floor":"ceil"](a),d=c/(V-S);r(d*_,b)},positionDragX:function(a,b){t(a,b)},positionDragY:function(a,b){r(a,b)},animate:function(a,b,c,d){var e={};e[b]=c,a.animate(e,{duration:P.animateDuration,easing:P.animateEase,queue:!1,step:d})},getContentPositionX:function(){return A()},getContentPositionY:function(){return B()},getContentWidth:function(){return U},getContentHeight:function(){return V},getPercentScrolledX:function(){return A()/(U-R)},getPercentScrolledY:function(){return B()/(V-S)},getIsScrollableH:function(){return Z},getIsScrollableV:function(){return Y},getContentPane:function(){return Q},scrollToBottom:function(a){r(_,a)},hijackInternalLinks:a.noop,destroy:function(){O()}}),f(e)}return d=a.extend({},a.fn.jScrollPane.defaults,d),a.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){d[this]=d[this]||d.speed}),this.each(function(){var b=a(this),c=b.data("jsp");c?c.reinitialise(d):(a("script",b).filter('[type="text/javascript"],:not([type])').remove(),c=new e(b,d),b.data("jsp",c))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}}(jQuery,this);

/* -- FILE: [javascripts/tooltip.js]*/
/*-----------------------------------------------------------------------------------------------*/
/*                                      SIMPLE jQUERY TOOLTIP                                    */
/*                                      VERSION: 1.1                                             */
/*                                      AUTHOR: jon cazier                                       */
/*                                      EMAIL: jon@3nhanced.com                                  */
/*                                      WEBSITE: 3nhanced.com                                    */
/*-----------------------------------------------------------------------------------------------*/

$(document).ready(function () {
    $('.tooltip').hover(function () {
	        this.tip = this.title;
	        $(this).append(
	            '<div class="toolTipWrapper">'
	                + '<div class="toolTipMid">'
	                + this.tip
	                + '</div>'
	                + '</div>'
	        );
	        this.title = "";
	        this.width = $(this).width();
	        $(this).find('.toolTipWrapper').css({left: this.width + 17});
	        $('.toolTipWrapper').fadeIn(300);
	    }, function () {
	        $('.toolTipWrapper').fadeOut(100);
	        $(this).children().remove();
	        this.title = this.tip;
    });
});

/* -- FILE: [javascripts/jquery.columnizer.js]*/
(function(e){e.fn.columnize=function(t){var n={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:true,accuracy:false,manualBreaks:false,cssClassPrefix:""};t=e.extend(n,t);if(typeof t.width=="string"){t.width=parseInt(t.width,10);if(isNaN(t.width)){t.width=n.width}}return this.each(function(){function h(e,t){var n=t?".":"";if(f.length){return n+f+"-"+e}return n+e}function p(n,r,i,s){while((a||i.height()<s)&&r[0].childNodes.length){var o=r[0].childNodes[0];if(e(o).find(h("columnbreak",true)).length){return}if(e(o).hasClass(h("columnbreak"))){return}n.append(o)}if(n[0].childNodes.length===0)return;var u=n[0].childNodes;var f=u[u.length-1];n[0].removeChild(f);var l=e(f);if(l[0].nodeType==3){var c=l[0].nodeValue;var p=t.width/18;if(t.accuracy)p=t.accuracy;var d;var v=null;while(i.height()<s&&c.length){var m=c.indexOf(" ",p);if(m!=-1){d=c.substring(0,m)}else{d=c}v=document.createTextNode(d);n.append(v);if(c.length>p&&m!=-1){c=c.substring(m)}else{c=""}}if(i.height()>=s&&v!==null){n[0].removeChild(v);c=v.nodeValue+c}if(c.length){l[0].nodeValue=c}else{return false}}if(r.contents().length){r.prepend(l)}else{r.append(l)}return l[0].nodeType==3}function d(e,t,n,r){if(e.contents(":last").find(h("columnbreak",true)).length){return}if(e.contents(":last").hasClass(h("columnbreak"))){return}if(t.contents().length){var i=t.contents(":first");if(typeof i.get(0)=="undefined"||i.get(0).nodeType!=1)return;var s=i.clone(true);if(i.hasClass(h("columnbreak"))){e.append(s);i.remove()}else if(a){e.append(s);i.remove()}else if(s.get(0).nodeType==1&&!s.hasClass(h("dontend"))){e.append(s);if(s.is("img")&&n.height()<r+20){i.remove()}else if(i.hasClass(h("dontsplit"))&&n.height()<r+20){i.remove()}else if(s.is("img")||i.hasClass(h("dontsplit"))){s.remove()}else{s.empty();if(!p(s,i,n,r)){i.addClass(h("split"));if(i.get(0).tagName=="OL"){var o=s.get(0).childElementCount+s.get(0).start;i.attr("start",o+1)}if(i.children().length){d(s,i,n,r)}}else{i.addClass(h("split"))}if(s.get(0).childNodes.length===0){s.remove()}}}}}function v(){if(r.data("columnized")&&r.children().length==1){return}r.data("columnized",true);r.data("columnizing",true);r.empty();r.append(e("<div class='"+h("first")+" "+h("last")+" "+h("column")+" "+"' style='width:100%; float: "+t.columnFloat+";'></div>"));$col=r.children().eq(r.children().length-1);$destroyable=s.clone(true);if(t.overflow){targetHeight=t.overflow.height;p($col,$destroyable,$col,targetHeight);if(!$destroyable.contents().find(":first-child").hasClass(h("dontend"))){d($col,$destroyable,$col,targetHeight)}while($col.contents(":last").length&&m($col.contents(":last").get(0))){var n=$col.contents(":last");n.remove();$destroyable.prepend(n)}var i="";var o=document.createElement("DIV");while($destroyable[0].childNodes.length>0){var u=$destroyable[0].childNodes[0];if(u.attributes){for(var a=0;a<u.attributes.length;a++){if(u.attributes[a].nodeName.indexOf("jQuery")===0){u.removeAttribute(u.attributes[a].nodeName)}}}o.innerHTML="";o.appendChild($destroyable[0].childNodes[0]);i+=o.innerHTML}var f=e(t.overflow.id)[0];f.innerHTML=i}else{$col.append($destroyable.contents())}r.data("columnizing",false);if(t.overflow&&t.overflow.doneFunc){t.overflow.doneFunc()}}function m(t){if(t.nodeType==3){if(/^\s+$/.test(t.nodeValue)){if(!t.previousSibling)return false;return m(t.previousSibling)}return false}if(t.nodeType!=1)return false;if(e(t).hasClass(h("dontend")))return true;if(t.childNodes.length===0)return false;return m(t.childNodes[t.childNodes.length-1])}function g(){l=0;if(o==r.width())return;o=r.width();var n=Math.round(r.width()/t.width);var u=t.width;var f=t.height;if(t.columns)n=t.columns;if(a){n=s.find(h("columnbreak",true)).length+1;u=false}if(n<=1){return v()}if(r.data("columnizing"))return;r.data("columnized",true);r.data("columnizing",true);r.empty();r.append(e("<div style='width:"+Math.floor(100/n)+"%; float: "+t.columnFloat+";'></div>"));x=r.children(":last");x.append(s.clone());i=x.height();r.empty();var c=i/n;var g=true;var y=3;var b=false;if(t.overflow){y=1;c=t.overflow.height}else if(f&&u){y=1;c=f;b=true}for(var w=0;w<y&&w<20;w++){r.empty();var E,S,x,T;try{E=s.clone(true)}catch(N){E=s.clone()}E.css("visibility","hidden");for(var C=0;C<n;C++){S=C===0?h("first"):"";S+=" "+h("column");S=C==n-1?h("last")+" "+S:S;r.append(e("<div class='"+S+"' style='width:"+Math.floor(100/n)+"%; float: "+t.columnFloat+";'></div>"))}C=0;while(C<n-(t.overflow?0:1)||b&&E.contents().length){if(r.children().length<=C){r.append(e("<div class='"+S+"' style='width:"+Math.floor(100/n)+"%; float: "+t.columnFloat+";'></div>"))}x=r.children().eq(C);if(b){x.width(u+"px")}p(x,E,x,c);d(x,E,x,c);while(x.contents(":last").length&&m(x.contents(":last").get(0))){T=x.contents(":last");T.remove();E.prepend(T)}C++;if(x.contents().length===0&&E.contents().length){x.append(E.contents(":first"))}else if(C==n-(t.overflow?0:1)&&!t.overflow){if(E.find(h("columnbreak",true)).length){n++}}}if(t.overflow&&!b){var k=false;var L=document.all&&navigator.appVersion.indexOf("MSIE 7.")!=-1;if(k||L){var A="";var O=document.createElement("DIV");while(E[0].childNodes.length>0){var M=E[0].childNodes[0];for(C=0;C<M.attributes.length;C++){if(M.attributes[C].nodeName.indexOf("jQuery")===0){M.removeAttribute(M.attributes[C].nodeName)}}O.innerHTML="";O.appendChild(E[0].childNodes[0]);A+=O.innerHTML}var _=e(t.overflow.id)[0];_.innerHTML=A}else{e(t.overflow.id).empty().append(E.contents().clone(true))}}else if(!b){x=r.children().eq(r.children().length-1);E.contents().each(function(){x.append(e(this))});var D=x.height();var P=D-c;var H=0;var B=1e7;var j=0;var F=false;var I=0;r.children().each(function(e){return function(t){var n=e.children().eq(t);var r=n.children(":last").find(h("columnbreak",true)).length;if(!r){var i=n.height();F=false;H+=i;if(i>j){j=i;F=true}if(i<B)B=i;I++}}}(r));var q=H/I;if(H===0){w=y}else if(t.lastNeverTallest&&F){l+=5;c=c+30;if(w==y-1)y++}else if(j-B>30){c=q+30}else if(Math.abs(q-c)>20){c=q}else{w=y}}else{r.children().each(function(e){x=r.children().eq(e);x.width(u+"px");if(e===0){x.addClass(h("first"))}else if(e==r.children().length-1){x.addClass(h("last"))}else{x.removeClass(h("first"));x.removeClass(h("last"))}});r.width(r.children().length*u+"px")}r.append(e("<br style='clear:both;'>"))}r.find(h("column",true)).find(":first"+h("removeiffirst",true)).remove();r.find(h("column",true)).find(":last"+h("removeiflast",true)).remove();r.find(h("split",true)).find(":first"+h("removeiffirst",true)).remove();r.find(h("split",true)).find(":last"+h("removeiflast",true)).remove();r.data("columnizing",false);if(t.overflow){t.overflow.doneFunc()}t.doneFunc()}var r=t.target?e(t.target):e(this);var i=e(this).height();var s=e("<div></div>");var o=0;var u=false;var a=t.manualBreaks;var f=n.cssClassPrefix;if(typeof t.cssClassPrefix=="string"){f=t.cssClassPrefix}var l=0;s.append(e(this).contents().clone(true));if(!t.ignoreImageLoading&&!t.target){if(!r.data("imageLoaded")){r.data("imageLoaded",true);if(e(this).find("img").length>0){var c=function(e,n){return function(){if(!e.data("firstImageLoaded")){e.data("firstImageLoaded","true");e.empty().append(n.children().clone(true));e.columnize(t)}}}(e(this),s);e(this).find("img").one("load",c);e(this).find("img").one("abort",c);return}}}r.empty();g();if(!t.buildOnce){e(window).resize(function(){if(!t.buildOnce){if(r.data("timeout")){clearTimeout(r.data("timeout"))}r.data("timeout",setTimeout(g,200))}})}})}})(jQuery)

/* -- FILE: [javascripts/jquery.ui.datepicker-cs.js]*/
/* Czech initialisation for the jQuery UI date picker plugin. */
/* Written by Tomas Muller (tomas@tomas-muller.net). */
var dateToday = new Date();
$(function () {
    $.datepicker.regional.cs = {
        closeText: 'Zavřít',
        prevText: '&#x3c;Dříve',
        nextText: 'Později&#x3e;',
        currentText: 'Nyní',
        monthNames: ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
        monthNamesShort: ['led', 'úno', 'bře', 'dub', 'kvě', 'čer', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],
        dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
        dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
        dayNamesMin: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
        weekHeader: 'Týd',
        dateFormat: 'dd-mm-yy',
        firstDay: 1,
        minDate: dateToday,
        isRTL: false,
        showMonthAfterYear: false,
        yearSuffix: ''
    };
    $.datepicker.setDefaults($.datepicker.regional.cs);
    $.datepicker.regional.en = {
        closeText: "Done",
        // Display text for close link
        prevText: "Prev",
        // Display text for previous month link
        nextText: "Next",
        // Display text for next month link
        currentText: "Today",
        // Display text for current month link
        monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        // Names of months for drop-down and formatting
        monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        // For formatting
        dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
        // For formatting
        dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        // For formatting
        dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
        // Column headings for days starting at Sunday
        weekHeader: "Wk",
        // Column header for week of the year
        dateFormat: "mm/dd/yy",
        // See format options on parseDate
        firstDay: 0,
        // The first day of the week, Sun = 0, Mon = 1, ...
        isRTL: false,
        // True if right-to-left language, false if left-to-right
        showMonthAfterYear: false,
        // True if the year select precedes month, false for month then year
        yearSuffix: "" // Additional text to append to the year in the month headers
    };
});

/* -- FILE: [javascripts/reverse-datepicker.js]*/
$.datepicker._generateMonthYearHeader = function (inst, drawMonth, drawYear, minDate, maxDate, secondary, monthNames, monthNamesShort) {

    var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, cnt, changeMonth = this._get(inst, "changeMonth"),
        changeYear = this._get(inst, "changeYear"),
        showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
        html = "<div class='ui-datepicker-title'>",
        monthHtml = "";

    // month selection
    if (secondary || !changeMonth) {
        monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
    } else {
        inMinYear = (minDate && minDate.getFullYear() === drawYear);
        inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
        monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
        for (month = 0; month < 12; month++) {
            if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
                monthHtml += "<option value='" + month + "'" + (month === drawMonth ? " selected='selected'" : "") + ">" + monthNamesShort[month] + "</option>";
            }
        }
        monthHtml += "</select>";
    }

    if (!showMonthAfterYear) {
        html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
    }

    // year selection
    if (!inst.yearshtml) {
        inst.yearshtml = "";
        if (secondary || !changeYear) {
            html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
        } else {
            // determine range of years to display
            years = this._get(inst, "yearRange").split(":");
            thisYear = new Date().getFullYear();
            determineYear = function (value) {
                var _year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : parseInt(value, 10)));
                return (isNaN(_year) ? thisYear : _year);
            };
            year = determineYear(years[0]);
            endYear = Math.max(year, determineYear(years[1] || ""));
            year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
            endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
            inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
            for (cnt = endYear; cnt >= year; cnt--) {
                inst.yearshtml += "<option value='" + cnt + "'" + (cnt === drawYear ? " selected='selected'" : "") + ">" + cnt + "</option>";
            }
            inst.yearshtml += "</select>";

            html += inst.yearshtml;
            inst.yearshtml = null;
        }
    }

    html += this._get(inst, "yearSuffix");
    if (showMonthAfterYear) {
        html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
    }
    html += "</div>"; // Close datepicker_header
    return html;
};

/* -- FILE: [javascripts/standard.js]*/
/*global jQuery, $, fb, enquire, content_url*/

var fbPageOptions;
var mapDefaultDeviceZoom;
var countOfPictures, widthOfBox, isEven;
var calculateSum;

$(document).ready(function () {
    var timerMenu, $form, $summands, $sumDisplay;

    $("#bt-reservation").click(function (e) {
        e.preventDefault();
        $('html, body').animate({
            scrollTop: $(".reservation-form").offset().top
        }, 1000);
    });


//form error

    var $errorBox = $('.form-warning');
    
    if ($errorBox.length) {
        console.log($errorBox.offset().top);
        $('html, body').animate({
            scrollTop: $errorBox.offset().top
        }, 500);
    }


    //validation  eshop
/*
    $("form#order-form").submit(function () {
        var isFormValid = true;

        $(".required input").each(function () {
            if ($.trim($(this).val()).length === 0) {
                $(this).addClass("highlight");
                isFormValid = false;
            } else {
                $(this).removeClass("highlight");
                $(".form-warning").hide();
            }
        });

        if (!isFormValid) {
            $(".form-warning").show();

        }

        return isFormValid;
    });
    */

    //show/hide skupiny jazyk
    $('input[name=m99420fbrp__649]').change(function () {
        if (this.id == "fbrp__649_1_0") {
            $(".choose-language-select1").show();
            $(".choose-language-select1 ul ul").css('height', '200px');
        } else {
            $(".choose-language-select1").hide();
        }
    });

    $('input[name=m99420fbrp__659]').change(function () {
        if (this.id == "fbrp__659_1_0") {
            $(".choose-language-select2").show();
            $(".choose-language-select2 ul ul").css('height', '200px');
        } else {
            $(".choose-language-select2").hide();
        }
    });
    $('input[name=m99420fbrp__661]').change(function () {
        if (this.id == "fbrp__661_1_0") {
            $(".choose-language-select3").show();
            $(".choose-language-select3 ul ul").css('height', '200px');
        } else {
            $(".choose-language-select3").hide();
        }
    });
    $('input[name=m22fdafbrp__659]').change(function () {
        if (this.id == "fbrp__659_1_0") {
            $(".choose-language-select").show();
            $(".choose-language-select ul ul").css('height', '200px');
        } else {
            $(".choose-language-select").hide();
        }
    });
    $('input[name=m22fdafbrp__649]').change(function () {
        if (this.id == "fbrp__649_1_0") {
            $(".choose-language-select").show();
            $(".choose-language-select ul ul").css('height', '200px');
        } else {
            $(".choose-language-select").hide();
        }
    });
    $('#fbrp__652_1_0').change(function () {
        if ($("#fbrp__652_1_0").is(':checked')) {
            $("#fbrp__653").show();

        } else {
            $("#fbrp__653").hide();
        }
    });
    $('#fbrp__652_1_1').change(function () {
        if ($("#fbrp__652_1_1").is(':checked')) {
            $("#fbrp__655").show();

        } else {
            $("#fbrp__655").hide();
        }
    });
    $('#fbrp__652_1_2').change(function () {
        if ($("#fbrp__652_1_2").is(':checked')) {
            $("#fbrp__657").show();

        } else {
            $("#fbrp__657").hide();
        }
    });
    $('.sum select').change(function () {
        var sum = 0;
        $('li.selected').each(function () {
            sum += Number($(this).val());
        });
        $("#sum-people").html(sum);
    });


    //sum of people in groups cz
    $form = $('#m03905moduleform_1');
    $summands = $form.find('.counting-people input');
    $sumDisplay = $('#fbrp__222');

    $form.delegate('.counting-people input', 'change', function () {
        var sum = 0;
        $summands.each(function () {
            var value = Number($(this).val());
            if (!isNaN(value)) {
                sum += value;
            }
        });

        $sumDisplay.val(sum);
    });

     //sum of people in groups en
    $form = $('#mbc678moduleform_1');
    $summands = $form.find('.counting-people input');
    $sumDisplay = $('#fbrp__277');

    $form.delegate('.counting-people input', 'change', function () {
        var sum = 0;
        $summands.each(function () {
            var value = Number($(this).val());
            if (!isNaN(value)) {
                sum += value;
            }
        });

        $sumDisplay.val(sum);
    });





    //empty the cart
    $("#clear-cart").click(function () {
        $("#clear-cart-form input").click();
    });

    // floatbox setup
    fbPageOptions = {
        disableScroll: true,
        innerBorder: 0,
        outerBorder: 0,
        showIndexThumbs: false,
        showItemNumber: false,
        shadowType: 'none'
    };

    if (console === "undefined") {
        window.console = {
            log: function () {
                return undefined;
            }
        };
    }

    mapDefaultDeviceZoom = 17;

    // smartphone
    enquire.register("screen and (max-width: 759px)", {

        deferSetup: true,
        setup: function () {
            console.log('Setup mobile');
            mapDefaultDeviceZoom = 15;
        },
        match: function () {
            console.log('Enter mobile');
        },
        unmatch: function () {
            console.log('Leave mobile');
        }

        // tablet
    }).register("screen and (min-width: 760px) and (max-width: 989px)", {

        deferSetup: true,
        setup: function () {
            console.log('Setup tablet');
        },
        match: function () {
            console.log('Enter tablet');
        },
        unmatch: function () {
            console.log('Leave tablet');
        }

        // fullsize
    }).register("screen and (min-width: 990px)", {

        deferSetup: true,
        setup: function () {
            console.log('Setup fullsize');
        },
        match: function () {
            console.log('Enter fullsize');
        },
        unmatch: function () {
            console.log('Leave fullsize');
        }
    });


    $('.textbox-left').each(function () {
        var leftHeight = $(this).height(),
            nextElement = $(this).next(),
            rightHeight = nextElement.height();

        if (nextElement.attr('class') === 'textbox-right') {
            if (rightHeight > leftHeight) {
                $(this).css('height', rightHeight);
            } else {
                nextElement.css('height', leftHeight);
            }
        }
    });

    /* top nav: show submenu on link focus */
    $('#nav > li > a').focusin(function () {
        $('#nav > li').removeClass('menu-focus');
        jQuery(this).parent().addClass('menu-focus');
    });

    $('#nav > li > a').hover(function () {
        $('#nav > li').removeClass('menu-focus');
    });

    $('#nav > li > a').click(function () {
        if (jQuery(this).parent().hasClass('menu-focus-mobile')) {
            jQuery(this).parent().removeClass('menu-focus-mobile');
        } else {
            $('#nav > li').removeClass('menu-focus-mobile');
            jQuery(this).parent().addClass('menu-focus-mobile');
        }
        return false;
    });

    /* toggle display get_template_vars list, bottom page */
    $('#gtv .toggle').click(function () {
        $('#gtv .template-vars-list').toggle('slow');
    });


    /* Slider - hp */
    $('.bxslider').bxSlider({
        slideWidth: 950,
        minSlides: 1,
        maxSlides: 1,
        moveSlides: 1,
        slideMargin: 1,
        mode: 'fade',
        captions: false,
        auto: true,
        autoControls: false,
        hideControlOnEnd: true,
        controls: false,
        pager: false,
        speed: 2000,
        pause: 10000,
        //randomStart: true
    }); /* $('#slider-wrapper .news-ajax-wrapper').removeClass('news-ajax-wrapper'); */


    /* formbuilder scroller */
    if ($('.form-warning').length > 0) {
        if ($(window).width() < 743) {
            $('.main-title').addClass('margin-top-50');
        } else {
            $('.main-title').removeClass('margin-top-50');
        }
        //$("#zkuste-to-prosim-znovu").scrollTop(-50);
        //document.location.href = "#zkuste-to-prosim-znovu";
    }
    $(window).resize(function () {
        if ($('.form-warning').length > 0) {
            if ($(window).width() < 743) {
                $('.main-title').addClass('margin-top-50');
            } else {
                $('.main-title').removeClass('margin-top-50');
            }
        }
    });

    /* div container expand/collapse */
    $('.cz-lang div.show-hide').each(function () {
        $(this).prepend('<div class="expand">Rozbalit' + '<img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        $('div.show-hide > :nth(1), div.show-hide .expand img, div.show-hide .collapse img').addClass('ongoing'); /*$('div.show-hide > *').nextAll().css('display', 'none');*/
        $(this).children().nextAll(':not(.ongoing)').hide();
        $('div.show-hide > :first-child, div.show-hide > :nth-child(2)').css('display', 'block');
        $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'table');
    });

    $('.en-lang div.show-hide').each(function () {
        $(this).prepend('<div class="expand">Expand' + '<img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        $('div.show-hide > :nth(1), div.show-hide .expand img, div.show-hide .collapse img').addClass('ongoing'); /*$('div.show-hide > *').nextAll().css('display', 'none');*/
        $(this).children().nextAll(':not(.ongoing)').hide();
        $('div.show-hide > :first-child, div.show-hide > :nth-child(2)').css('display', 'block');
        $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'table');
    });

    $('.cz-lang div').find('.expand').click(function () {
        if ($(this).hasClass('collapse')) {
            $(this).html('Rozbalit <img src="' + content_url + '/images/design/2013/expand-arrow.png"/>');
            $(this).removeClass('collapse');
            $(this).addClass('expand');
            $('div.show-hide > :nth(1), div.show-hide .expand img, div.show-hide .collapse img').addClass('ongoing');
            $(this).nextAll(':not(.ongoing)').hide();
            $('div.show-hide > :first-child, div.show-hide > :nth-child(2)').css('display', 'block');
            $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'none');
        } else if ($(this).hasClass('expand')) {
            $(this).html('Sbalit <img src="' + content_url + '/images/design/2013/collaps-arrow.png"/>');
            $(this).removeClass('expand');
            $(this).addClass('collapse');
            $(this).nextAll(':not(.ongoing)').show();
            $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'table');
        }
    });

    $('.en-lang div').find('.expand').click(function () {
        if ($(this).hasClass('collapse')) {
            $(this).html('Expand <img src="' + content_url + '/images/design/2013/expand-arrow.png"/>');
            $(this).removeClass('collapse');
            $(this).addClass('expand');
            $('div.show-hide > :nth(1), div.show-hide .expand img, div.show-hide .collapse img').addClass('ongoing');
            $(this).nextAll(':not(.ongoing)').hide();
            $('div.show-hide > :first-child, div.show-hide > :nth-child(2)').css('display', 'block');
            $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'none');
        } else if ($(this).hasClass('expand')) {
            $(this).html('Collapse <img src="' + content_url + '/images/design/2013/collaps-arrow.png"/>');
            $(this).removeClass('expand');
            $(this).addClass('collapse');
            $(this).nextAll(':not(.ongoing)').show();
            $('div.show-hide > table:first-child, div.show-hide > table:nth-child(2)').css('display', 'table');
        }
    });

    /* table expand/collapse */
    $('.cz-lang table.show-hide').each(function () { /*$(this).find('thead tr, tbody tr:nth(1), tbody tr:nth(2)').addClass('ongoing');*/
        $(this).find('caption').append('<div class="collapse" style="display: none;">Sbalit' + ' <img src="' + content_url + '/images/design/2013/collaps-arrow.png"/></div>');
        $(this).find('tr:not(.ongoing)').hide();
        $(this).addClass('closed');

        var el = $(this).find('tr.ongoing').first().find('td').last();
        if (el.length) {
            el.prepend('<div class="expand">Rozbalit' + ' <img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        } else {
            el = $(this).find('caption');
            el.prepend('<div class="expand">Rozbalit' + ' <img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        }
    });

    $('.en-lang table.show-hide').each(function () { /*$(this).find('thead tr, tbody tr:nth(1), tbody tr:nth(2)').addClass('ongoing');*/
        $(this).find('caption').append('<div class="collapse" style="display: none;">Collapse' + ' <img src="' + content_url + '/images/design/2013/collaps-arrow.png"/></div>');
        $(this).find('tr:not(.ongoing)').hide();
        $(this).addClass('closed');

        var el = $(this).find('tr.ongoing').first().find('td').last();
        if (el.length) {
            el.prepend('<div class="expand">Expand' + ' <img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        } else {
            el = $(this).find('caption');
            el.prepend('<div class="expand">Expand' + ' <img src="' + content_url + '/images/design/2013/expand-arrow.png"/></div>');
        }
    });

    $('table').find('.collapse').click(function () {
        $(this).closest('table').find('tr:not(.ongoing)').hide();
        $(this).closest('table').find('.expand').show();
        $(this).closest('table').addClass('closed');
        $(this).hide();
    });

    $('table').find('.expand').click(function () {
        $(this).closest('table').find('tr').css('display', 'table-row');
        $(this).closest('table').find('.collapse').show();
        $(this).closest('table').removeClass('closed');
        $(this).hide();
    });

    $('.thumbnail-scroller .thumbnails a').click(function () {
        var fullsizeUrl = $(this).attr('href'),
            thumbSrc = $(this).find('div').attr('data-link'),
            thumbTitle = $(this).attr('title');

        $('.thumbnail-scroller .thumb-preview a').attr('href', fullsizeUrl);
        $('.thumbnail-scroller .thumb-preview a').attr('title', thumbTitle);
        $('.thumbnail-scroller .thumb-preview img').attr('src', thumbSrc);

        $('.thumbnail-scroller .thumb-preview img').each(function () {
            $(this).attr('width', $(this).width());
            $(this).attr('height', 265);
        });

        fb.anchors.length = 0;
        fb.tagAnchors(document);
        return false;
    });

    // add custom scrollbar
/*$(".thumbnail-scroller .thumbnails-outer").jScrollPane({
        autoReinitialise: true
    });*/

    countOfPictures = $(".thumbnail-scroller .thumbnails-outer .thumbnails").attr('data-number');

    if (countOfPictures > 6) {
        if (isEven % 2 === 0) {
            widthOfBox = (countOfPictures * 103) / 3;
        } else {
            widthOfBox = ((countOfPictures * 103) / 3) + 103;
        }
        $(".thumbnail-scroller .thumbnails").css('width', widthOfBox);
    } else {
        $(".thumbnail-scroller .thumbnails-outer").css('overflow', 'hidden');
    }

    // disable pager inactive links
    $('.pager .disabled a').click(function () {
        return false;
    });

    // delay effect
    function SetMenuInterval() {
        $('.node1.header, .node1.header > ul').removeClass('menu-hover');
        $('.node2.header, .node2.header > ul').removeClass('menu-hover');
        $('.node3.header, .node3.header > ul').removeClass('menu-hover');
        $('.node4.header, .node4.header > ul').removeClass('menu-hover');
        $('.node5.header, .node5.header > ul').removeClass('menu-hover');
        $('.node6.header, .node6.header > ul').removeClass('menu-hover');
    }
    if ($(window).width() > 990) {
        $('.node1.header, .node2.header, .node3.header, .node4.header, .node5.header, .node6.header').hover(function () {
            clearInterval(timerMenu, 500);
        }, function () {
            timerMenu = setInterval(SetMenuInterval, 500);
        });

        $('.node1.header').hover(function () {
            $('.node1.header, .node1.header > ul').addClass('menu-hover');
            $('.node2.header, .node2.header > ul').removeClass('menu-hover');
            $('.node3.header, .node3.header > ul').removeClass('menu-hover');
            $('.node4.header, .node4.header > ul').removeClass('menu-hover');
            $('.node5.header, .node5.header > ul').removeClass('menu-hover');
            $('.node6.header, .node6.header > ul').removeClass('menu-hover');
        });
        $('.node2.header').hover(function () {
            $('.node1.header, .node1.header > ul').removeClass('menu-hover');
            $('.node2.header, .node2.header > ul').addClass('menu-hover');
            $('.node3.header, .node3.header > ul').removeClass('menu-hover');
            $('.node4.header, .node4.header > ul').removeClass('menu-hover');
            $('.node5.header, .node5.header > ul').removeClass('menu-hover');
            $('.node6.header, .node6.header > ul').removeClass('menu-hover');
        });
        $('.node3.header').hover(function () {
            $('.node1.header, .node1.header > ul').removeClass('menu-hover');
            $('.node2.header, .node2.header > ul').removeClass('menu-hover');
            $('.node3.header, .node3.header > ul').addClass('menu-hover');
            $('.node4.header, .node4.header > ul').removeClass('menu-hover');
            $('.node5.header, .node5.header > ul').removeClass('menu-hover');
            $('.node6.header, .node6.header > ul').removeClass('menu-hover');
        });
        $('.node4.header').hover(function () {
            $('.node1.header, .node1.header > ul').removeClass('menu-hover');
            $('.node2.header, .node2.header > ul').removeClass('menu-hover');
            $('.node3.header, .node3.header > ul').removeClass('menu-hover');
            $('.node4.header, .node4.header > ul').addClass('menu-hover');
            $('.node5.header, .node5.header > ul').removeClass('menu-hover');
            $('.node6.header, .node6.header > ul').removeClass('menu-hover');
        });
        $('.node5.header').hover(function () {
            $('.node1.header, .node1.header > ul').removeClass('menu-hover');
            $('.node2.header, .node2.header > ul').removeClass('menu-hover');
            $('.node3.header, .node3.header > ul').removeClass('menu-hover');
            $('.node4.header, .node4.header > ul').removeClass('menu-hover');
            $('.node5.header, .node5.header > ul').addClass('menu-hover');
            $('.node6.header, .node6.header > ul').removeClass('menu-hover');
        });
        $('.node6.header').hover(function () {
            $('.node1.header, .node1.header > ul').removeClass('menu-hover');
            $('.node2.header, .node2.header > ul').removeClass('menu-hover');
            $('.node3.header, .node3.header > ul').removeClass('menu-hover');
            $('.node4.header, .node4.header > ul').removeClass('menu-hover');
            $('.node5.header, .node5.header > ul').removeClass('menu-hover');
            $('.node6.header, .node6.header > ul').addClass('menu-hover');
        });
    }
    $(window).resize(function () {
        if ($(window).width() > 990) {
            $('.node1.header').hover(function () {
                $('.node1.header, .node1.header > ul').addClass('menu-hover');
                $('.node2.header, .node2.header > ul').removeClass('menu-hover');
                $('.node3.header, .node3.header > ul').removeClass('menu-hover');
                $('.node4.header, .node4.header > ul').removeClass('menu-hover');
                $('.node5.header, .node5.header > ul').removeClass('menu-hover');
                $('.node6.header, .node6.header > ul').removeClass('menu-hover');
            });
            $('.node2.header').hover(function () {
                $('.node1.header, .node1.header > ul').removeClass('menu-hover');
                $('.node2.header, .node2.header > ul').addClass('menu-hover');
                $('.node3.header, .node3.header > ul').removeClass('menu-hover');
                $('.node4.header, .node4.header > ul').removeClass('menu-hover');
                $('.node5.header, .node5.header > ul').removeClass('menu-hover');
                $('.node6.header, .node6.header > ul').removeClass('menu-hover');
            });
            $('.node3.header').hover(function () {
                $('.node1.header, .node1.header > ul').removeClass('menu-hover');
                $('.node2.header, .node2.header > ul').removeClass('menu-hover');
                $('.node3.header, .node3.header > ul').addClass('menu-hover');
                $('.node4.header, .node4.header > ul').removeClass('menu-hover');
                $('.node5.header, .node5.header > ul').removeClass('menu-hover');
                $('.node6.header, .node6.header > ul').removeClass('menu-hover');
            });
            $('.node4.header').hover(function () {
                $('.node1.header, .node1.header > ul').removeClass('menu-hover');
                $('.node2.header, .node2.header > ul').removeClass('menu-hover');
                $('.node3.header, .node3.header > ul').removeClass('menu-hover');
                $('.node4.header, .node4.header > ul').addClass('menu-hover');
                $('.node5.header, .node5.header > ul').removeClass('menu-hover');
                $('.node6.header, .node6.header > ul').removeClass('menu-hover');
            });
            $('.node5.header').hover(function () {
                $('.node1.header, .node1.header > ul').removeClass('menu-hover');
                $('.node2.header, .node2.header > ul').removeClass('menu-hover');
                $('.node3.header, .node3.header > ul').removeClass('menu-hover');
                $('.node4.header, .node4.header > ul').removeClass('menu-hover');
                $('.node5.header, .node5.header > ul').addClass('menu-hover');
                $('.node6.header, .node6.header > ul').removeClass('menu-hover');
            });
            $('.node6.header').hover(function () {
                $('.node1.header, .node1.header > ul').removeClass('menu-hover');
                $('.node2.header, .node2.header > ul').removeClass('menu-hover');
                $('.node3.header, .node3.header > ul').removeClass('menu-hover');
                $('.node4.header, .node4.header > ul').removeClass('menu-hover');
                $('.node5.header, .node5.header > ul').removeClass('menu-hover');
                $('.node6.header, .node6.header > ul').addClass('menu-hover');
            });
        } else {
            clearInterval(timerMenu);
        }
    });
    $(".img-box img, .traveling .thumb img").each(function () {
        $(this).addClass('visibility-hidden');
    });
});
$(window).load(function () {
    $('.img-box img, .traveling .thumb img, #product-gallery img').each(function () {
        if (!$(this).hasClass('no-bgcover')) {
            $(this).attr('width', $(this).width());
            $(this).attr('height', $(this).height());
            $(this).addClass('background-cover');

            if ($(this).attr('height') < 157) {
                $(this).addClass('top-less');
            }
        } else {
            $(this).removeClass('visibility-hidden');
        }
    });

    $('.thumbnail-scroller .thumb-preview img').each(function () {
        $(this).attr('width', $(this).width());
        $(this).attr('height', $(this).height());
        $(this).addClass('background-cover');
    });

    $(".background-cover").backgroundCover();
    $(".background-cover").each(function () {
        $(this).removeClass('visibility-hidden');
    });
});

// MODAL WINDOW //

$(function () {
    $('.modal-link').click(function (e) {
        var dataModal = $(this).attr('data-modal'),
        dataHref = $(this).attr('href');

        $('body').find('#' + dataModal).fadeIn(300);
        $('body').find('#' + dataModal + ' .modal-continue').attr('href', dataHref);
        e.preventDefault();
    });

    $('.modal-close').click(function (e) {
        $(this).parent().parent().fadeOut(300);
        e.preventDefault();
    });
});

$(function () {

    $('form#order-form').submit(function() {
        var modalBoxSubmitted = $('input[name=modal-box-submitted]').attr('value');
        if (modalBoxSubmitted == '0') {
            $('#modal-box-tickets').fadeIn(300);
            return false;
        }
    });

    $('.modal-continue').click(function(e) {
        var checked = $('#squaredThree').prop("checked");
        if (checked) {
            $('input[name=modal-box-submitted]').attr('value', '1');
            $('form#order-form').submit();
        }

        e.preventDefault();
    });

});


$(document).ready(function (e) {
    var getAnchorId = window.location.hash;
    if (getAnchorId) {
        $('html, body').animate({
            scrollTop: $(getAnchorId).offset(-300)
        }, 1000);
    }
});



document.addEventListener("DOMContentLoaded", function() {
  $(".js-add-files-job").click(function(){
      $(".upload-job").toggle()
  })
  $('#cntnt01fbrp_submit').val('Odeslat')
});


$( document ).ready(function() {
    $("#volna-pozice-form-zobrazit-vice").click(function() {
      $("#zobrazit-vice-form-text").toggle()
    });
});

/* -- FILE: [javascripts/swfobject.js]*/
/*	SWFObject v2.2 <http://code.google.com/p/swfobject/>
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();

/* -- FILE: [javascripts/jquery-validation.js]*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});

/* -- FILE: [lib/content/javascripts/old/thickbox.js]*/
// Thickbox
function Floatbox(){this.defaultOptions={theme:'white',padding:12,panelPadding:8,outerBorder:4,innerBorder:1,overlayOpacity:55,controlOpacity:60,autoSizeImages:true,autoSizeOther:false,resizeImages:true,resizeOther:false,resizeTool:'topleft',infoCorner:'bl',controlCorner:'tr',positionLeft:false,positionTop:false,enableDrag:false,dropShadow:true,showCaption:true,showItemNumber:true,showClose:true,hideFlash:true,hideJava:true,disableScroll:false,preloadAll:true,enableCookies:false,cookieScope:'site',language:'auto',graphicsType:'auto',urlGraphics:'https://www.jewishmuseum.cz/lib/content/images/thickbox-graphics/',urlLanguages:'https://www.jewishmuseum.cz/lib/content/javascripts/old/languages/',navType:'both',navOverlayWidth:35,navOverlayPos:30,showNavOverlay:'always',showHints:'always',enableWrap:true,enableKeyboardNav:true,outsideClickCloses:true,showIndexLinks:true,showIndexThumbs:true,maxIndexCount:17,indexLinksPanel:'info',doAnimations:false,resizeDuration:3.5,imageFadeDuration:3.5,overlayFadeDuration:4,splitResize:'no',startAtClick:true,zoomImageStart:true,liveImageResize:false,slideInterval:4.5,endTask:'exit',showPlayPause:true,startPaused:false,pauseOnResize:true,pauseOnPrev:true,pauseOnNext:false};this.childOptions={overlayOpacity:45,resizeDuration:3,imageFadeDuration:3,overlayFadeDuration:0};this.init()}Floatbox.prototype={init:function(){this.win=top;this.doc=this.win.document;this.bod=this.doc.body;this.html=this.doc.documentElement;this.items=[];this.nodeNames=[];this.hiddenEls=[];this.timeouts={};this.pos={};this.setOptions(this.defaultOptions);if(typeof fbPageOptions==='object')this.setOptions(fbPageOptions);this.setOptions(this.parseOptionString(this.win.location.search.substring(1)));this.panelGap=22;this.infoLinkGap=16;this.showHintsTime=1600;this.zoomPopBorder=1;this.controlSpacing=8;this.minIndexWidth=120;this.ctrlJump=5;this.slowLoadDelay=750;this.loaderDelay=200;this.shadowSize=8;this.initialSize=100;this.slowZoomImg=this.urlGraphics+'loading_white.gif';this.slowLoadImg=this.urlGraphics+'loading_black.gif';this.iframeSrc=this.urlGraphics+'loading_iframe.html';this.resizeUpCursor=this.urlGraphics+'magnify_plus.cur';this.resizeDownCursor=this.urlGraphics+'magnify_minus.cur';this.notFoundImg=this.urlGraphics+'404.jpg';this.defaultWidth='85%';this.defaultHeight='82%';this.minInfoWidth=80;if(!(this.isChild=!!(this.win.floatbox&&this.win.floatbox.fbBox))){this.fbParent=this.lastChild=this;this.anchors=[];this.children=[];this.content={};this.preloads={};this.preloads.count=0;this.xhr=this.getXMLHttpRequest();this.strings={hintClose:'Konec (klávesa: Esc)',hintPrev:'Předcházející (klávesa: <--)',hintNext:'Další (klávesa: -->)',hintPlay:'Přehrát (klávesa: mezerník)',hintPause:'Pause (klávesa: mezerník)',hintResize:'Změna velikosti (klávesa: Tab)',imgCount:'Obrázek %1 z %2',nonImgCount:'Strana %1 z %2',mixedCount:'(%1 z %2)',infoText:'Informace...',printText:'Vytisknout...'}}else{this.anchors=fb.anchors;this.children=fb.children;this.content=fb.content;this.xhr=fb.xhr;this.strings=fb.strings;this.fbParent=fb.lastChild;if(this.fbParent.isSlideshow)this.fbParent.setPause(true);fb.lastChild=this;this.children.push(this)}this.mac=navigator.appVersion.indexOf('Macintosh')!==-1;if(window.opera){this.opera=true;this.operaOld=!document.getElementsByClassName;this.operaMac=this.mac}else if(document.all){this.ie=true;this.ieOld=parseInt(navigator.appVersion.substr(navigator.appVersion.indexOf('MSIE')+5),10)<7;this.ie8b2=window.postMessage&&navigator.appMinorVersion==='beta 2';this.ieXP=parseInt(navigator.appVersion.substr(navigator.appVersion.indexOf('Windows NT')+11),10)<6}else if(navigator.userAgent.indexOf('Firefox')!==-1){this.ff=true;this.ffOld=!document.getElementsByClassName;this.ffNew=!this.ffOld;this.ffMac=this.mac}else if(navigator.appVersion.indexOf('WebKit')!==-1){this.webkit=true;this.webkitNew=parseInt(navigator.appVersion.substr(navigator.appVersion.indexOf('WebKit')+7),10)>=500;this.webkitOld=!this.webkitNew;this.webkitMac=this.mac}this.browserLanguage=(navigator.language||navigator.userLanguage||navigator.systemLanguage||navigator.browserLanguage||'en').substring(0,2);if(!this.isChild){var lang=this.language==='auto'?this.browserLanguage:this.language;if(this.xhr){var that=this;this.xhr.getResponse(this.urlLanguages+lang+'.json.js',function(xhr){if((xhr.status===200||xhr.status===203||xhr.status===304)&&xhr.responseText){var text=xhr.responseText;if(that.ieXP){text=text.replace(String.fromCharCode(8592),'<--').replace(String.fromCharCode(8594),'-->')}try{var obj=eval('('+text+')');if(obj&&obj.hintClose)that.strings=obj}catch(e){}}})}}if(this.graphicsType.toLowerCase()==='english'||(this.graphicsType==='auto'&&this.browserLanguage==='en')){this.offPos='top left';this.onPos='bottom left'}else{this.offPos='top right';this.onPos='bottom right';this.controlSpacing=0}this.zIndex={base:90000+10*this.children.length,fbOverlay:1,fbBox:2,fbCanvas:3,fbMainDiv:4,fbLeftNav:5,fbRightNav:5,fbOverlayPrev:6,fbOverlayNext:6,fbResizer:7,fbZoomDiv:8,fbInfoPanel:8,fbControlPanel:8};var match=/\bautoStart=(.+?)(?:&|$)/i.exec(this.win.location.search);this.autoHref=match?match[1]:false},tagAnchors:function(baseEl){var that=this,doOutline=this.ieOld&&/^fb/.test(baseEl.id);function tag(tagName){var elements=baseEl.getElementsByTagName(tagName);for(var i=0,len=elements.length;i<len;i++){var el=elements[i];var elClass=el.getAttribute('class');elClass=elClass?elClass:el.getAttribute('className');if(elClass){for(var att in elClass){if(that.autoGallery&&that.fileType(el.href)==='img'&&att!=='nofloatbox'){el.setAttribute('className','floatbox.autoGallery');if(that.autoTitle&&!el.getAttribute('title'))el.setAttribute('title',that.autoTitle)}}}if(doOutline)el.setAttribute('hideFocus','true');that.tagOneAnchor(el)}}tag('a');tag('area')},tagOneAnchor:function(anchor){var that=this,isAnchor=!!anchor.getAttribute;if(isAnchor){var elClass=anchor.getAttribute('class');elClass=elClass?elClass:anchor.getAttribute('className');var relation=null;if(elClass){var classes=elClass.split(' ');for(var att in classes){if(/^(thickbox|gallery|iframe|slideshow|lytebox|lyteshow|lyteframe|lightbox)/i.test(classes[att])){relation=classes[att];break}}}var a={href:anchor.href||anchor.getAttribute('href'),rel:relation,rev:anchor.getAttribute('rev'),title:anchor.getAttribute('title'),anchor:anchor,thumb:this.getThumb(anchor)};var match;if(a.thumb&&(match=/(?:^|\s)fbPop(up|down)(?:\s|$)/i.exec(anchor.className))){a.popup=true;var up=(match[1]==='up');a.thumb.style.borderWidth=this.zoomPopBorder+'px';anchor.onmouseover=function(){a.thumb.style.display='none';var aPos=that.getLeftTop(this,true),aLeft=aPos.left,aTop=aPos.top;aPos=that.getLayout(this);a.thumb.style.display='';var relLeft=(aPos.width-a.thumb.offsetWidth)/2,relTop=up?2-a.thumb.offsetHeight:aPos.height,scroll=that.getScroll(),screenRight=scroll.left+that.getDisplayWidth();var spill=aPos.left+relLeft+a.thumb.offsetWidth-screenRight;if(spill>0)relLeft-=spill;var spill=aPos.left+relLeft-scroll.left;if(spill<0)relLeft-=spill;if(up){if(aPos.top+relTop<scroll.top)relTop=aPos.height}else{if(aPos.top+relTop+a.thumb.offsetHeight>scroll.top+that.getDisplayHeight())relTop=2-a.thumb.offsetHeight}a.thumb.style.left=(aLeft+relLeft)+'px';a.thumb.style.top=(aTop+relTop)+'px'};anchor.onmouseout=function(){a.thumb.style.left='-9999px';a.thumb.style.top='0'}}}else{var a=anchor}if(/^(thickbox|gallery|iframe|slideshow|lytebox|lyteshow|lyteframe|lightbox)/i.test(a.rel)){if(isAnchor){anchor.onclick=function(){fb.start(this);return false}}a.revOptions=this.parseOptionString(a.rev);a.level=this.children.length+(fb.lastChild.fbBox&&!a.revOptions.sameBox?1:0);var a_i,i=this.anchors.length;while(i--){a_i=this.anchors[i];if(a_i.href===a.href&&a_i.rel===a.rel&&a_i.rev===a.rev&&a_i.title===a.title&&a_i.level===a.level){a_i.anchor=anchor;break}}if(i===-1){var match=/\btype\s*[:=]\s*(\w+?)\b/i.exec(a.rev),revType=match?match[1].toLowerCase():'';a.type=revType||this.fileType(a.href);if(a.type==='flash'||a.type==='quicktime'){this.content[a.href]=this.objectHTML(a.href,a.type)}else if(a.type==='html'){var match=/#(\w+)/.exec(a.href);if(match){var doc=this.doc;if(a.anchor){doc=a.anchor.ownerDocument||a.anchor.document||doc}if(doc===this.doc&&this.currentItem&&this.currentItem.anchor){doc=this.currentItem.anchor.ownerDocument||this.currentItem.anchor.document||doc}var el=doc.getElementById(match[1]);if(el){a.type='inline';this.content[a.href]=el.cloneNode(true)}else{a.type='iframe'}}else{a.type='iframe'}}this.anchors.push(a);if(this.autoHref){if(a.revOptions.showThis!==false&&this.autoHref===a.href.substr(a.href.length-this.autoHref.length))this.autoStart=a}else{if(a.revOptions.autoStart)this.autoStart=a}}}return a},fileType:function(href){var s=href.toLowerCase(),i=s.indexOf('?');if(i!==-1)s=s.substr(0,i);s=s.substr(s.lastIndexOf('.')+1);if(/^(jpg|jpeg|png|gif|bmp)$/.test(s))return'img';if(s==='swf'||/^(http:)?\/\/(www.)?youtube.com\/v\//i.test(href))return'flash';if(/^(mov|mpg|mpeg|movie)$/.test(s))return'quicktime';return'html'},objectHTML:function(href,type){if(type==='flash'){var classid='classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"',mime='type="application/x-shockwave-flash"',pluginurl='http://get.adobe.com/flashplayer/',match=/\bwmode=(\w+?)\b/i.exec(href),wmode=match?match[1]:'window',match=/\bbgcolor=(#\w+?)\b/i.exec(href),bgcolor=match?match[1]:'',match=/\bscale=(\w+?)\b/i.exec(href),scale=match?match[1]:'exactfit',params={wmode:wmode,bgcolor:bgcolor,scale:scale,quality:'high',flashvars:'autoplay=1&amp;ap=true&amp;border=0&amp;rel=0'};if(this.ffOld)params.wmode=this.ffMac?'window':'opaque';if(this.ffNew&&href.indexOf('YV_YEP.swf')!==-1)params.wmode='window'}else{var classid='classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"',mime='type="video/quicktime"',pluginurl='http://www.apple.com/quicktime/download/',params={autoplay:'true',controller:'true',showlogo:'false',scale:'tofit'}}var html='<object id="fbObject" name="fbObject" width="%width%" height="%height%" ';if(this.ie){html+=classid+'>';params[type==='flash'?'movie':'src']=this.encodeHTML(href)}else{html+=mime+' data="'+this.encodeHTML(href)+'">'}for(var name in params){if(params.hasOwnProperty(name)){html+='<param name="'+name+'" value="'+params[name]+'" />'}}if(type==='quicktime'&&this.webkitMac){html+='<embed src="'+this.encodeHTML(href)+'" width="%width%" height="%height%" autoplay="true" controller="true" showlogo="false" scale="tofit" pluginspage="'+pluginurl+'"></embed></object>'}else{html+='<p style="color:#000; background:#fff; margin:1em; padding:1em;">'+(type==='flash'?'Flash':'QuickTime')+' player is required to view this content.'+'<br /><a href="'+pluginurl+'">download player</a></p></object>'}return html},preloadImages:function(href,chain){if(this!==fb)return fb.preloadImages(href,chain);var that=this;if(typeof chain!=='undefined')arguments.callee.chain=chain;if(!href&&arguments.callee.chain&&(this.preloadAll||!this.preloads.count)){for(var i=0,len=this.anchors.length;i<len;i++){var a=this.anchors[i];if(a.type==='img'&&!this.preloads[a.href]){href=a.href;break}}}if(href){if(this.preloads[href]){this.preloadImages()}else{var img=this.preloads[href]=new Image();img.onerror=function(){setTimeout(function(){that.preloadImages()},50);that.preloads[href]=true};img.onload=function(){that.preloads.count++;this.onerror()};img.src=href}}},start:function(anchor){if(this!==fb.lastChild)return fb.lastChild.start(anchor);var that=this;this.preloadImages('',false);if(anchor.getAttribute){var relation=null;var elClass=anchor.getAttribute('class');elClass=elClass?elClass:anchor.getAttribute('className');if(elClass){var classes=elClass.split(' ');for(var att in classes){if(/^(thickbox|gallery|iframe|slideshow|lytebox|lyteshow|lyteframe|lightbox)/i.test(classes[att])){relation=classes[att];break}}}var a={href:anchor.href||anchor.getAttribute('href'),rel:relation,rev:anchor.getAttribute('rev'),title:anchor.getAttribute('title')};a.revOptions=this.parseOptionString(a.rev);anchor.blur()}else{var a=anchor}this.isRestart=!!this.fbBox;if(this.isRestart){if(!a.revOptions.sameBox)return new Floatbox().start(anchor);this.setOptions(a.revOptions)}else{this.clickedAnchor=anchor.getAttribute?anchor:false}a.level=this.children.length+(fb.lastChild.fbBox&&!a.revOptions.sameBox?1:0);this.itemsShown=0;fb.previousAnchor=this.currentItem;this.buildItemArray(a);if(!this.itemCount)return;if(this.itemCount===1&&this.fbNavControls)this.fbNavControls.style.display='none';this.win.focus();this.revOptions=a.revOptions;if(!this.isRestart){this.getOptions();this.buildDOM();this.addEventHandlers();this.initState()}this.collapse();this.updatePanels();var fetchAndGo=function(){that.fetchContent(function(){that.clearTimeout('slowLoad');that.calcSize()})};if(this.fbBox.style.visibility||this.isRestart){fetchAndGo()}else{var offset=this.initialSize/2,size={id:'fbBox',left:that.pos.fbBox.left-offset,top:that.pos.fbBox.top-offset,width:that.initialSize,height:that.initialSize,borderWidth:that.outerBorder};if(this.splitResize){var oncomplete=function(){that.setSize(fetchAndGo,size)}}else{this.timeouts.slowLoad=setTimeout(function(){that.setSize(size)},this.slowLoadDelay);var oncomplete=fetchAndGo}this.fadeOpacity(this.fbOverlay,this.overlayOpacity,this.overlayFadeDuration,oncomplete)}},buildItemArray:function(a){this.itemCount=this.items.length=this.currentIndex=0;this.justImages=true;var isSingle=/^(thickbox|gallery|iframe|lytebox|lyteframe|lightbox)$/i.test(a.rel);for(var i=0,len=this.anchors.length;i<len;i++){var a_i=this.anchors[i];if(a_i.rel===a.rel&&a_i.level===a.level){if(a_i.revOptions.showThis!==false){var isMatch=a_i.rev===a.rev&&a_i.title===a.title&&a_i.href===a.href.substr(a.href.length-a_i.href.length);if(isMatch||!isSingle){a_i.seen=false;this.items.push(a_i);if(a_i.type!=='img')this.justImages=false;if(isMatch)this.currentIndex=this.items.length-1}}}}if(a.revOptions.showThis===false&&a.href){i=this.items.length;while(i--){var href=this.items[i].href;if(href===a.href.substr(a.href.length-href.length)){this.currentIndex=i}}}this.itemCount=this.items.length;this.currentItem=this.items[this.currentIndex]},getOptions:function(){if(this.isChild){for(var name in this.defaultOptions){if(this.defaultOptions.hasOwnProperty(name))this[name]=this.fbParent[name]}this.setOptions(this.childOptions)}else{this.setOptions(this.defaultOptions)}this.doSlideshow=this.loadPageOnClose=this.sameBox=false;if(!(this.isChild||this.fbBox)){if(typeof this.win.setFloatboxOptions==='function')this.win.setFloatboxOptions();if(typeof fbPageOptions==='object')this.setOptions(fbPageOptions);if(this.enableCookies){var match=/fbOptions=(.+?)(;|$)/.exec(this.doc.cookie);if(match)this.setOptions(this.parseOptionString(match[1]));var strOptions='';for(var name in this.defaultOptions){if(this.defaultOptions.hasOwnProperty(name)){strOptions+=' '+name+':'+this[name]}}var strPath='/';if(this.cookieScope==='folder'){strPath=this.win.location.pathname;strPath=strPath.substring(0,strPath.lastIndexOf('/')+1)}this.doc.cookie='fbOptions='+strOptions+'; path='+strPath}}this.setOptions(this.revOptions);this.setOptions(this.parseOptionString(this.win.location.search.substring(1)));if(this.theme==='grey')this.theme='white';if(this.endTask==='cont')this.endTask='loop';if(this.navType==='upper')this.navType='overlay';if(this.navType==='lower')this.navType='button';if(this.upperOpacity)this.controlOpacity=this.upperOpacity;if(this.upperNavWidth)this.navOverlayWidth=this.upperNavWidth;if(this.upperNavPos)this.navOverlayPos=this.upperNavPos;if(this.showUpperNav)this.showNavOverlay=this.showUpperNav;if(!/^(auto|black|white|blue|yellow|red|custom)$/.test(this.theme))this.theme='auto';if(!/^(overlay|button|both|none)$/i.test(this.navType))this.navType='button';if(!/^(auto|wh|hw)$/.test(this.splitResize))this.splitResize=false;if(this.webkitOld&&(this.navType==='overlay'||this.navType==='both')){this.navType='button'}if(this.itemCount>1){this.isSlideshow=this.doSlideshow||/^(slideshow|lyteshow)/i.test(this.currentItem.rel);var overlayRequest=/overlay|both/i.test(this.navType),buttonRequest=/button|both/i.test(this.navType);this.navOverlay=this.justImages&&overlayRequest;this.navButton=buttonRequest||(!this.justImages&&overlayRequest)}else{this.isSlideshow=this.navOverlay=this.navButton=this.showItemNumber=this.showIndexLinks=false}this.isPaused=this.startPaused;if((this.lclTheme=this.theme)==='auto'){this.lclTheme=this.currentItem.type==='img'?'black':/flash|quicktime/.test(this.currentItem.type)?'blue':'white'}if(!this.doAnimations){this.resizeDuration=this.imageFadeDuration=this.overlayFadeDuration=0}if(!this.resizeDuration)this.zoomImageStart=false;this.infoTop=this.infoCorner.charAt(0)==='t';this.infoLeft=this.infoCorner.charAt(1)!=='r';this.controlTop=this.controlCorner.charAt(0)==='t';this.controlLeft=this.controlCorner.charAt(1)==='l';if(this.infoLeft===this.controlLeft&&this.infoTop===this.controlTop){this.infoLeft=true;this.controlLeft=false}if(this.indexLinksPanel==='info'){this.indexLeft=this.infoLeft;this.indexTop=this.infoTop}else{this.indexLeft=this.controlLeft;this.indexTop=this.controlTop}if(this.opera||(this.mac&&!this.webkitNew)){this.resizeTool='topleft'}else{this.resizeTool=this.resizeTool.toLowerCase();if(!/topleft|cursor|both/.test(this.resizeTool))this.resizeTool='cursor'}if(this.ieOld)this.dropShadow=false;this.overlayOpacity/=100;this.controlOpacity/=100},parseOptionString:function(str){if(!str)return{};var quotes=[],match,rex=/`([^`]*?)`/g;while((match=rex.exec(str)))quotes.push(match[1]);if(quotes.length)str=str.replace(rex,'``');str=str.replace(/\s*[:=]\s*/g,':');str=str.replace(/\s*[;&]\s*/g,' ');str=str.replace(/^\s+|\s+$/g,'');var pairs={},aVars=str.split(' '),i=aVars.length;while(i--){var aThisVar=aVars[i].split(':'),name=aThisVar[0],value=aThisVar[1];if(typeof value==='string'){if(!isNaN(value))value=+value;else if(value==='true')value=true;else if(value==='false')value=false}if(value==='``')value=quotes.pop()||'';pairs[name]=value}return pairs},setOptions:function(pairs){for(var name in pairs){if(pairs.hasOwnProperty(name))this[name]=pairs[name]}},buildDOM:function(){this.fbOverlay=this.newNode('div','fbOverlay',this.bod);this.fbZoomDiv=this.newNode('div','fbZoomDiv',this.bod);this.fbZoomImg=this.newNode('img','fbZoomImg',this.fbZoomDiv);this.fbBox=this.newNode('div','fbBox');this.fbShadowRight=this.newNode('div','fbShadowRight',this.fbBox);this.fbShadowBottom=this.newNode('div','fbShadowBottom',this.fbBox);this.fbShadowCorner=this.newNode('div','fbShadowCorner',this.fbBox);this.fbLoader=this.newNode('div','fbLoader',this.fbBox);this.fbCanvas=this.newNode('div','fbCanvas',this.fbBox);this.fbMainDiv=this.newNode('div','fbMainDiv',this.fbCanvas);this.fbLeftNav=this.newNode('a','fbLeftNav',this.fbMainDiv);this.fbRightNav=this.newNode('a','fbRightNav',this.fbMainDiv);this.fbOverlayPrev=this.newNode('a','fbOverlayPrev',this.fbMainDiv,this.strings.hintPrev);this.fbOverlayNext=this.newNode('a','fbOverlayNext',this.fbMainDiv,this.strings.hintNext);this.fbInfoPanel=this.newNode('div','fbInfoPanel',this.fbCanvas);this.fbCaptionDiv=this.newNode('div','fbCaptionDiv',this.fbInfoPanel);this.fbCaption=this.newNode('span','fbCaption',this.fbCaptionDiv);this.fbInfoLink=this.newNode('span','fbInfoLink',this.fbInfoPanel);this.fbPrintLink=this.newNode('span','fbPrintLink',this.fbInfoPanel);this.fbItemNumber=this.newNode('span','fbItemNumber',this.fbInfoPanel);this.fbControlPanel=this.newNode('div','fbControlPanel',this.fbCanvas);this.fbClose=this.newNode('a','fbClose',this.fbControlPanel,this.strings.hintClose);this.fbResizer=this.newNode('a','fbResizer',this.fbControlPanel,this.strings.hintResize);this.fbControls=this.newNode('div','fbControls',this.fbControlPanel);this.fbNavControls=this.newNode('div','fbNavControls',this.fbControls);this.fbPrev=this.newNode('a','fbPrev',this.fbNavControls,this.strings.hintPrev);this.fbNext=this.newNode('a','fbNext',this.fbNavControls,this.strings.hintNext);this.fbSubControls=this.newNode('div','fbSubControls',this.fbControls);this.fbPlayPause=this.newNode('div','fbPlayPause',this.fbSubControls);this.fbPlay=this.newNode('a','fbPlay',this.fbPlayPause,this.strings.hintPlay);this.fbPause=this.newNode('a','fbPause',this.fbPlayPause,this.strings.hintPause);this.fbIndexLinks=this.newNode('span','fbIndexLinks',this.indexLinksPanel==='info'?this.fbInfoPanel:this.fbControlPanel);this.bod.appendChild(this.fbBox)},newNode:function(nodeType,id,parentNode,title){if(this[id]&&this[id].parentNode){this[id].parentNode.removeChild(this[id])}var node=this.doc.createElement(nodeType);node.id=id;node.className=id+'_'+this.lclTheme;if(nodeType==='a'){if(!this.operaOld)node.setAttribute('href','');if(this.ieOld)node.setAttribute('hideFocus','true');node.style.outline='none'}else if(nodeType==='iframe'){node.setAttribute('scrolling',this.itemScroll);node.setAttribute('frameBorder','0');node.setAttribute('align','middle');node.src=this.iframeSrc}if(this.isChild)title=this.fbParent[id].getAttribute('title');if(title&&this.showHints!=='never')node.setAttribute('title',title);if(this.zIndex[id])node.style.zIndex=this.zIndex.base+this.zIndex[id];node.style.display='none';if(parentNode)parentNode.appendChild(node);this.nodeNames.push(id);return node},addEventHandlers:function(){var that=this,leftNav=this.fbLeftNav.style,rightNav=this.fbRightNav.style,overlayPrev=this.fbOverlayPrev.style,overlayNext=this.fbOverlayNext.style,prev=this.fbPrev.style,next=this.fbNext.style;if(this.showHints==='once'){this.hideHint=function(id){if(that[id].title){that.timeouts[id]=setTimeout(function(){that[id].title=that.fbParent[id].title='';var id2='';if(/fbOverlay(Prev|Next)/.test(id)){id2=id.replace('Overlay','')}else if(/fb(Prev|Next)/.test(id)){id2=id.replace('fb','fbOverlay')}if(id2)that[id2].title=that.fbParent[id2].title=''},that.showHintsTime)}}}else{this.hideHint=function(){}}this.fbPlay.onclick=function(){that.setPause(false);return false};this.fbPause.onclick=function(){that.setPause(true);return false};this.fbClose.onclick=function(){that.end();return false};if(this.outsideClickCloses){this.fbOverlay.onclick=function(){that.end();return false}}this.fbPrev.onclick=function(step){if(typeof step!=='number')step=1;var newIndex=(that.currentIndex-step)%that.itemCount;if(newIndex<0)newIndex+=that.itemCount;if(that.enableWrap||newIndex<that.currentIndex){that.newContent(newIndex);if(that.isSlideshow&&that.pauseOnPrev&&!that.isPaused){that.setPause(true)}}return false};this.fbNext.onclick=function(step){if(typeof step!=='number')step=1;var newIndex=(that.currentIndex+step)%that.itemCount;if(that.enableWrap||newIndex>that.currentIndex){that.newContent(newIndex);if(that.isSlideshow&&that.pauseOnNext&&!that.isPaused){that.setPause(true)}}return false};this.fbLeftNav.onclick=this.fbOverlayPrev.onclick=this.fbPrev.onclick;this.fbRightNav.onclick=this.fbOverlayNext.onclick=this.fbNext.onclick;this.fbLeftNav.onmouseover=this.fbLeftNav.onmousemove=this.fbOverlayPrev.onmousemove=function(){if(!that.timeouts.fbCanvas)overlayPrev.visibility='';if(that.navButton)prev.backgroundPosition=that.onPos;return true};this.fbRightNav.onmouseover=this.fbRightNav.onmousemove=this.fbOverlayNext.onmousemove=function(){if(!that.timeouts.fbCanvas)overlayNext.visibility='';if(that.navButton)next.backgroundPosition=that.onPos;return true};this.fbOverlayPrev.onmouseover=this.fbOverlayNext.onmouseover=function(){this.onmousemove();that.hideHint(this.id);return true};this.fbLeftNav.onmouseout=function(){overlayPrev.visibility='hidden';if(that.navButton)prev.backgroundPosition=that.offPos};this.fbRightNav.onmouseout=function(){overlayNext.visibility='hidden';if(that.navButton)next.backgroundPosition=that.offPos};this.fbOverlayPrev.onmouseout=this.fbOverlayNext.onmouseout=function(){this.style.visibility='hidden';that.clearTimeout(this.id)};this.fbLeftNav.onmousedown=this.fbRightNav.onmousedown=function(e){e=e||that.win.event;if(e.button===2){leftNav.visibility=rightNav.visibility='hidden';that.timeouts.hideNavOverlay=setTimeout(function(){leftNav.visibility=rightNav.visibility=''},600)}};this.fbPlay.onmouseover=this.fbPause.onmouseover=this.fbClose.onmouseover=this.fbPrev.onmouseover=this.fbNext.onmouseover=function(){this.style.backgroundPosition=that.onPos;that.hideHint(this.id);return true};this.fbResizer.onmouseover=function(){that.hideHint(this.id);return true};this.fbPlay.onmouseout=this.fbPause.onmouseout=this.fbClose.onmouseout=this.fbPrev.onmouseout=this.fbNext.onmouseout=function(){this.style.backgroundPosition=that.offPos;that.clearTimeout(this.id)};this.fbResizer.onmouseout=function(){that.clearTimeout(this.id)};if(this.enableKeyboardNav){if(!this.keydownSet){this.priorOnkeydown=this.doc.onkeydown;this.doc.onkeydown=this.keyboardAction();this.keydownSet=true}}else if(this.keydownSet){this.doc.onkeydown=this.priorOnkeydown;this.keydownSet=false}if(this.opera&&!this.keypressSet){this.priorOnkeypress=this.doc.onkeypress;this.doc.onkeypress=function(){return false};this.keypressSet=true}if(this.enableDrag)this.fbBox.onmousedown=this.dragonDrop()},keyboardAction:function(){var that=this;return function(e){e=e||that.win.event;var keyCode=e.keyCode||e.which;switch(keyCode){case 37:case 39:if(that.itemCount>1){that[keyCode===37?'fbPrev':'fbNext'].onclick((e.ctrlKey||e.metaKey)?that.ctrlJump:1);if(that.showHints==='once'){that.fbPrev.title=that.fbNext.title=that.fbOverlayPrev.title=that.fbOverlayNext.title=''}}return false;case 32:if(that.isSlideshow){that.setPause(!that.isPaused);if(that.showHints==='once')that.fbPlay.title=that.fbPause.title=''}return false;case 9:if(that.fbResizer.onclick){that.fbResizer.onclick();if(that.showHints==='once')that.fbResizer.title=''}return false;case 27:if(that.showHints==='once')that.fbClose.title='';that.end();return false;case 13:return false}}},dragonDrop:function(){var that=this,fbBox=this.fbBox;return function(e){e=e||that.win.event;if(/fb(Box|Canvas|Info|Caption|Item|Control|Index)/.test((e.target||e.srcElement).id)){var startX=e.clientX,startY=e.clientY,box=that.fbBox.style,content=that.fbContent.style,pos=that.pos.fbBox,boxX=pos.left,boxY=pos.top;pos.dx=pos.dy=0;var moveHandler=function(e){if(that.currentItem.type==='iframe'&&!(that.ie||that.opera)&&!content.visibility)content.visibility='hidden';if(that.isSlideshow&&!that.isPaused)that.setPause(true);e=e||that.win.event;pos.dx=e.clientX-startX;pos.dy=e.clientY-startY;box.left=(boxX+pos.dx)+'px';box.top=(boxY+pos.dy)+'px';(e.stopPropagation&&e.stopPropagation())||(e.cancelBubble=true);that.clearTimeout('dragonDrop');that.timeouts.dragonDrop=setTimeout(upHandler,1500);return false};var upHandler=function(e){that.clearTimeout('dragonDrop');e=e||that.win.event;if(that.doc.removeEventListener){that.doc.removeEventListener("mouseup",upHandler,true);that.doc.removeEventListener("mousemove",moveHandler,true)}else if(fbBox.detachEvent){fbBox.detachEvent("onlosecapture",upHandler);fbBox.detachEvent("onmouseup",upHandler);fbBox.detachEvent("onmousemove",moveHandler);fbBox.releaseCapture()}if(e)(e.stopPropagation&&e.stopPropagation())||(e.cancelBubble=true);pos.left+=pos.dx;pos.top+=pos.dy;content.visibility='';return false};if(that.doc.addEventListener){that.doc.addEventListener("mousemove",moveHandler,true);that.doc.addEventListener("mouseup",upHandler,true)}else if(fbBox.attachEvent){fbBox.setCapture();fbBox.attachEvent("onmousemove",moveHandler);fbBox.attachEvent("onmouseup",upHandler);fbBox.attachEvent("onlosecapture",upHandler)}return false}}},initState:function(){var that=this,box=this.fbBox.style,mainDiv=this.fbMainDiv.style,resizer=this.fbResizer.style,canvas=this.fbCanvas.style,zoomDiv=this.fbZoomDiv.style,zoomImg=this.fbZoomImg.style;if(this.currentItem.popup)this.currentItem.anchor.onmouseover();var anchorPos=this.getAnchorPos(this.clickedAnchor,this.currentItem.anchor===this.clickedAnchor&&this.currentItem.type==='img');if(anchorPos.width){this.pos.fbZoomDiv=anchorPos;zoomDiv.borderWidth=this.zoomPopBorder+'px';zoomDiv.left=(anchorPos.left-this.zoomPopBorder)+'px';zoomDiv.top=(anchorPos.top-this.zoomPopBorder)+'px';zoomDiv.width=(this.fbZoomImg.width=anchorPos.width)+'px';zoomDiv.height=(this.fbZoomImg.height=anchorPos.height)+'px';this.fbZoomImg.src=anchorPos.src;box.visibility='hidden';this.timeouts.slowLoad=setTimeout(function(){that.fbZoomImg.src=that.slowZoomImg;zoomDiv.display=zoomImg.display=''},this.slowLoadDelay)}else{this.pos.fbBox=anchorPos;this.pos.fbBox.borderWidth=0;this.pos.fbMainDiv={width:0,height:0}}box.position='absolute';box.left=box.top=box.width=box.height=box.borderWidth='0';mainDiv.borderWidth=this.innerBorder+'px';mainDiv.left=this.padding+'px';this.fbInfoPanel.style[this.infoLeft?'left':'right']=this.fbControlPanel.style[this.controlLeft?'left':'right']=Math.max(this.padding,this.panelPadding)+'px';canvas.visibility='hidden';box.display=canvas.display='';if(this.dropShadow){var shadowRight=this.fbShadowRight.style,shadowBottom=this.fbShadowBottom.style,shadowCorner=this.fbShadowCorner.style;shadowRight.paddingBottom=shadowBottom.paddingRight=this.outerBorder*2+'px';shadowRight.paddingRight=shadowBottom.paddingBottom=shadowCorner.paddingRight=shadowCorner.paddingBottom=(this.outerBorder+this.shadowSize)+'px';shadowRight.top=shadowBottom.left=-this.outerBorder+'px'}if(this.navOverlay){if(fb.showNavOverlay==='never'||(fb.showNavOverlay==='once'&&fb.navOverlayShown)){fb.showNavOverlay=false}else{this.fbOverlayPrev.style.backgroundPosition=this.fbOverlayNext.style.backgroundPosition=this.onPos;this.fadeOpacity(this.fbOverlayPrev,this.controlOpacity);this.fadeOpacity(this.fbOverlayNext,this.controlOpacity)}}this.initPanels();this.lastShown=false;if(this.hideFlash)this.hideElements('flash');if(this.hideJava)this.hideElements('applet');if(this.ieOld){this.hideElements('select');this.fbOverlay.style.position='absolute';this.stretchOverlay()();this.win.attachEvent('onresize',this.stretchOverlay());this.win.attachEvent('onscroll',this.stretchOverlay())}},getAnchorPos:function(anchor,useThumb){var display=this.getDisplaySize(),scroll=this.getScroll(),noAnchorPos={left:display.width/2+scroll.left,top:display.height/3+scroll.top,width:0,height:0};var thumb=useThumb?this.getThumb(anchor):false;if(thumb&&this.zoomImageStart){var pos=this.getLeftTop(thumb),border=(thumb.offsetWidth-thumb.width)/2;pos.left+=border;pos.top+=border;pos.width=thumb.width;pos.height=thumb.height;pos.src=thumb.src}else if(this.startAtClick&&anchor&&anchor.offsetWidth&&anchor.tagName.toLowerCase()==='a'){var pos=this.getLayout(thumb||anchor)}else{return noAnchorPos}var centerPos={left:pos.left+pos.width/2,top:pos.top+pos.height/2,width:0,height:0};if(centerPos.left<scroll.left||centerPos.left>(scroll.left+display.width)||centerPos.top<scroll.top||centerPos.top>(scroll.top+display.height)){return noAnchorPos}return(thumb&&this.zoomImageStart?pos:centerPos)},getThumb:function(anchor){var nodes=anchor&&anchor.childNodes,i=(nodes&&nodes.length)||0;while(i--){if((nodes[i].tagName||'').toLowerCase()==='img')return nodes[i]}return false},initPanels:function(){var infoPanel=this.fbInfoPanel.style,infoLink=this.fbInfoLink.style,printLink=this.fbPrintLink.style;if(this.infoLeft){var infoPos=' posLeft';infoPanel.textAlign='left';infoLink.paddingRight=printLink.paddingRight=this.infoLinkGap+'px'}else{var infoPos=' posRight';infoPanel.textAlign='right';infoLink.paddingLeft=printLink.paddingLeft=this.infoLinkGap+'px'}this.fbInfoPanel.className+=infoPos;this.fbInfoLink.className+=infoPos;this.fbPrintLink.className+=infoPos;this.fbItemNumber.className+=infoPos;infoPanel.width='400px';var controlPanel=this.fbControlPanel.style,controls=this.fbControls.style,subControls=this.fbSubControls.style;var indexLinks=this.fbIndexLinks.style;if(this.controlLeft){var controlPos=' posLeft';controlPanel.textAlign='left'}else{var controlPos=' posRight';controlPanel.textAlign='right'}this.fbControlPanel.className+=controlPos;this.fbSubControls.className+=controlPos;this.fbControls.className+=controlPos;if(this.navButton){var prev=this.fbPrev.style,next=this.fbNext.style,navControls=this.fbNavControls.style;prev.backgroundPosition=next.backgroundPosition=this.offPos;navControls['padding'+(this.controlLeft?'Left':'Right')]=this.controlSpacing+'px';this.fbNavControls.className+=controlPos;controlPanel.display=navControls.display=prev.display=next.display=''}var width=0;if(this.showClose){var close=this.fbClose.style;close.backgroundPosition=this.offPos;this.fbClose.className+=controlPos;controlPanel.display=controls.display=subControls.display=close.display='';width=this.fbClose.offsetWidth}if(this.showPlayPause&&this.isSlideshow){var play=this.fbPlay.style,pause=this.fbPause.style,playPause=this.fbPlayPause.style;play.backgroundPosition=pause.backgroundPosition=this.offPos;playPause['padding'+(this.controlLeft?'Left':'Right')]=this.controlSpacing+'px';this.fbPlayPause.className+=controlPos;controlPanel.display=controls.display=subControls.display=playPause.display=play.display=pause.display='';play.left=this.isPaused?'':'-9999px';pause.left=this.isPaused?'-9999px':'';width+=this.fbPlayPause.offsetWidth}subControls.width=width+'px';controls.width=(width+this.fbNavControls.offsetWidth)+'px';if(this.showIndexLinks){var indexLinks=this.fbIndexLinks.style;if(this.indexLinksPanel==='info'){this.fbIndexLinks.className+=infoPos;infoPanel.display='';if(this.showIndexThumbs)infoPanel.overflow='visible'}else{this.fbIndexLinks.className+=controlPos;controlPanel.display='';if(this.showIndexThumbs)controlPanel.overflow='visible'}if(this.indexLinksPanel!=='info')indexLinks['padding'+(this.indexLeft?'Left':'Right')]='2px';indexLinks.width='250px';indexLinks.display=''}},fetchContent:function(callback,phase){var that=this;if(!phase){if(this.fbContent){this.fbMainDiv.removeChild(this.fbContent);delete this.fbContent;return this.timeouts.fetch=setTimeout(function(){that.fetchContent(callback,1)},10)}}var item=this.currentItem;item.nativeWidth=item.revOptions.width;item.nativeHeight=item.revOptions.height;if(item.type!=='img'){item.nativeWidth=item.nativeWidth||(fb.previousAnchor&&fb.previousAnchor.nativeWidth)||this.defaultWidth;item.nativeHeight=item.nativeHeight||(fb.previousAnchor&&fb.previousAnchor.nativeHeight)||this.defaultHeight}this.itemScroll=item.revOptions.scroll||item.revOptions.scrolling||'auto';if(/img|iframe/.test(item.type)){this.fbContent=this.newNode(item.type,'fbContent',this.fbMainDiv);if(item.type==='img'){var loader=new Image();loader.onload=function(){item.nativeWidth=item.nativeWidth||loader.width;item.nativeHeight=item.nativeHeight||loader.height;that.fbContent.src=loader.src;if(callback)callback()};loader.onerror=function(){if(this.src!==that.notFoundImg)this.src=that.notFoundImg};loader.src=item.href}}else{this.fbContent=this.newNode('div','fbContent',this.fbMainDiv);this.fbContent.style.overflow=this.itemScroll==='yes'?'scroll':(this.itemScroll==='no'?'hidden':'auto');var contents=this.content[item.href];if(item.type==='inline'){var el=contents.cloneNode(true);el.style.display=el.style.visibility='';try{this.fbContent.appendChild(el)}catch(e){this.setInnerHTML(this.fbContent,el.innerHTML)}this.tagAnchors(this.fbContent)}else if(item.type==='ajax'){this.xhr.getResponse(item.href,function(xhr){if((xhr.status===200||xhr.status===203||xhr.status===304)&&xhr.responseText){that.setInnerHTML(that.fbContent,xhr.responseText);that.tagAnchors(that.fbContent)}else{that.setInnerHTML(that.fbContent,'<p style="color:#000; background:#fff; margin:1em; padding:1em;">'+'Unable to fetch content from '+item.href+'</p>')}})}}this.fbContent.style.border='0';this.fbContent.style.display='';if(item.type!=='img'&&callback)callback()},updatePanels:function(){var infoPanel=this.fbInfoPanel.style,captionDiv=this.fbCaptionDiv.style,caption=this.fbCaption.style,infoLink=this.fbInfoLink.style,printLink=this.fbPrintLink.style,itemNumber=this.fbItemNumber.style,item=this.currentItem,str;infoPanel.display=captionDiv.display=caption.display=infoLink.display=printLink.display=itemNumber.display='none';if(this.showCaption){str=item.revOptions.caption||item.title||'';if(str==='href')str=this.currentItem.href;str=this.decodeHTML(str);if(this.setInnerHTML(this.fbCaption,str)&&str)infoPanel.display=captionDiv.display=caption.display=''}if(item.revOptions.info){str=this.encodeHTML(this.decodeHTML(item.revOptions.info));var options=item.revOptions.infoOptions||'';if(options)options=this.encodeHTML(this.decodeHTML(options));str='<a href="'+str+'" class="thickbox" rev="'+options+'"><b>'+(item.revOptions.infoText||this.strings.infoText)+'</b></a>';if(this.setInnerHTML(this.fbInfoLink,str))infoPanel.display=infoLink.display=''}if(this.showPrint){var css=this.printCSS||'';str='<a href="'+this.encodeHTML(this.currentItem.href)+'" onclick="fb.printContents(null, \''+css+'\'); return false;"><b>'+(item.revOptions.printText||this.strings.printText)+'</b></a>';if(this.setInnerHTML(this.fbPrintLink,str))infoPanel.display=printLink.display=''}if(this.showItemNumber){str=this.justImages?this.strings.imgCount:this.strings.nonImgCount;str=str.replace('%1',this.currentIndex+1);str=str.replace('%2',this.itemCount);if(this.setInnerHTML(this.fbItemNumber,str))infoPanel.display=itemNumber.display=''}if(this.showIndexLinks){str='';var max=this.itemCount-1,loRange,hiRange;if(!this.maxIndexCount){loRange=0;hiRange=max}else{var range=Math.floor(this.maxIndexCount/2)-1;loRange=this.currentIndex-range;hiRange=this.currentIndex+range;if(loRange<=0)hiRange+=Math.min(1-loRange,range);if(this.currentIndex===0)hiRange++;if(hiRange-max>=0)loRange-=Math.min(1+hiRange-max,range);if(this.currentIndex===max)loRange--}var pos=this.indexTop?'down':'up',i=0;while(i<this.itemCount){if(i!==0&&i<loRange){str+='... ';i=loRange}else if(i!==max&&i>hiRange){str+='... ';i=max}else{if(i!==this.currentIndex){var item=this.items[i];str+='<a class="fbPop'+pos+' nothickbox" href="'+item.href+'" onclick="fb.newContent('+i+');return false;">'+ ++i;if(this.showIndexThumbs&&item.thumb){str+='<img src="'+item.thumb.src+'" />'}str+='</a> '}else{str+=++i+' '}}}if(this.setInnerHTML(this.fbIndexLinks,str))this.tagAnchors(this.fbIndexLinks)}if(!infoPanel.display)this.tagAnchors(this.fbInfoPanel)},calcSize:function(fit,pass){var that=this;if(!this.fbBox)return;var boxX,boxY,boxW,boxH,mainW,mainH;if(typeof fit==='undefined'){fit=this.currentItem.type==='img'?this.autoSizeImages:this.autoSizeOther}var box=this.fbBox.style,infoPanel=this.fbInfoPanel.style,indexLinks=this.fbIndexLinks.style,captionDiv=this.fbCaptionDiv.style,itemNumber=this.fbItemNumber.style;if(!pass){this.displaySize=this.getDisplaySize();if(this.showCaption&&this.fbCaption.innerHTML)captionDiv.display='';if(this.showItemNumber)itemNumber.display=''}this.upperSpace=Math.max(this.infoTop?this.fbInfoPanel.offsetHeight:0,this.controlTop?this.fbControlPanel.offsetHeight:0);this.lowerSpace=Math.max(this.infoTop?0:this.fbInfoPanel.offsetHeight,this.controlTop?0:this.fbControlPanel.offsetHeight);if(this.upperSpace)this.upperSpace+=2*this.panelPadding;if(this.lowerSpace)this.lowerSpace+=2*this.panelPadding;this.upperSpace=Math.max(this.upperSpace,this.padding);this.lowerSpace=Math.max(this.lowerSpace,this.padding);var frame=2*(this.outerBorder+this.innerBorder+this.shadowSize),maxW=this.displaySize.width-frame-2*this.padding,maxH=this.displaySize.height-frame-this.upperSpace-this.lowerSpace,hardW=false,hardH=false;mainW=this.currentItem.nativeWidth+'';if(mainW==='max'){mainW=maxW}else if(mainW.substr(mainW.length-1)==='%'){mainW=Math.floor((maxW+2*this.shadowSize)*parseInt(mainW,10)/100)}else{mainW=parseInt(mainW,10);hardW=true}mainH=this.currentItem.nativeHeight+'';if(mainH==='max'){mainH=maxH}else if(mainH.substr(mainH.length-1)==='%'){mainH=Math.floor((maxH+2*this.shadowSize)*parseInt(mainH,10)/100)}else{mainH=parseInt(mainH,10);hardH=true}this.scaledBy=this.oversizedBy=0;if(fit){var scaleW=maxW/mainW,scaleH=maxH/mainH,w=mainW,h=mainH;if(hardW&&hardH)scaleW=scaleH=Math.min(scaleW,scaleH);if(scaleW<1)mainW=Math.round(mainW*scaleW);if(scaleH<1)mainH=Math.round(mainH*scaleH);this.scaledBy=Math.max(w-mainW,h-mainH);if(this.scaledBy&&this.scaledBy<this.outerBorder+2*this.shadowSize+this.panelPadding){mainW=w;mainH=h;this.scaledBy=0}}boxW=mainW+2*(this.innerBorder+this.padding);boxH=mainH+2*this.innerBorder+this.upperSpace+this.lowerSpace;var infoW=boxW-2*Math.max(this.padding,this.panelPadding);if(this.infoTop===this.controlTop&&this.fbControls.offsetWidth){infoW-=this.fbControls.offsetWidth+this.panelGap}if(infoW<0)infoW=0;if(this.indexLinksPanel==='info'){var indexW=infoW}else{var infoUsed=Math.max(this.fbCaption.offsetWidth,this.fbInfoLink.offsetWidth+this.fbPrintLink.offsetWidth+this.fbItemNumber.offsetWidth);var indexW=Math.max(this.minIndexWidth,this.fbControls.offsetWidth,(boxW-infoUsed-2*Math.max(this.padding,this.panelPadding)));if(infoUsed)indexW-=this.panelGap}var infoH=this.fbInfoPanel.offsetHeight,indexH=this.fbIndexLinks.offsetHeight;infoPanel.width=infoW+'px';indexLinks.width=indexW+'px';var changed=this.fbInfoPanel.offsetHeight!==infoH||this.fbIndexLinks.offsetHeight!==indexH;if(this.showCaption){if(this.minInfoWidth>infoW&&!captionDiv.display){captionDiv.display='none';changed=true}}if(this.showItemNumber){if(this.fbInfoLink.offsetWidth+this.fbPrintLink.offsetWidth+this.fbItemNumber.offsetWidth>infoW&&!itemNumber.display){itemNumber.display='none';changed=true}}if(changed&&pass!==3)return this.calcSize(fit,(pass||0)+1);if(!fit)this.oversizedBy=Math.max(boxW-this.displaySize.width,boxH-this.displaySize.height)+2*this.outerBorder+this.shadowSize;if(this.oversizedBy<0)this.oversizedBy=0;if(typeof this.positionLeft==='number'){boxX=this.positionLeft}else{var freeSpace=this.displaySize.width-boxW-2*this.outerBorder;boxX=freeSpace<=0?0:Math.floor(freeSpace/2);if(typeof this.positionLeft==='string'&&this.positionLeft.substr(this.positionLeft.length-1)==='%'){boxX+=parseInt(this.positionLeft,10)/100*boxX}}if(typeof this.positionTop==='number'){boxY=this.positionTop}else{var freeSpace=this.displaySize.height-boxH-2*this.outerBorder,ratio=freeSpace/this.displaySize.height,factor;if(ratio<=0.15){factor=2}else if(ratio>=0.3){factor=3}else{factor=1+ratio/0.15}boxY=freeSpace<=0?0:Math.floor(freeSpace/factor);if(typeof this.positionTop==='string'&&this.positionTop.substr(this.positionTop.length-1)==='%'){boxY+=parseInt(this.positionTop,10)/100*boxY}}var boxPosition=box.position;if(this.ieOld){box.display='none';this.stretchOverlay()()}else{this.setPosition(this.fbBox,'fixed')}var scroll=this.getScroll();this.setPosition(this.fbBox,boxPosition);box.display='';boxX+=scroll.left;boxY+=scroll.top;if(this.isChild){var rex=/max|%/i,pos=this.fbParent.pos.fbBox,childX=rex.test(this.currentItem.nativeWidth)?99999:(pos.left+boxX)/2,childY=rex.test(this.currentItem.nativeHeight)?99999:(pos.top+boxY)/2;if(scroll.left<childX&&scroll.top<childY){boxX=Math.min(boxX,childX);boxY=Math.min(boxY,childY)}}var split=(pos=this.pos.fbBox)&&!this.liveResize&&this.splitResize;if(split==='auto')split=boxW-pos.width<=boxH-pos.height?'wh':'hw';var oncomplete=function(){that.fbBox.style.visibility?that.zoomIn():that.showContent()};var setSize=function(){that.setSize(split,{id:'fbBox',left:boxX,top:boxY,width:boxW,height:boxH,borderWidth:that.outerBorder},{id:'fbMainDiv',width:mainW,height:mainH,top:that.upperSpace},function(){that.timeouts.showContent=setTimeout(oncomplete,10)})};this.timeouts.setSize=setTimeout(setSize,10)},setPosition:function(el,position){if(el.style.position===position)return;var scroll=this.getScroll();if(position==='fixed'){scroll.left=-scroll.left;scroll.top=-scroll.top}if(this.pos[el.id]){this.pos[el.id].left+=scroll.left;this.pos[el.id].top+=scroll.top}el.style.left=(el.offsetLeft+scroll.left)+'px';el.style.top=(el.offsetTop+scroll.top)+'px';el.style.position=position},collapse:function(callback,phase){var that=this;if(!phase){this.setPosition(this.fbBox,'absolute');this.fbResizer.onclick=null;this.fbResizer.style.display='none';if(this.fbContent){this.fbContent.onclick=null;this.fbContent.style.cursor=''}if(this.navOverlay){this.fbLeftNav.style.display=this.fbRightNav.style.display=this.fbOverlayPrev.style.display=this.fbOverlayNext.style.display='none'}var opacity=0,duration=0;if(this.currentItem.type==='img'&&!this.fbCanvas.style.visibility){if(this.currentItem===this.lastShown&&this.liveImageResize)opacity=1;duration=this.imageFadeDuration}this.liveResize=(opacity===1);var oncomplete=function(){that.collapse(callback,1)};return this.fadeOpacity(this.fbCanvas,opacity,duration,oncomplete)}if(!this.liveResize){this.fbMainDiv.style.display='none';this.clearTimeout('loader');this.timeouts.loader=setTimeout(function(){that.fbLoader.style.display=''},this.loaderDelay)}var infoPanel=this.fbInfoPanel.style,controlPanel=this.fbControlPanel.style;infoPanel.visibility=controlPanel.visibility='hidden';infoPanel.left=controlPanel.left='-9999px';if(callback)callback()},restore:function(callback,phase){var that=this;if(!phase){if(this.fbShadowRight.style.display&&this.dropShadow){this.fbShadowRight.style.display=this.fbShadowBottom.style.display=this.fbShadowCorner.style.display=''}var infoPanel=this.fbInfoPanel.style,controlPanel=this.fbControlPanel.style,pad=this.upperSpace+this.pos.fbMainDiv.height+2*this.innerBorder;infoPanel.top=(((this.infoTop?this.upperSpace:this.lowerSpace)-this.fbInfoPanel.offsetHeight)/2-1+(this.infoTop?0:pad))+'px';controlPanel.top=(((this.controlTop?this.upperSpace:this.lowerSpace)-this.fbControlPanel.offsetHeight)/2+(this.controlTop?0:pad))+'px';var pad=Math.max(this.padding,this.panelPadding)+'px';infoPanel.left=[this.infoLeft?pad:''];controlPanel.left=[this.controlLeft?pad:''];infoPanel.visibility=controlPanel.visibility='';this.clearTimeout('loader');this.fbLoader.style.display='none';this.fbMainDiv.style.display='';var duration=(this.currentItem.type==='img'&&!this.fbCanvas.style.visibility)?this.imageFadeDuration:0,oncomplete=function(){that.restore(callback,1)};return this.fadeOpacity(this.fbCanvas,1,duration,oncomplete)}if(this.currentItem.type==='img'?this.resizeImages:this.resizeOther){var scale=0;if(this.scaledBy>35){scale=1}else if(this.oversizedBy>28){scale=-1}if(scale){this.fbResizer.onclick=function(){if(that.isSlideshow&&that.pauseOnResize&&!that.isPaused){that.setPause(true)}that.collapse(function(){that.calcSize(scale===-1)});return false};if(this.currentItem.type==='img'&&/cursor|both/.test(this.resizeTool)){this.fbContent.style.cursor='url('+(scale===-1?this.resizeDownCursor:this.resizeUpCursor)+'), default';this.fbContent.onclick=this.fbResizer.onclick}if(this.currentItem.type!=='img'||/topleft|both/.test(this.resizeTool)){this.fbResizer.style.backgroundPosition=(scale===-1?'bottom':'top');this.fadeOpacity(this.fbResizer,this.controlOpacity)}}}this.fbContent.style.cursor='pointer';this.fbContent.onclick=this.fbClose.onclick;if(this.navOverlay){var leftNav=this.fbLeftNav.style,rightNav=this.fbRightNav.style,overlayPrev=this.fbOverlayPrev.style,overlayNext=this.fbOverlayNext.style;leftNav.width=rightNav.width=Math.max(this.navOverlayWidth/100*this.pos.fbMainDiv.width,this.fbOverlayPrev.offsetWidth)+'px';leftNav.display=rightNav.display='';if(fb.showNavOverlay){overlayPrev.visibility=overlayNext.visibility='hidden';overlayPrev.display=overlayNext.display='';overlayPrev.top=overlayNext.top=((this.pos.fbMainDiv.height-this.fbOverlayPrev.offsetHeight)*this.navOverlayPos/100)+'px'}}if(callback)callback()},setSize:function(order){var that=this,oncomplete=function(){},arr=[[],[]],defer={},node,i=arguments.length;if(order==='wh'){defer.top=1;defer.height=1}else if(order==='hw'){defer.left=1;defer.width=1}while(i--){if(typeof arguments[i]==='object'&&(node=this[arguments[i].id])){var obj=arguments[i];if(!this.pos[obj.id])this.pos[obj.id]={};for(var property in obj){if(obj.hasOwnProperty(property)&&property!=='id'){var idx=defer[property]||0;var start=this.pos[obj.id][property];if(typeof start!=='number'||node.style.display||node.style.visibility){start=obj[property]}arr[idx].push({node:node,property:property,start:start,finish:obj[property]});if(obj.id==='fbMainDiv'){arr[idx].push({node:this.fbContent,property:property,start:start,finish:obj[property]})}if(obj.id==='fbZoomDiv'&&/\b(width|height)\b/i.test(property)){arr[idx].push({node:this.fbZoomImg,property:property,start:start,finish:obj[property]})}this.pos[obj.id][property]=obj[property]}}}else if(typeof arguments[i]==='function'){oncomplete=arguments[i]}}this.resizeGroup(arr[0],function(){that.resizeGroup(arr[1],oncomplete)})},showContent:function(phase){var that=this;if(!phase){var displaySize=this.getDisplaySize();if(!this.resized){var vscrollChanged=displaySize.width!==this.displaySize.width,hscrollChanged=displaySize.height!==this.displaySize.height;if((vscrollChanged&&Math.abs(this.pos.fbBox.width-displaySize.width)<50)||(hscrollChanged&&Math.abs(this.pos.fbBox.height-displaySize.height)<50)){this.resized=true;return this.calcSize(this.scaledBy)}}this.resized=false;this.win.focus();if(this.ieOld)this.stretchOverlay()();if((this.disableScroll||(this.ffOld&&/iframe|quicktime/i.test(this.currentItem.type)))&&!(this.ieOld||this.webkitOld||this.ie8b2)){if(this.pos.fbBox.width<=displaySize.width&&this.pos.fbBox.height<=displaySize.height){this.setPosition(this.fbBox,'fixed')}}if(this.currentItem.type==='iframe'){this.fbContent.src=this.currentItem.href}else if(/flash|quicktime/.test(this.currentItem.type)){var html=this.content[this.currentItem.href];html=html.replace(/%width%/g,this.pos.fbMainDiv.width).replace(/%height%/g,this.pos.fbMainDiv.height);this.setInnerHTML(this.fbContent,html)}this.prevIndex=this.currentIndex?this.currentIndex-1:this.itemCount-1;this.nextIndex=this.currentIndex<this.itemCount-1?this.currentIndex+1:0;var prevHref=this.enableWrap||this.currentIndex!==0?this.items[this.prevIndex].href:'',nextHref=this.enableWrap||this.currentIndex!==this.itemCount-1?this.items[this.nextIndex].href:'';if(this.navButton){if(prevHref){if(!this.operaOld)this.fbPrev.href=prevHref;this.fbPrev.title=this.fbOverlayPrev.title}else{this.fbPrev.removeAttribute('href');this.fbPrev.title=''}if(nextHref){if(!this.operaOld)this.fbNext.href=nextHref;this.fbNext.title=this.fbOverlayNext.title}else{this.fbNext.removeAttribute('href');this.fbNext.title=''}var prevOn=this.fbPrev.className.replace('_off',''),nextOn=this.fbNext.className.replace('_off','');this.fbPrev.className=prevOn+(prevHref?'':'_off');this.fbNext.className=nextOn+(nextHref?'':'_off')}if(this.navOverlay){if(!this.operaOld){this.fbLeftNav.href=this.fbOverlayPrev.href=prevHref;this.fbRightNav.href=this.fbOverlayNext.href=nextHref}this.fbLeftNav.style.visibility=prevHref?'':'hidden';this.fbRightNav.style.visibility=nextHref?'':'hidden';fb.navOverlayShown=true}this.fbCanvas.style.visibility='';return this.restore(function(){that.timeouts.showContent=setTimeout(function(){that.showContent(1)},10)})}this.lastShown=this.currentItem;if(!this.currentItem.seen){this.currentItem.seen=true;this.itemsShown++}if(this.isSlideshow&&!this.isPaused){this.timeouts.slideshow=setTimeout(function(){if(that.endTask==='loop'||that.itemsShown<that.itemCount){that.newContent(that.nextIndex)}else if(that.endTask==='exit'){that.end()}else{that.setPause(true);var i=that.itemCount;while(i--)that.items[i].seen=false;that.itemsShown=0}},this.slideInterval*1000)}this.timeouts.preload=setTimeout(function(){that.preloadImages(nextHref||prevHref||'',true)},10)},newContent:function(index){var that=this;this.clearTimeout('slideshow');this.clearTimeout('resizeGroup');this.currentIndex=index;fb.previousAnchor=this.currentItem;this.currentItem=this.items[index];if(this.showNavOverlay=='once'&&this.navOverlayShown)this.showNavOverlay=false;var oncomplete=function(){that.updatePanels();that.fetchContent(function(){that.calcSize()})};this.collapse(function(){that.timeouts.fetch=setTimeout(oncomplete,10)})},end:function(all){if(this!==fb.lastChild)return fb.lastChild.end(all);var that=this;this.endAll=this.endAll||all;if(this.isChild&&this.endAll)this.imageFadeDuration=this.overlayFadeDuration=this.resizeDuration=0;this.fbOverlay.onclick=null;if(this.keydownSet){this.doc.onkeydown=this.priorOnkeydown;this.keydownSet=false}if(this.keypressSet){this.doc.onkeypress=this.priorOnkeypress;this.keypressSet=false}if(this.ieOld){this.win.detachEvent('onresize',this.stretchOverlay());this.win.detachEvent('onscroll',this.stretchOverlay())}for(var key in this.timeouts){if(this.timeouts.hasOwnProperty(key))this.clearTimeout(key)}if(this.fbBox.style.visibility){if(!this.lastShown)this.fbZoomDiv.style.display='none'}else if(this.currentItem.type==='img'&&this.zoomImageStart){if(this.currentItem.popup)this.currentItem.anchor.onmouseover();var anchorPos=this.getAnchorPos(this.currentItem.anchor,true);if(this.currentItem.popup)this.currentItem.anchor.onmouseout();if(anchorPos.width){this.fbZoomDiv.style.borderWidth=this.zoomPopBorder+'px';anchorPos.left-=this.zoomPopBorder;anchorPos.top-=this.zoomPopBorder;this.pos.thumb=anchorPos;return this.zoomOut()}}if(!this.fbBox.style.visibility){var anchorPos=this.getAnchorPos(this.currentItem.anchor,!this.currentItem.popup),offset=this.initialSize/2,initialPos={id:'fbBox',left:anchorPos.left-offset,top:anchorPos.top-offset,width:this.initialSize,height:this.initialSize},zeroPos={id:'fbBox',left:anchorPos.left,top:anchorPos.top,width:0,height:0,borderWidth:0},split=this.splitResize;if(split==='wh'){split='hw'}else if(split==='hw'){split='wh'}else if(split==='auto'){split=this.pos.fbBox.width<=this.pos.fbBox.height?'hw':'wh'}var oncomplete3=function(){setTimeout(function(){that.fbBox.style.visibility='hidden';that.end()},10)};if(split){var oncomplete2=function(){that.setSize(split,initialPos,function(){that.setSize(zeroPos,oncomplete3)})}}else{var oncomplete2=function(){that.setSize(zeroPos,oncomplete3)}}var oncomplete=function(){if(that.fbContent){that.fbMainDiv.removeChild(that.fbContent);delete that.fbContent}that.fbLoader.style.display='';that.fbCanvas.style.display=that.fbShadowRight.style.display=that.fbShadowBottom.style.display=that.fbShadowCorner.style.display='none';oncomplete2()};return this.collapse(oncomplete)}this.fbBox.style.display='none';var level=this.children.length+1,i=this.anchors.length;while(i&&this.anchors[i-1].level>=level)i--;this.anchors.length=i;if(this.isChild)this.children.length--;fb.lastChild=this.children[this.children.length-1]||fb;var oncomplete2=function(){setTimeout(function(){while(that.nodeNames.length){var id=that.nodeNames.pop();if(that[id]&&that[id].parentNode){that[id].parentNode.removeChild(that[id]);delete that[id]}}if(that.endAll&&that.isChild){return fb.end(true)}else if(that.loadPageOnClose){if(that.loadPageOnClose==='self'||that.loadPageOnClose==='this'){that.win.location.reload(true)}else if(that.loadPageOnClose==='back'){history.back()}else{that.win.location.replace(that.loadPageOnClose)}}},10)};var oncomplete=function(){while(that.hiddenEls.length){var el=that.hiddenEls.pop();el.style.visibility='visible';if(this.ffOld&&this.ffMac){el.focus();el.blur()}}var overlay=that.fbOverlay.style;overlay.display='none';overlay.width=overlay.height='0';var duration=that.currentItem.popup?6.5:0;that.fbZoomDiv.style.opacity='1';that.fadeOpacity(that.fbZoomDiv,0,duration,oncomplete2);that.currentItem=fb.previousAnchor=null};this.fadeOpacity(this.fbOverlay,0,this.overlayFadeDuration,oncomplete)},zoomIn:function(phase){var that=this,zoomDiv=this.fbZoomDiv.style;if(!phase){this.clearTimeout('slowLoad');zoomDiv.display=this.fbZoomImg.style.display='';if(this.currentItem.popup)this.currentItem.anchor.onmouseout();var pad=this.outerBorder+this.innerBorder-this.zoomPopBorder;var oncomplete=function(){that.fbZoomImg.src=that.currentItem.href;that.setSize({id:'fbZoomDiv',width:that.pos.fbMainDiv.width,height:that.pos.fbMainDiv.height,left:that.pos.fbBox.left+pad+that.padding,top:that.pos.fbBox.top+pad+that.upperSpace},function(){that.zoomIn(1)})};return this.fadeOpacity(this.fbOverlay,this.overlayOpacity,this.overlayFadeDuration,oncomplete)}if(phase===1){var boxPos={left:this.pos.fbBox.left,top:this.pos.fbBox.top,width:this.pos.fbBox.width,height:this.pos.fbBox.height};var pad=2*(this.zoomPopBorder-this.outerBorder);this.pos.fbBox={left:this.pos.fbZoomDiv.left,top:this.pos.fbZoomDiv.top,width:this.pos.fbZoomDiv.width+pad,height:this.pos.fbZoomDiv.height+pad};this.fbBox.style.visibility='';var oncomplete=function(){that.restore(function(){that.zoomIn(2)})};return this.setSize({id:'fbBox',left:boxPos.left,top:boxPos.top,width:boxPos.width,height:boxPos.height},oncomplete)}var show=function(){zoomDiv.display='none';that.fbZoomImg.src='';zoomDiv.left=zoomDiv.top=zoomDiv.width=zoomDiv.height=that.fbZoomImg.width=that.fbZoomImg.height='0';that.showContent()};this.timeouts.showContent=setTimeout(show,10)},zoomOut:function(phase){var that=this;if(!phase){this.fbZoomImg.src=this.currentItem.href;var pad=this.outerBorder+this.innerBorder-this.zoomPopBorder;this.setSize({id:'fbZoomDiv',width:this.pos.fbMainDiv.width,height:this.pos.fbMainDiv.height,left:this.pos.fbBox.left+pad+this.padding,top:this.pos.fbBox.top+pad+this.upperSpace},function(){that.zoomOut(1)})}if(phase===1){this.fbZoomDiv.style.display=this.fbZoomImg.style.display='';this.fbCanvas.style.visibility='hidden';return this.collapse(function(){that.zoomOut(2)})}if(phase===2){var pad=2*(this.zoomPopBorder-this.outerBorder);return this.setSize({id:'fbBox',left:this.pos.fbZoomDiv.left,top:this.pos.fbZoomDiv.top,width:this.pos.fbZoomDiv.width+pad,height:this.pos.fbZoomDiv.height+pad},function(){that.zoomOut(3)})}this.fbBox.style.visibility='hidden';var end=function(){that.fbZoomImg.src=that.pos.thumb.src;that.end()};this.setSize({id:'fbZoomDiv',left:this.pos.thumb.left,top:this.pos.thumb.top,width:this.pos.thumb.width,height:this.pos.thumb.height},end)},setPause:function(bPause){this.isPaused=bPause;if(bPause){this.clearTimeout('slideshow')}else{this.newContent(this.nextIndex)}if(this.showPlayPause){this.fbPlay.style.left=bPause?'':'-9999px';this.fbPause.style.left=bPause?'-9999px':''}},fadeOpacity:function(el,opacity,duration,callback){var startOp=+(el.style.opacity||0);duration=duration||0;this.clearTimeout['fade'+el.id];var fadeIn=(startOp<=opacity&&opacity>0);if(duration>10)duration=10;if(duration<0)duration=0;if(duration===0){startOp=opacity}else{var root=Math.pow(100,0.1),power=duration+((10-duration)/9)*(Math.log(2)/Math.log(root)-1),incr=1/Math.pow(root,power)}if(fadeIn){el.style.display=el.style.visibility=''}else{incr=-incr}this.stepFade(el,startOp,opacity,incr,fadeIn,callback)},stepFade:function(el,thisOp,finishOp,incr,fadeIn,callback){if(!el)return;var that=this;if((fadeIn&&thisOp>=finishOp)||(!fadeIn&&thisOp<=finishOp))thisOp=finishOp;if(this.ie)el.style.filter='alpha(opacity='+thisOp*100+')';el.style.opacity=thisOp+'';if(thisOp===finishOp){if(this.ie&&finishOp>=1)el.style.removeAttribute('filter');if(callback)callback()}else{this.timeouts['fade'+el.id]=setTimeout(function(){that.stepFade(el,thisOp+incr,finishOp,incr,fadeIn,callback)},20)}},resizeGroup:function(arr,callback){var i=arr.length;if(!i)return callback?callback():null;this.clearTimeout('resizeGroup');var diff=0;while(i--){diff=Math.max(diff,Math.abs(arr[i].finish-arr[i].start))}var duration=this.resizeDuration*(this.liveResize?0.65:1);var rate=diff&&duration?Math.pow(Math.max(1,2.2-duration/10),(Math.log(diff)))/diff:1;i=arr.length;while(i--)arr[i].diff=arr[i].finish-arr[i].start;this.stepResize(rate,rate,arr,callback)},stepResize:function(increment,rate,arr,callback){var that=this;if(increment>1)increment=1;var i=arr.length;while(i--){var node=arr[i].node,prop=arr[i].property,val=Math.round(arr[i].start+arr[i].diff*increment),tag=node.tagName.toLowerCase();if(tag==='img'||tag==='iframe'){node[prop]=val}else{node.style[prop]=val+'px'}}if(increment>=1){delete this.timeouts.resizeGroup;if(callback)callback()}else{this.timeouts.resizeGroup=setTimeout(function(){that.stepResize(increment+rate,rate,arr,callback)},20)}},getDisplaySize:function(){return{width:this.getDisplayWidth(),height:this.getDisplayHeight()}},getDisplayWidth:function(){return this.html.clientWidth||this.bod.clientWidth},getDisplayHeight:function(){if(this.webkitOld)return this.win.innerHeight;if(!this.html.clientHeight||this.operaOld||this.doc.compatMode==='BackCompat'){return this.bod.clientHeight}return this.html.clientHeight},getScroll:function(win){win=win||this.win;var doc=win.document,bod=doc.body;return{left:win.pageXOffset||bod.scrollLeft||doc.documentElement.scrollLeft||0,top:win.pageYOffset||bod.scrollTop||doc.documentElement.scrollTop||0}},getLeftTop:function(el,local){var left=el.offsetLeft||0,top=el.offsetTop||0,doc=el.ownerDocument||el.document,bod=doc.body,win=doc.defaultView||doc.parentWindow||doc.contentWindow,scroll=this.getScroll(win),position=((el.currentStyle&&el.currentStyle.position)||(win.getComputedStyle&&win.getComputedStyle(el,'').getPropertyValue('position'))||'').toLowerCase(),rex=/absolute|fixed/,elFlow=!rex.test(position),inFlow=elFlow,node=el;if(position==='fixed'){left+=scroll.left;top+=scroll.top}while(position!=='fixed'&&(node=node.offsetParent)){var borderLeft=0,borderTop=0,nodeFlow=true;if(node.currentStyle){position=(node.currentStyle.position||'').toLowerCase();nodeFlow=!rex.test(position);if(this.opera){if(local&&node!==bod){left+=node.scrollLeft-node.clientLeft;top+=node.scrollTop-node.clientTop}}else{if(node.currentStyle.hasLayout&&node!==doc.documentElement){borderLeft=node.clientLeft;borderTop=node.clientTop}}}else if(win.getComputedStyle){position=(win.getComputedStyle(node,'').getPropertyValue('position')||'').toLowerCase();nodeFlow=!rex.test(position);borderLeft=parseInt(win.getComputedStyle(node,'').getPropertyValue('border-left-width'),10);borderTop=parseInt(win.getComputedStyle(node,'').getPropertyValue('border-top-width'),10);if(this.ff&&node===el.offsetParent&&!nodeFlow&&(this.ffOld||!elFlow)){left+=borderLeft;top+=borderTop}}if(!nodeFlow){if(local)return{left:left,top:top};inFlow=false}left+=node.offsetLeft+borderLeft;top+=node.offsetTop+borderTop;if(position==='fixed'){left+=scroll.left;top+=scroll.top}if(!(this.opera&&elFlow)&&node!==bod&&node!==doc.documentElement){left-=node.scrollLeft;top-=node.scrollTop}}if(this.ff&&inFlow){left+=parseInt(win.getComputedStyle(bod,'').getPropertyValue('border-left-width'),10);top+=parseInt(win.getComputedStyle(bod,'').getPropertyValue('border-top-width'),10)}if(this.webkitOld){var scriptElement=doc.createElement('script');scriptElement.innerHTML='document.parentWindow=self';doc.documentElement.appendChild(scriptElement);doc.documentElement.removeChild(scriptElement);win=doc.parentWindow}if(!local&&win!==this.win){var iframes=win.parent.document.getElementsByTagName('iframe'),i=iframes.length;while(i--){var node=iframes[i],idoc=false;try{idoc=node.contentDocument||node.contentWindow;idoc=idoc.document||idoc}catch(e){}if(idoc===doc||(typeof idoc!=='object'&&node.src===win.location.href.substr(win.location.href.length-node.src.length))){if(this.webkitOld)win=doc.defaultView;var pos=this.getLeftTop(node);left+=pos.left-scroll.left;top+=pos.top-scroll.top;if(node.currentStyle){var padLeft=0,padTop=0;if(!this.ie||elFlow){padLeft=parseInt(node.currentStyle.paddingLeft,10);padTop=parseInt(node.currentStyle.paddingTop,10)}left+=node.clientLeft+padLeft;top+=node.clientTop+padTop}else if(win.getComputedStyle){left+=parseInt(win.getComputedStyle(node,'').getPropertyValue('border-left-width'),10)+parseInt(win.getComputedStyle(node,'').getPropertyValue('padding-left'),10);top+=parseInt(win.getComputedStyle(node,'').getPropertyValue('border-top-width'),10)+parseInt(win.getComputedStyle(node,'').getPropertyValue('padding-top'),10)}break}}}return{left:left,top:top}},getLayout:function(el){var lay=this.getLeftTop(el);lay.width=el.offsetWidth;lay.height=el.offsetHeight;return lay},hideElements:function(type,thisWindow){if(!thisWindow){this.hideElements(type,this.win)}else{var tagName,tagNames=type==='flash'?['object','embed']:[type];try{while((tagName=tagNames.pop())){var els=thisWindow.document.getElementsByTagName(tagName),i=els.length;while(i--){var el=els[i];if(el.style.visibility!=='hidden'&&(tagName!=='object'||(el.getAttribute('type')&&el.getAttribute('type').toLowerCase()==='application/x-shockwave-flash')||(el.getAttribute('classid')&&el.getAttribute('classid').toLowerCase()==='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000')||/data\s*=\s*"?[^>"]+\.swf\b/i.test(el.innerHTML)||/param\s+name\s*=\s*"?(movie|src)("|\s)[^>]+\.swf\b/i.test(el.innerHTML))){this.hiddenEls.push(el);el.style.visibility='hidden'}}}}catch(e){}var frames=thisWindow.frames,i=frames.length;while(i--){if(typeof frames[i].window==='object')this.hideElements(type,frames[i].window)}}},clearTimeout:function(key){if(this.timeouts[key]){clearTimeout(this.timeouts[key]);delete this.timeouts[key]}},stretchOverlay:function(){var that=this;return function(){if(arguments.length===1){that.clearTimeout('stretch');that.timeouts.stretch=setTimeout(function(){that.stretchOverlay()()},25)}else{delete that.timeouts.stretch;if(!that.fbBox)return;var width=that.fbBox.offsetLeft+that.fbBox.offsetWidth,height=that.fbBox.offsetTop+that.fbBox.offsetHeight,display=that.getDisplaySize(),scroll=that.getScroll(),overlay=that.fbOverlay.style;overlay.width=overlay.height='0';overlay.width=Math.max(width,that.bod.scrollWidth,that.bod.clientWidth,that.html.clientWidth,display.width+scroll.left)+'px';overlay.height=Math.max(height,that.bod.scrollHeight,that.bod.clientHeight,that.html.clientHeight,display.height+scroll.top)+'px'}}},encodeHTML:function(str){return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#39;')},decodeHTML:function(str){return str.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&#39;/g,"'").replace(/&amp;/g,'&')},getXMLHttpRequest:function(){var xhr,that=this;if(window.XMLHttpRequest){if(!(xhr=new XMLHttpRequest()))return false}else{try{xhr=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return false}}}return{getResponse:function(url,callback){try{xhr.open('GET',url,true);xhr.onreadystatechange=function(){if(xhr.readyState===4){xhr.onreadystatechange=function(){};callback(xhr)}};xhr.send(null)}catch(e){}}}},setInnerHTML:function(el,strHTML){try{var range=this.doc.createRange();range.selectNodeContents(el);range.deleteContents();if(strHTML){strHTML=strHTML.replace('&','&amp;');var xmlDiv=new DOMParser().parseFromString('<div xmlns="http://www.w3.org/1999/xhtml">'+strHTML+'</div>','application/xhtml+xml'),childNodes=xmlDiv.documentElement.childNodes;for(var i=0,len=childNodes.length;i<len;i++){el.appendChild(this.doc.importNode(childNodes[i],true))}}return true}catch(e){}try{el.innerHTML=strHTML;return true}catch(e){}return false},printContents:function(el,style){if(el&&el.offsetWidth){var width=el.offsetWidth,height=el.offsetHeight}else{el=fb.lastChild.fbContent;var pos=fb.lastChild.pos.fbMainDiv,width=pos.width,height=pos.height}var win=window.open('','','width='+width+', height='+height),doc=win&&win.document;if(!doc){alert('Popup windows are being blocked by your browser.\nUnable to print.');return false}if(/\.css$/i.test(style)){style='<link rel="stylesheet" type="text/css" href="'+style+'" />'}else{style='<style type="text/css"> html,body{border:0;margin:0;padding:0;}'+(style||'')+'</style>'}var div=this.doc.createElement('div');div.appendChild(el.cloneNode(true));doc.open('text/html');doc.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'+' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>'+style+'</head><body><div>'+div.innerHTML+'</div></body></html>');doc.close();setTimeout(function(){win&&win.print();win&&win.close()},200);return true},loadAnchor:function(href,rev,title){if(href.setAttribute){var anchor=href;var elClass=el.getAttribute('class');elClass=elClass?elClass:el.getAttribute('className');if(!elClass)anchor.setAttribute('className','thickbox');fb.lastChild.start(this.tagOneAnchor(anchor))}else{fb.lastChild.start(this.tagOneAnchor({href:href,rev:rev,title:title,rel:'thickbox'}))}},goBack:function(){var a;if((a=fb.previousAnchor)){this.loadAnchor(a.href,a.rev+' sameBox:true',a.title)}},resize:function(width,height){if(width)fb.lastChild.currentItem.nativeWidth=width;if(height)fb.lastChild.currentItem.nativeHeight=height;fb.lastChild.calcSize(false)}};function initfb(){if(arguments.callee.done)return;if(document.compatMode==='BackCompat'){arguments.callee.done=true;/*alert('Floatbox does not support quirks mode.\nPage needs to have a valid a doc type.');*/return}if(self!==top&&!parent.fb)return setTimeout(initfb,50);arguments.callee.done=true;if(self===top)top.floatbox=new Floatbox();fb=top.floatbox;fb.tagAnchors(self.document.body);if(fb.autoStart){fb.start(fb.autoStart);if(typeof fb!=='undefined')delete fb.autoStart}else{fb.preloadImages('',true)}}/*@cc_on fb_tempNode=document.createElement('div');(function(){if(document.readyState!=='complete')return setTimeout(arguments.callee,50);try{fb_tempNode.doScroll('left')}catch(e){return setTimeout(arguments.callee,50)}initfb();delete fb_tempNode})();/*@if(false)@*/if(/Apple|KDE/i.test(navigator.vendor)){(function(){if(/loaded|complete/.test(document.readyState)){initfb()}else{setTimeout(arguments.callee,50)}})()}else if(document.addEventListener){document.addEventListener('DOMContentLoaded',initfb,false)}/*@end@*/fb_prevOnload=window.onload;window.onload=function(){if(typeof fb_prevOnload==='function')fb_prevOnload();initfb()};

