
    top.Hc = top.Hc || {};
    top.Hc.version = 'prod/45';

    function gm_authFailure() {
        console.error('[HCGMAP1] Google maps API auth failure');
    }

    function hcShowGoogleMapScript()
    {
        if (typeof google !== 'object' || typeof google.maps !== 'object') {
            var script = document.createElement('script');
            script.async = false;
            script.type = 'text/javascript';
            script.src = 'https://maps.google.com/maps/api/js?v=3&callback=googleMap.showMap&client=gme-burdaprocurement&signature=y9_k4JybzDeSAu56g0KpZYS7iso=&channel=';
            var next = document.getElementsByTagName('script')[0];
            next.parentNode.insertBefore(script, next);
        }
    }

    (function(){
        var list = [];
        var queue = window.HC || [];

        window.HC = [];

        HC.push = function(){
            list.push.apply(list, arguments);
        };

        HC.setCookie = function (name, value, days) {
            var expires = "";
            if (days) {
                var date = new Date();
                date.setTime(date.getTime() + (days * 86400000)); //24 * 60 * 60 * 1000
                expires = "; expires=" + date.toGMTString();
            }
            document.cookie = name + "=" + value + expires + "; path=/";
        };

        HC.getCookie = function (name, defaultValue) {
            var nameEQ = name + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
            }
            if (typeof defaultValue != 'undefined') {
                return defaultValue;
            }
            return false;
        };

        HC.deleteCookie = function (name) {
            HC.setCookie(name, '', -1);
        };

        HC.concat.apply(HC, queue);
    })();


    

/* LIBCORJJIN */
try{
jQuery.noConflict();jQuery(document).bind('loadModules',function(){var notReady=jQuery('.loadModule').not('[ready=1]').not('[ready=2]');if(notReady.length>0){notReady.each(function(i,box){box=jQuery(box);box.attr('ready','2');jQuery.ajax({url:box.attr('data-url'),cache:box.hasClass('cache'),success:function(data){box.attr('ready','1');box.html(data);jQuery(document).trigger('loadModules');},error:function(){box.attr('ready','1');jQuery(document).trigger('loadModules');}});});}else{var selectorStringReady='.loadModule[ready=1]';if(jQuery(selectorStringReady).length>0){jQuery(document).trigger('hcAsyncModuleLoaded');}
var selectorTrackStringReady='.loadModule.track[ready=1]';if(jQuery('.loadModule.track').length==jQuery(selectorTrackStringReady).length){jQuery(document).trigger('allAjaxTrackingModuleReady');}}});jQuery(document).bind('ready hcAsyncModuleLoaded',function(){if(jQuery('*[rel*="tooltip"]').length>0){jQuery().tooltip();}
if(jQuery('.toggableBox').length>0){jQuery().toggableBox();}});jQuery(document).bind('hcAsyncModuleLoaded',function(){Shadowbox.clearCache();Shadowbox.init();Shadowbox.setup();jQuery('.slidebar').hcslidebar();new Tips($$('.tooltipAjax'),{fixed:false,offset:{x:20,y:-20}});});jQuery(document).ready(function(){jQuery.ajaxSetup({});jQuery(document).trigger('loadModules');});jQuery.fn.reverse=[].reverse;String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1);};
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJIN', bundleError);}


/* LIBCORJJTO */
try{
(function($){$.support.touch='ontouchend'in document;if(!$.support.touch){return;}
var mouseProto=$.ui.mouse.prototype,_mouseInit=mouseProto._mouseInit,touchHandled;function simulateMouseEvent(event,simulatedType){if(event.originalEvent.touches.length>1){return;}
event.preventDefault();var touch=event.originalEvent.changedTouches[0],simulatedEvent=document.createEvent('MouseEvents');simulatedEvent.initMouseEvent(simulatedType,true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null);event.target.dispatchEvent(simulatedEvent);}
mouseProto._touchStart=function(event){var self=this;if(touchHandled||!self._mouseCapture(event.originalEvent.changedTouches[0])){return;}
touchHandled=true;self._touchMoved=false;simulateMouseEvent(event,'mouseover');simulateMouseEvent(event,'mousemove');simulateMouseEvent(event,'mousedown');};mouseProto._touchMove=function(event){if(!touchHandled){return;}
this._touchMoved=true;simulateMouseEvent(event,'mousemove');};mouseProto._touchEnd=function(event){if(!touchHandled){return;}
simulateMouseEvent(event,'mouseup');simulateMouseEvent(event,'mouseout');if(!this._touchMoved){simulateMouseEvent(event,'click');}
touchHandled=false;};mouseProto._mouseInit=function(){var self=this;self.element.bind('touchstart',$.proxy(self,'_touchStart')).bind('touchmove',$.proxy(self,'_touchMove')).bind('touchend',$.proxy(self,'_touchEnd'));_mouseInit.call(self);};})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJTO', bundleError);}


/* LIBCORJHCC */
try{
(function($){"use strict";$.widget('hc.hccacheable',{options:{cacheId:document,expired:null},cacheId:null,expired:null,cacheObject:{},currentCache:null,_initCache:function(cacheId,expired){this.cacheId=(typeof cacheId!=='undefined'&&cacheId!="")?cacheId:null;this.expired=(typeof expired!=='undefined'&&expired!="")?expired:this.options.expired;if(this.cacheId===null){return;}
this.currentCache=$.hccache.init(this.cacheId,this.expired);},_updateCache:function(type,key,data){var item=this._getItem(type);if(item===null){return this._setCache(type,data);}
if(typeof item[key]!=='undefined'){item[key]=data;return this._setCache(type,data);}},_addCache:function(type,data,key){key=(typeof key==='undefined')?null:key;var item=this._getCache(type);if(item===null){if(key!==null){item={};}else{item=[];}}
if($.isArray(item)){item.push(data);return this._setCache(type,item);}
if(key===null){return;}
item[key]=data;return this._setCache(type,item);},_deleteCacheArrayItem:function(cache,key){var keyType=typeof key,data=[];$.each(cache,function(index,value){if(keyType==='function'){if(key(value)===true){return;}}else if(keyType==='object'){if(value===key){return;}}
data.push(value);});return data;},_deleteCache:function(type,key){var self=this,item=this._getCache(type),data,numeric=false,keyType=typeof key;if(item===null){return;}
if($.isArray(item)){data=[];numeric=true;}else{data={};}
$.each(item,function(index,value){if(keyType==='function'){if(key(value)===true){return;}}else if(keyType==='object'){if(value===key){return;}}else if(index===key){return;}
if(numeric){data.push(value);}else{if($.isArray(value)){value=self._deleteCacheArrayItem(value,key);}
data[index]=value;}});return this._setCache(type,data);},_setCache:function(type,data,cacheId){this.currentCache.setItem(type,data,cacheId);return this._saveCache(type,cacheId);},_clearCache:function(type,cacheId){if(typeof type==='undefined'){this._trigger('clear','clear',{});return this.currentCache.clear();}
this.currentCache.removeItem(type,cacheId);return this._saveCache(type,cacheId);},_inCache:function(type,key,cacheId){var item=this._getCache(type,null,cacheId),keyType=typeof key,found=false;if(item===null){return false;}
$.each(item,function(index,value){if(keyType==='function'){if(key(value)===true){found=true;return false;}}else if(index===key){found=true;return false;}});return found;},__searchArray:function(items,key,value){var data=null;$.each(items,function(index,item){if(typeof item[key]==='undefined'){return;}
if(item[key]===value){data=item;return false;}});return data;},__searchObject:function(items,key,value){var data=null,self=this;if(typeof items[key]==='undefined'||items[key]!==value){$.each(items,function(name,item){if($.isArray(item)){data=self.__searchArray(item,key,value);if(data!==null){return false;}
return;}
if(typeof item[key]==='undefined'||item[key]!==value){return;}
data=item;});return data;}
return items[key];},_searchCacheAll:function(key,value,filter){var self=this,data={},numeric=false,result=null,filters=filter||[];if(typeof value==='undefined'){throw"value expected searchCacheAll";}
if(typeof key==='undefined'){throw"key expected searchCacheAll";}
this.currentCache.validate();$.each(this.currentCache.storage,function(name,items){if($.inArray(name,filters)!==-1){return;}
if($.isArray(items)){numeric=true;}else{numeric=false;}
if(numeric===true){result=self.__searchArray(items,key,value);if(result!==null){data[name]=result;}
return;}
result=self.__searchObject(items,key,value);if(result!==null){data[name]=result;}});return data;},_searchCache:function(key,value,filter){var self=this,data=null,cacheName='',numeric=false,filters=filter||[];if(typeof value==='undefined'){throw"value expected searchCache";}
if(typeof key==='undefined'){throw"key expected searchCache";}
this.currentCache.validate();$.each(this.currentCache.storage,function(name,items){if($.inArray(name,filters)!==-1){return;}
if($.isArray(items)){numeric=true;}else{numeric=false;}
if(numeric===true){data=self.__searchArray(items,key,value);if(data!==null){cacheName=name;return false;}
return;}
data=self.__searchObject(items,key,value);if(data!==null){cacheName=name;return false;}});return{'data':data,'name':cacheName};},_getCacheExpired:function(){return this.currentCache.expired;},_getCache:function(type,defaultValue,cacheId){defaultValue=defaultValue||null;return this.currentCache.getItem(type,cacheId)||defaultValue;},_saveCache:function(type,cacheId){this.currentCache.save(cacheId);this._trigger('change','change',[type,cacheId]);return this;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCC', bundleError);}


/* LIBCORJHCC */
try{
(function($){"use strict";function HcCache(){var key,i;this.expireTime=2592E6;this.date=new Date();this.cacheObjects={};try{if(typeof window.localStorage==='object'){window.localStorage.setItem('test','test');window.localStorage.removeItem('test');this.localStorage=true;this.storage=window.localStorage;for(i=0;i<this.storage.length;i++){key=this.storage.key(i);this.getItem(key);}
return;}}catch(e){console.error('inaccessible localStorage',e);}
this.storage={};this.localStorage=false;}
function CacheObject(hcCache,name,expired){this.date=new Date();if(!hcCache instanceof HcCache){throw"first parameter must be an instance of HcCache";}
this.cache=hcCache;this.name=name;this.expired=this.date.getTime()+expired;this.expireTime=expired;this.init();}
$.extend(CacheObject.prototype,{init:function(){var item=this.cache.getItem("GM_"+this.name);if(item!==null){this.storage=item.data;this.expired=item.expired;}else{this.storage={};}
return this;},getItem:function(key,cacheId){var initCacheId=(typeof cacheId!=='undefined')?cacheId:null;if(initCacheId!==null){return this.cache.init(initCacheId).getItem(key);}
this.validate();if(typeof this.storage[key]!=='undefined'){return this.storage[key];}
return null;},removeItem:function(key,cacheId){var initCacheId=(typeof cacheId!=='undefined')?cacheId:null;if(initCacheId!==null){return this.cache.init(initCacheId).removeItem(key);}
if(typeof this.storage[key]!=='undefined'){delete this.storage[key];}
return this;},setItem:function(key,value,cacheId){var initCacheId=(typeof cacheId!=='undefined')?cacheId:null;if(initCacheId!==null){return this.cache.init(initCacheId).setItem(key,value);}
this.storage[key]=value;return this;},save:function(cacheId){var initCacheId=(typeof cacheId!=='undefined')?cacheId:null;if(initCacheId!==null){return this.cache.init(initCacheId).save();}
if(!this.cache instanceof HcCache){throw"inner cache must be a instance of HcCache";}
this.validate();this.cache.setItem("GM_"+this.name,this.storage,this.expired);return this;},rollback:function(){return this.init();},reset:function(expired){this.clear();this.expired=expired;return this;},clear:function(){if(!this.cache instanceof HcCache){throw"inner cache must be a instance of HcCache";}
this.cache.removeItem(this.name);return this.init();},localStorageUsed:function(){return this.cache.localStorageUsed();},validate:function(){var date=new Date();if(this.expired<date.getTime()){this.reset(date.getTime()+this.expireTime);}
return this;}});$.extend(HcCache.prototype,{setExpireTime:function(time){this.expireTime=time;},getExpireTime:function(){return this.expireTime;},init:function(name,expired){if(typeof name!=='string'){throw"name must be a string";}
if(typeof this.cacheObjects[name]!=='undefined'){return this.cacheObjects[name].validate();}
expired=(typeof expired!=='undefined'&&expired!=="")?expired:this.getExpireTime();return this.cacheObjects[name]=new CacheObject(this,name,expired);},getItem:function(key){var json=null;if(this.localStorageUsed()){try{json=JSON.parse(this.storage.getItem(key));}catch(e){return null;}}else if(typeof this.storage[key]!=='undefined'){json=this.storage[key];}
if(json===null){return null;}
if(typeof json.expired=="undefined"||json.expired>this.date.getTime()){return json;}
this.removeItem(key);return null;},cleanUp:function(){var i,key,item=null,expired=null,removeKey=null;if(this.localStorageUsed()){for(i=0;i<this.storage.length;i++){key=this.storage.key(i);if(key.substr(0,3)!="GM_")continue;item=this.getItem(key);if(item!==null&&typeof item.expired!='undefined'){if(expired===null){expired=item.expired;removeKey=key;}else if(item.expired<expired){expired=item.expired;removeKey=key;}}}
if(removeKey!=null)this.removeItem(removeKey);}},setItem:function(key,value,expire){expire=(typeof expire==='number')?expire:this.getExpireTime();if(this.localStorageUsed()){try{this.storage.setItem(key,JSON.stringify({'expired':expire,'data':value}));}catch(e){if(e.name==='TypeError'){try{this.storage.setItem(key,{'expired':expire,'data':value});}catch(e){}
return;}
this.cleanUp();this.setItem(key,value,expire);}
return this;}
this.storage[key]={'expired':expire,'data':value};return this;},removeItem:function(key){if(this.localStorageUsed()){this.storage.removeItem(key);return this;}
delete this.storage[key];return this;},localStorageUsed:function(){return this.localStorage;},test:function(key){if(this.localStorageUsed()){return this.storage.getItem(key)!==null;}
return typeof this.storage[key]!=='undefined';}});$.hccache=new HcCache();})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCC', bundleError);}


/* LIBCORJHCH */
try{
(function($){"use strict";$.widget('hc.hchoverslider',{options:{classHidden:'displayNone',classChanged:'changed',tabIndex:0,count:5,minValue:1,defaultValue:3,value:3,key:''},_formLabel:null,_elements:null,_current:null,_select:null,_clear:[],_create:function(){this._elements=this.element.find('.elements').first();this._clear=this.element.find('.element-clear').first();this._select=this.element.find('select').first();this._formLabel=$('label[for='+this._select.attr('id')+']');this.element.attr('tabIndex',this.options.tabIndex);for(var i=1;i<=this.options.count;i++){this._elements.append('<span class="hchoverslider-hover-'+this.options.key+'">'+i+'</span>');}},_init:function(){var self=this;self._current=parseInt(self.options.value,10);self.element.keydown(function(event){return self.keydown(event);});self._formLabel.click(function(){self.element.focus();return false;});$(self._elements).mouseout(function(){self._showNew(self._current);});$(self._elements).delegate('span','mouseover',function(event){self._showNew($(event.target).text());});$(self._elements).delegate('span','click',function(event){self._changeCurrent($(event.target).text());self.element.focus();return false;});if(self._clear.length!==0){self._clear.mouseout(function(){self._showNew(self._current);});self._clear.mouseover(function(){self._showNew(0);});self._clear.click(function(){self._changeCurrent(0);if(typeof self._selects!=='undefined'){self._selects.find('select').val(0);self._selects.find('select').change();}
self._clear.addClass(self.options.classHidden);return false;});}},_showNew:function(value){if(value<this.options.minValue||value>this.options.count){return;}
this._formLabel.find('span').text(this._select.find('[value='+value+']').text());this._elements.removeClass().addClass('elements '+this.options.key+value);},_changeCurrent:function(value,skipEvent){if(value<this.options.minValue||value>this.options.count){return;}
this._elements.removeClass().addClass('elements '+this.options.key+value);this._select.val(value);this._formLabel.find('span').text(this._select.find('option:selected').text());this._current=parseInt(value,10);if(this._clear.length>0){if(this._current>0){this._clear.removeClass(this.options.classHidden);}else{this._clear.addClass(this.options.classHidden);}}
if(skipEvent===true){return;}
this.element.removeClass(this.options.classChanged);if(this._current!==this.options.defaultValue){this.element.addClass(this.options.classChanged);}
this._trigger('change',{},{'value':value});},keydown:function(event){switch(event.keyCode){case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.PAGE_UP:this._changeCurrent(this._current+1);return false;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:case $.ui.keyCode.PAGE_DOWN:this._changeCurrent(this._current-1);return false;default:return true;}},value:function(){return this._current;},hasLayer:function(){return false;},label:function(){return this._formLabel;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCH', bundleError);}


/* LIBCORJHCL */
try{
(function($){"use strict";$.widget('hc.hclayer',{options:{classActive:'active',classHidden:'displayNone',classChanged:'changed',tabIndex:0,autowidth:true,position:{my:"left top",at:"left bottom",collision:"fit none"},connector:'arrow'},_id:null,_label:null,_values:null,_apply:null,_closeArea:null,_connector:null,_openedBoxStyle:false,_create:function(){this._id=this.element.attr('id');this._label=this.element.find('.label').first();this._values=this.element.find('.values').first();this._apply=this.element.find('.apply').first();if(this.options.autowidth===true){this._values.css('width',this._label.outerWidth()-2+'px');}
this.element.attr('tabIndex',this.options.tabIndex);this._closeArea=$('<div class="closeArea displayNone"></div>');this.element.prepend(this._closeArea);switch(this.options.connector){case'arrow':this._connector=$('<div class="connector"></div>').addClass(this.options.classHidden).css('width',this._label.outerWidth()-2+'px').append($('<div class="arrow"></div>').css('left',((this._label.outerWidth()-2)/2)-5+'px'));this._label.after(this._connector);break;case'bubble':this._connector=$('<div class="connector"></div>').css('left',this._label.outerWidth()+11+'px').css('margin-top','-'+((this._label.outerHeight()/2)+12)+'px').addClass(this.options.classHidden).append($('<div class="bubble"></div>'));this._label.after(this._connector);break;default:this._connector=this._label;break;}
if($.support.touch){this.options.position.collision="none none";}},_init:function(){var self=this;if(this._openedBoxStyle){this._values.removeClass(this.options.classHidden);this._label.addClass(this.options.classHidden);this._connector.addClass(this.options.classHidden);}
self.element.keydown(function(event){return self.keydown(event);});self.label().click(function(){self._label.click();return false;});self._label.click(function(){self.open();return false;});self._apply.click(function(){self.close();return false;});self._closeArea.click(function(event){if($(event.target).hasClass('closeArea')){self.close();}
return false;});},label:function(){return $('label[for='+this._id+']');},keydown:function(event){switch(event.keyCode){case $.ui.keyCode.ESCAPE:case $.ui.keyCode.ENTER:case $.ui.keyCode.NUMPAD_ENTER:this.close();return false;default:return true;}},hasLayer:function(){return true;},open:function(){this._closeArea.removeClass(this.options.classHidden);this._label.addClass(this.options.classActive);this._values.removeClass(this.options.classHidden);this._connector.removeClass(this.options.classHidden);this._values.position($.extend({},{of:this._connector},this.options.position));this._trigger('open');},close:function(){this._closeArea.addClass(this.options.classHidden);this._label.removeClass(this.options.classActive);this._values.addClass(this.options.classHidden);this._connector.addClass(this.options.classHidden);this._trigger('close');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCL', bundleError);}


/* LIBCORJHCR */
try{
(function($){"use strict";$.widget('hc.hcrenderable',$.hc.hccacheable,{options:{template:''},_currentTemplate:'',_templateCache:{},_init:function(){this._currentTemplate=this.options.template;this._templateCache={};},template:function(data,template){var source;template=template||this._currentTemplate;if(typeof this._templateCache[template]!=='undefined'){return this._templateCache[template](data);}
this._templateCache[template]=(jQuery('#'+template).html());return this._templateCache[template](data);}});Handlebars.registerHelper('key_value',function(obj,options){var buffer="",key;for(key in obj){if(obj.hasOwnProperty(key)){buffer+=options.fn({key:key,value:obj[key]});}}
return buffer;});Handlebars.registerHelper('formatPrice',function(amount){amount=parseInt(amount,10);if(amount<1000){return amount+',-';}
var thousands=parseInt(amount/1000,10);var hundreds=amount-thousands*1000;if(hundreds<10){hundreds='00'+hundreds;}
else if(hundreds<100){hundreds='0'+hundreds;}
return thousands+'.'+hundreds+',-';});Handlebars.registerHelper('formatPriceWithCurrencyRate',function(amount,currencyRate){amount=parseInt(parseInt(amount,10)*parseFloat(currencyRate),10);if(amount<1000){return amount+',-';}
var thousands=parseInt(amount/1000,10);var hundreds=amount-thousands*1000;if(hundreds<10){hundreds='00'+hundreds;}
else if(hundreds<100){hundreds='0'+hundreds;}
return thousands+'\''+hundreds+',-';});Handlebars.registerHelper('morphology',function(count,wordZero,wordSingluar,wordPlural){count=parseInt(count,10);switch(count){case 0:return wordZero.replace(/\{\{count\}\}/,count);case 1:return wordSingluar.replace(/\{\{count\}\}/,count);default:return wordPlural.replace(/\{\{count\}\}/,count);}});Handlebars.registerHelper('compare',function(lvalue,operator,rvalue,options){var operators,result;operators={'==':function(l,r){return l==r;},'===':function(l,r){return l===r;},'!=':function(l,r){return l!=r;},'!==':function(l,r){return l!==r;},'<':function(l,r){return l<r;},'>':function(l,r){return l>r;},'<=':function(l,r){return l<=r;},'>=':function(l,r){return l>=r;},'strcasecmp':function(l,r){return l.toUpperCase()===r.toUpperCase();},'typeof':function(l,r){return typeof l===r;}};if(!operators[operator]){throw new Error("Handlerbars Helper 'compare' doesn't know the operator "+operator);}
result=operators[operator](lvalue,rvalue);if(result){return options.fn(this);}
return options.inverse(this);});Handlebars.registerHelper('calculatePersons',function(priceList){var priceEntry;var returnValue;var adults=0;var children=0;for(var i=0;i<priceList.length;i++){if(priceList[i].type=='adult'){adults++;}
if(priceList[i].type=='child'){children++;}}
returnValue=adults+' Erw.';if(children>0){returnValue=returnValue+' & '+children+' Ki.';}
return returnValue;});Handlebars.registerHelper('substring',function(string,start,count){return string.substr(start,count);});Handlebars.registerHelper('partial',function(partial,options){if(typeof Handlebars.partials[partial]==='undefined'){Handlebars.registerPartial(partial,$('#'+partial).html());}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCR', bundleError);}


/* LIBCORJHCS */
try{
(function($){"use strict";$.widget('hc.hcselectformperson',$.hc.hcbookingformnewabstract,{options:{id:'',selectFieldId:''},fieldSelect:null,hcSelect:null,participants:{},selectOptionNameValues:[],hideOnSelectElementId:null,_create:function(){var self=this;self.fieldSelect=$('#'+self.options.selectFieldId);self.hcSelect=$('#hcselect-'+self.options.selectFieldId);self.radioGroup=$(self.element).find('input[type="radio"][class="toggler"]');$(document).bind('hcbookingformnewparticipantcomplete',function(event,fields){self._updateSelectOptions(event.target.id,fields);});$(document).bind('hcbookingformnewcustomerparticipantcomplete',function(event,fields){self._updateSelectOptions(event.target.id,fields);});$(document).bind('hcbookingformnewparticipantincomplete',function(event,fields){self._updateSelectOptions(event.target.id,false);});$(document).bind('hcbookingformnewcustomerparticipantincomplete',function(event,fields){self._updateSelectOptions(event.target.id,false);});$(document).bind('hcselectchange',function(event,selected){if(event.target.id!==self.hcSelect.attr('id')){return;}
if(selected.value=='default'){self._unsetFields();self._hideFields(false);}else{self._setFields(self.participants[selected.value]);self._hideFields(true);}});},_isPersonValidForInvoice:function(person){var self=this;var returnVal=false;if(!person.birthdaydate){return false;}
var dateparts=person.birthdaydate.split('.');if(dateparts.length==3){var year=dateparts[2];var month=dateparts[1];var day=dateparts[0];if(self._isDateMinEighteenYears(self._getDateObjFromParts(year,month,day))){returnVal=true;}}
return returnVal;},_isDateMinEighteenYears:function(dateObj){var returnVal=false;var dateEighteen=new Date();dateEighteen.setFullYear(dateEighteen.getFullYear()-18);if(dateEighteen.getTime()>dateObj.getTime()){returnVal=true;}
return returnVal;},_getDateAgeYears:function(dateObj){var dateNow=new Date();return dateNow.getFullYear()-dateObj.getFullYear();},_getDateObjFromParts:function(year,month,day){var dateObj=new Date();dateObj.setFullYear(year,month-1,day);return dateObj;},_setFields:function(fields){var self=this;var changed=false;var changedField=null;for(var key in fields){if(key=='salutation'){$('#'+self.options.id+'-'+key+'-'+fields[key]).each(function(){$(this).attr('checked','checked');changedField=this;});}else{$('#'+self.options.id+'-'+key).each(function(){this.value=fields[key];changedField=this;});}
changed=true;}
if(changed){self._onFieldsChange();$(changedField).change();}},_unsetFields:function(){var self=this;var changed=false;var changedField=null;$.each(self.fieldsPerson,function(key,value){if(value=='salutation'){$.each(self.radioGroup,function(){$(this).removeAttr('checked');$(this).trigger('change');changedField=this;});}else{$('#'+self.options.id+'-'+value).each(function(){this.value='';$(this).removeClass('notempty');changedField=this;});}
changed=true;});if(changed){self._onFieldsChange();$(changedField).change();}},_updateSelectOptions:function(personId,fields){var self=this;if((fields!==false)&&(!fields.birthdaydate||self._isPersonValidForInvoice(fields))){self.participants[personId]=fields;var label=self._getSelectOptionValueFromFields(fields);self.hcSelect.trigger('updateoption',[personId,label]);if(label==self._getSelectOptionValueFromElements(fields)){self.hcSelect.trigger('selectoption',[personId]);}
if(self.fieldSelect.val()==personId){self._setFields(fields);self._hideFields(true);}else if(self.fieldSelect.val()=='default'){if(self.isTargetFieldsEmpty(self._getFieldKeys(fields))){self.hcSelect.trigger('selectoption',[personId]);self._setFields(fields);self._hideFields(true);}}}else{if(self.fieldSelect.val()==personId){self._unsetFields(self.participants[personId]);self.hcSelect.trigger('selectoption',['default']);self._hideFields(false);}
self.hcSelect.trigger('removeoption',[personId]);}},isTargetFieldsEmpty:function(fieldKeys){var self=this;var tmp='';var testString='';$.each(fieldKeys,function(index,value){if(value=='salutation'){return true;}
tmp=$('#'+self.options.id+'-'+value).val();if(tmp){testString+=tmp;}});if(testString.length>0){return false;}else{return true;}},_getFieldKeys:function(fields){var self=this;var keys=new Array();for(var key in fields){keys.push(key);}
return keys;},_getSelectOptionValueFromFields:function(fields){var self=this;var label='';$.each(self.selectOptionNameValues,function(index,value){label+=' '+fields[value];});return $.trim(label);},_getSelectOptionValueFromElements:function(fields){var self=this;var filledPersonData='';$.each(self.selectOptionNameValues,function(index,value){if((value=='salutation')&&(value in fields)){var salutationField=$('#'+self.options.id+'-'+value+'-'+fields[value]);if(salutationField.length>0&&salutationField.attr('checked')){filledPersonData+=' '+fields[value];}}else{filledPersonData+=' '+$('#'+self.options.id+'-'+value).val();}});return $.trim(filledPersonData);},_hideFields:function(boolHide){var self=this;var id=self.hideOnSelectElementId;if(boolHide){$('#'+id).hide();self._setFieldStatus($('#'+id));}else{$('#'+id).show();}},_setFieldStatus:function(element,bolIsValid){var self=this;if(bolIsValid){element.parent().parent('.formElementLine').removeClass('errorLine');if(element.val()&&element.val().length>0){element.addClass('notempty');}}else{element.removeClass('notempty');element.parent().parent('.formElementLine').addClass('errorLine');}},isSelectFieldActive:function(){var self=this;if(self.options.selectFieldId.length>0){return true;}else{return false;}}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCS', bundleError);}


/* LIBCORJSCH */
try{
(function($){"use strict";window.Bananas=function(options){this.init(options);};Bananas.prototype={options:{bar_width:41,currencySymbol:''},constructor:Bananas,init:function(options){this.options=$.extend({},this.options,options);this.reset();return this;},reset:function(){this.data=[];this.axis={low:Number.MAX_VALUE,high:Number.MIN_VALUE,pre:'',post:'',x:null,symbol:this.options.currencySymbol,base:Number.MAX_VALUE};this.merged=false;return this;},addOfferEntry:function(data){var amountPerPerson=Math.round(data.price.amount/data.persons);this.data.push({timestamp_slug:data.departureDate,timestamp:moment.unix(data.departureDate).sod().unix(),listid:data.bookingId,type:"list",price:{amount:amountPerPerson,amount_slug:data.price.amount,currency:data.price.currency,currency_symbol:data.price.currencySymbol}});this.axis.high=Math.max(this.axis.high,amountPerPerson);this.axis.low=Math.min(this.axis.low,amountPerPerson);this.merged=false;return this;},addTtEntry:function(data){this.data.push({timestamp_slug:data.timestamp,timestamp:moment.unix(data.timestamp).sod().unix(),listid:"",type:"tt",price:{amount:data.price.amount,amount_slug:data.price.amount,currency:data.price.currency,currency_symbol:data.price.currencySymbol}});this.axis.low=Math.min(this.axis.low,data.price.amount);this.merged=false;return this;},addDummyEntry:function(timestamp){var _timestamp=moment.unix(timestamp).sod().unix();this.data.push({timestamp_slug:timestamp,timestamp:_timestamp,type:"empty"});this.axis.base=_timestamp;return this;},get:function(){return this._mergeData().data;},count:function(){return this._mergeData().data.length;},getByTimestamp:function(timestamp){var i;var pool=[];var cheap={price:Number.MAX_VALUE,object:null};for(i=0;i<this.data.length;i++){if(timestamp===this.data[i].timestamp){pool.push(this.data[i]);}}
for(i=0;i<pool.length;i++){if(typeof pool[i].price!=="undefined"&&pool[i].price.amount<cheap.price){cheap={price:pool[i].price.amount,object:pool[i]};}}
if(null!==cheap.object){return cheap.object;}
if(pool.length>=1){return pool[0];}
return null;},getByPosition:function(position){return this.data[position];},getViewportPointerPos:function(){return-(this._getXAxis()*this.options.bar_width);},getAxis:function(){this._getXAxis();this._updateAxis();return this.axis;},changeViewport:function(direction){this._getXAxis();if(direction==="left"&&this.changeViewportPossible("left")){this.axis.x-=7;}
if(direction==="right"&&this.changeViewportPossible("right")){this.axis.x+=7;}
return this;},changeViewportPossible:function(direction){if(direction==="left"){if(this._getXAxis()>=7){return true;}}else{if(this._getXAxis()<(this.data.length-14)){return true;}}
return false;},_mergeData:function(){if(this.merged){return this;}
var startDay=this._findStartOfWeek(this._findFirst().timestamp);var endDay=this._findEndOfWeek(this._findLast().timestamp).add('day',1).unix();var index=0;var tween=startDay;var sorted=[];if(this.axis.high===this.axis.low){this.axis.high=this.axis.low+1;}
do{var data=this.getByTimestamp(tween.unix());if(null===data||data.type==="empty"){data={timestamp:tween.unix(),type:"empty"};}else{if(data.price.amount===this.axis.low){data.low=true;}
data.weight=Math.round((data.price.amount-this.axis.low)/(this.axis.high-this.axis.low)*100);data.weight=Math.min(data.weight,130);if(data.weight>=130){data.price.amount_slug=this.axis.high;data.price.cap=true;}else{data.price.amount_slug=data.price.amount;}
data.weight=data.weight+"";}
data.position=index+'';if(tween.day()===6||tween.day()===0){data.weekend=true;}
data.date={'month':tween.format('MMM'),'day':tween.format('D'),'weekday':tween.format('dd')};sorted[index]=data;index++;tween=startDay.add('days',1).sod();}while(tween.unix()<=endDay);this.data=sorted;this.merged=true;return this;},_getXAxis:function(){if(null===this.axis.x){this.axis.x=0;this._mergeData();if(this.data.length<=7){return this.axis.x;}
var i;for(i=0;i<this.data.length;i++){if(this.data[i].low&&i<7){this.axis.x=0;}
if(this.data[i].low&&i>=7){this.axis.x=i-7-(i%7);return this.axis.x;}}}
return this.axis.x;},_updateAxis:function(){if(this._getXAxis()===0){this.axis.pre=this.data[0].date.month;}else{this.axis.pre=this.data[this._getXAxis()-1].date.month;}
if(this._getXAxis()>=this.data.length-14){this.axis.post=this.data[this.data.length-1].date.month;}else{this.axis.post=this.data[this._getXAxis()+14].date.month;}
return this;},_findStartOfWeek:function(timestamp){var date=moment.unix(timestamp);for(var i=0;i<=7;i++){if(date.day()===1){return date;}
date.subtract('days',1);}
return null;},_findEndOfWeek:function(timestamp){var date=moment.unix(timestamp);for(var i=0;i<=7;i++){if(date.day()===0){return date;}
date.add('days',1);}
return null;},_findFirst:function(){var res,i;var low=Number.MAX_VALUE;for(i=0;i<this.data.length;i++){if(low>this.data[i].timestamp){low=this.data[i].timestamp;res=this.data[i];}}
return res;},_findLast:function(){var res,i;var max=Number.MIN_VALUE;for(i=0;i<this.data.length;i++){if(max<this.data[i].timestamp){max=this.data[i].timestamp;res=this.data[i];}}
return res;}};})(window.jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJSCH', bundleError);}


/* LIBCORJSTI */
try{
!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options)
this.$window=$(window).on('scroll.affix.data-api',$.proxy(this.checkPosition,this)).on('click.affix.data-api',$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this))
this.$element=$(element)
this.checkPosition()}
Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return;var scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,disabled=this.options.disabled,offsetBottom=offset.bottom,offsetTop=offset.top,reset='affix affix-top affix-bottom',affix
if(typeof offset!='object')offsetBottom=offsetTop=offset
if(typeof offsetTop=='function')offsetTop=offset.top()
if(typeof offsetBottom=='function')offsetBottom=offset.bottom()
if(typeof disabled=='function')disabled=disabled()
affix=this.unpin!=null&&(scrollTop+this.unpin<=position.top)?false:offsetBottom!=null&&(position.top+this.$element.height()>=scrollHeight-offsetBottom)?'bottom':offsetTop!=null&&scrollTop<=offsetTop?'top':false
if(this.affixed===affix)return
this.affixed=affix
this.unpin=affix=='bottom'?position.top-scrollTop:null
this.$element.removeClass(reset).addClass('affix'+(affix?'-'+affix:''))}
$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data('affix'),options=typeof option=='object'&&option
if(!data)$this.data('affix',(data=new Affix(this,options)))
if(typeof option=='string')data[option]()})}
$.fn.affix.Constructor=Affix
$.fn.affix.defaults={offset:0}
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data()
data.offset=data.offset||{}
data.disabled=data.disabled||{}
data.offsetBottom&&(data.offset.bottom=data.offsetBottom)
data.offsetTop&&(data.offset.top=data.offsetTop)
$spy.affix(data)})})}(window.jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJSTI', bundleError);}


/* LIBCORJHCA */
try{
(function($){$.widget('hc.hcadvanced',{options:{labelClose:'',labelOpen:'',close:true},_close:true,_init:function(){var self=this;self._close=self.options.close;self.element.on('click','.advanced-option',function(){var element=$(this);element.toggleClass('advanced-option-close advanced-option-open');self.element.children('div').toggleClass('advanced-content-close advanced-content-open');if(self._close===true){element.text(self.options.labelClose);self._close=false;return;}
element.text(self.options.labelOpen);self._close=true;});}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCA', bundleError);}


/* LIBCORJHCA */
try{
(function($){"use strict";$.widget('hc.hcairport',{options:{url:'',radius:150},_autocompleter:null,_create:function(){this._autocompleter=this.element.find('.autocompleter input[type=text]').first();},_init:function(){var self=this;self._autocompleter.bind('hcautocompleteselect',function(event,ui){if(typeof ui.item.id==='undefined'){return;}
self._search(ui.item.id);});self.element.bind('hcmultiselectuncheckall',function(){self._autocompleter.hcautocomplete('reset');});self.element.bind('hcmultiselectclose',function(){self._autocompleter.hcautocomplete('selectFirst');});self.element.bind('hcmultiselectopen',function(){if($.support.touch){return;}
self._autocompleter.focus();});self.element.bind('hcmultiselectuncheckall',function(){self.element.find('.error').remove();});$.each(self.element.find('.hcselect-group-elements'),function(){$(this).find('label:last-child').prev('label').addBack().addClass('last');});},_search:function(cityId){cityId=cityId||this._autocompleter.hcautocomplete('getSelectedItem').id;this.element.hcmultiselect('uncheckAll');this.element.find('.error').remove();if(isNaN(cityId)||cityId<=0){return;}
var self=this;self._autocompleter.hcautocomplete('showLoading');$.getJSON(self.options.url,{'cityId':cityId,'radius':this.options.radius},function(data){self._autocompleter.hcautocomplete('hideLoading');if(data.error!==''){self.element.find('.hcairport-search').parent().append($('<div class="error"></div>').html(data.error));return;}
self._updateAirportList(data.codes);});},_updateAirportList:function(list){var self=this;$.each(list,function(id,iata){self.element.hcmultiselect('check',id);});},label:function(){return this.element.hcmultiselect('label');},hasLayer:function(){return this.element.hcmultiselect('hasLayer');},open:function(){this.element.hcmultiselect('open');},close:function(){this.element.hcmultiselect('close');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCA', bundleError);}


/* LIBCORJHCA */
try{
(function($){"use strict";var requestIndex=0,cache={};$.extend(true,$.ui.menu.prototype,{move:function(direction,edge,event){var edgeElement,next;if(!this.active){edgeElement=this.element.children(edge);if(direction==='next'&&edgeElement.hasClass('ui-autocomplete-pagination-prev')){edgeElement=this.element.children('.ui-menu-item:not(.ui-autocomplete-pagination):first');}
if(direction==='prev'&&edgeElement.hasClass('ui-autocomplete-pagination-next')){edgeElement=this.element.children('.ui-menu-item:not(.ui-autocomplete-pagination):last');}
this.activate(event,edgeElement);return;}
next=this.active[direction+"All"](".ui-menu-item").eq(0);if(next.hasClass('ui-autocomplete-pagination')){next.click();return;}
if(next.length){this.activate(event,next);}else{this.activate(event,this.element.children(edge));}}});$.widget('hc.hcautocomplete',$.ui.autocomplete,{options:{use:'hc',enabledCache:true,labelNext:null,labelPrev:null,autoFocus:true,closeSelectFirst:false,noResultMessage:null,value:{id:null,type:null,autocompleter:null},defaultValue:{id:null,type:null,autocompleter:null},classChanged:'changed',hitMarkup:'<span class="hit">$1</span>',position:{my:"left top",at:"left bottom",collision:"fit none"},filter:{typ:'kid,rid,oid,lid',sprache:'de',vorschlagid:false,view:'json',highlighting:false,spellchecker:true,von:1,bis:11,ziel:'',zielid:0}},_closeArea:null,_create:function(){$.ui.autocomplete.prototype._create.apply(this,arguments);var self=this;self._closeArea=$('<div class="closeArea displayNone"></div>');self._closeArea.click(function(event){if($(event.target).hasClass('closeArea')){self.close();}
return false;});this.element.after(self._closeArea);this.element.keydown(function(event){switch(event.keyCode){case $.ui.keyCode.ENTER:case $.ui.keyCode.NUMPAD_ENTER:self.selectFirst();return false;}});this.element.focus(function(){self.reset();self.element.change();if($.browser.msie||!!navigator.userAgent.match(/Trident.*rv\:11\./)){return false;}});this.element.bind('hcautocompleteopen',function(event,ui){self._closeArea.removeClass('displayNone');});this.element.bind('hcautocompleteclose',function(event,ui){self._closeArea.addClass('displayNone');});this.element.bind('hcautocompleteselect',function(event,ui){var item=ui.item;if($(this).attr('id')=='hotel-destinationHotel-autocompleter'){dataLayer.push({event:'event',eventCategory:'EA siteSearch',eventAction:'Reiseziel',eventLabel:'autocomplete '+item.label});}
$('#'+$(this).attr('id').replace(/autocompleter/,'id')).val(item.id);$('#'+$(this).attr('id').replace(/autocompleter/,'type')).val(item.typ);self.element.removeClass(self.options.classChanged);if(self.options.defaultValue!==null&&self.options.defaultValue.autocompleter!=item.label){self.element.addClass(self.options.classChanged);}});this.element.change(function(){var item=$(this);self.element.removeClass(self.options.classChanged);if(self.options.defaultValue!==null&&self.options.defaultValue.autocompleter!=item.val()){self.element.addClass(self.options.classChanged);}});this.setFilter(this.options.filter);if(this.options.use!=='ui'&&typeof this.options.source!='object'){this.menu.element.click(function(event){if(!$(event.target).closest(".ui-autocomplete-pagination").length){return;}
if($(event.target).hasClass('ui-autocomplete-pagination-next')||$(event.target).parent().hasClass('ui-autocomplete-pagination-next')){self.filter.von=self.filter.bis;self.filter.bis=self.filter.bis+(self.options.filter.bis-self.options.filter.von);}
if($(event.target).hasClass('ui-autocomplete-pagination-prev')||$(event.target).parent().hasClass('ui-autocomplete-pagination-prev')){self.filter.bis=self.filter.von;self.filter.von=(self.filter.bis+self.options.filter.von)-self.options.filter.bis;}
self._search(self.term);event.preventDefault();});}
if($.support.touch){this.options.position.collision="none none";}},selectFirst:function(){if(this.options.closeSelectFirst&&this.menu.active&&this.term===this.element.val()){var clickEvent=new $.Event("click");clickEvent.target=this.menu.element.find('.ui-menu-item:not(.ui-autocomplete-pagination):first').first();this.menu.select(clickEvent);}},close:function(event){$.ui.autocomplete.prototype.close.apply(this,arguments);this.filter=$.extend({},this.options.filter);},_search:function(value){var lastIndex=value.lastIndexOf('(');if(lastIndex!==-1){value=value.substring(0,lastIndex);}
this.pending++;this.showLoading();this.cancelSearch=false;if(value!=this.term){this.setFilter(this.options.filter);}
if(this.options.use==='ui'||typeof this.options.source==='object'){this.source({term:value},this._response());return;}
this.source($.extend({anfrage:value},this.filter),this._response());},_response:function(){var self=this,index=++requestIndex;return function(content){if(index===requestIndex){self.__response((content.items?content.items:content));}
self.pending--;if(!self.pending){self.hideLoading();}};},_initSource:function(){var self=this,array,url;if($.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term));};}else if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){var cacheKey='';if(self.options.enabledCache===true){cacheKey=self._getCacheId(request);if(cacheKey in cache){response(cache[cacheKey]);return;}}
if(self.xhr){self.xhr.abort();}
self.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data,status){if(self.options.enabledCache===true){cache[cacheKey]=data;}
response(data);},error:function(){response([]);}});};}else{this.source=this.options.source;}},__response:function(content){if(!this.options.disabled&&content&&content.length){content=this._normalize(content);this._suggest(content);this._trigger("open");return;}
if(this.options.noResultMessage!==null){content=[{label:this.options.noResultMessage}];this._suggest(content);this._trigger("open");return;}
this.close();},_renderMenu:function(ul,items){var self=this,currentCategory='',filter=self.options.filter,defaultItems;$.each(items,function(index,item){if(item.typ!=currentCategory&&item.typ==='hint'){ul.append("<li class='ui-autocomplete-category'>"+item.label+"</li>");currentCategory=item.typ;return;}
self._renderItem(ul,item);});if('von'in filter&&'bis'in filter){defaultItems=parseInt(filter.bis,10);if(defaultItems===items.length){ul.append('<li class="ui-menu-item ui-autocomplete-pagination ui-autocomplete-pagination-next"><span>'+
self.options.labelNext+'</span></li>');}
if(self.filter.von>1){ul.prepend('<li class="ui-menu-item ui-autocomplete-pagination ui-autocomplete-pagination-prev"><span>'+
self.options.labelPrev+'</span></li>');}}},_renderItem:function(ul,item){var regEx=new RegExp('('+this._quote(this.term)+')','ig');return $("<li></li>").data("item.autocomplete",item).append($("<a></a>").html(item.label.replace(regEx,this.options.hitMarkup))).appendTo(ul);},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return;}
if(this.menu.first()&&/^previous/.test(direction)){return;}
if(this.menu.last()&&/^next/.test(direction)){return;}
this.menu[direction](event);},_quote:function(str){return(str+'').replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");},_getCacheId:function(request){var serialize=$.param(request),cacheId=0,i=0;for(i;i<serialize.length;i++){if(cacheId===0){cacheId=(cacheId+parseInt(serialize.charCodeAt(i),10));}else{cacheId=(cacheId+parseInt(serialize.charCodeAt(i),10))/cacheId;}}
cacheId=''+cacheId;return cacheId.replace('.','');},getSelectedItem:function(){return{id:$('#'+this.element.attr('id').replace(/autocompleter/,'id')).val(),type:$('#'+this.element.attr('id').replace(/autocompleter/,'type')).val(),label:this.element.val()};},showLoading:function(){this.element.addClass("ui-autocomplete-loading");},hideLoading:function(){this.element.removeClass("ui-autocomplete-loading");},reset:function(){this.element.val('');$('#'+this.element.attr('id').replace(/autocompleter/,'id')).val('');$('#'+this.element.attr('id').replace(/autocompleter/,'type')).val('');},setFilter:function(filter){this.filter=$.extend({},filter);}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCA', bundleError);}


/* LIBCORJHCB */
try{
(function($){"use strict";$.widget('hc.hcbookingform',$.hc.hccacheable,{options:{expired:3600000,id:''},allowedIds:['customer-','participants-'],cacheId:'bookingform',cache:{},_create:function(){var self=this;try{self._initCache(self.cacheId,self.options.expired);self.cache=self._getCache('formdata',null,self.cacheId);if(self.cache!=null){$.each(self.cache,function(index,value){if(value!==null&&value!=='null'){if(self.options.id=='travelbookingtt'){if(index=='customer-country'){return;}
if(index=='customer-countrytt'){index='customer-country';}}
$.each($('#'+index),function(){this.value=value;});}});}}catch(e){}
try{$.each($(this.element).find('input'),function(){this.enablePlaceholder();});}catch(e){}
self.element.on('change',function(){try{if(self.cache==null){self.cache={};}
$.each($(this).find('input'),function(){if(self._checkElement(this)){self.cache[this.id]=this.value;}});$.each($(this).find('select'),function(){if(self._checkElement(this)){self.cache[this.id]=this.value;}});if(self.options.id=='travelbookingtt'){var countryTt=self.cache['customer-country'];var country=null;if(countryTt!=''){switch(countryTt){case'D':country='41';break;case'A':country='146';break;case'CH':country='166';break;}}
self.cache['customer-countrytt']=countryTt;self.cache['customer-country']=country;}else{var country=self.cache['customer-country'];var countryTt=null;if(country!=''){switch(country){case'41':countryTt='D';break;case'146':countryTt='A';break;case'166':countryTt='CH';break;}}
if(countryTt!=null){self.cache['customer-countrytt']=countryTt;}}
self._setCache('formdata',self.cache,self.cacheId);}catch(e){}});},_checkElement:function(element){var self=this;if(element.value===null||element.value==='null'){return false;}
if(element.id==''){return false;}
var placeholder=element.get('placeholder');if(placeholder&&placeholder.trim()==element.value.trim()){return false;}
var checkOk=false;$.each(self.allowedIds,function(index,name){if(element.id.indexOf(name)===0){checkOk=true;return true;}});return checkOk;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCB', bundleError);}


/* LIBCORJHCB */
try{
(function($){"use strict";$.widget('hc.hcbookingpricelist',{items:{},selectedItems:{},placeholderPriceSecondary:'',totalPriceSecondary:null,options:{items:{},placeholderPriceSecondary:''},_init:function(){var self=this;self.placeholderPriceSecondary=this.options.placeholderPriceSecondary;$.each(this.options.items,function(id){var selector=$('#'+id);self.items[id]=this;if(selector.length>0){selector.bind('click',self._change());}
if(this.selected===true){self.showItem(this);}});$(document).bind('rentedcarchosen',self._rentedCarEvent());$(document).bind('vouchersuccess',self._voucherEvent());},_change:function(){var self=this;return function(){if(typeof self.items[$(this).attr('id')]==='undefined'){return;}
self.showItem(self.items[$(this).attr('id')]);};},_voucherEvent:function(){var self=this;return function(event,price,priceSecondary){self.showItem({target:'voucher',label:'',price:{primary:price,secondary:priceSecondary}});};},_rentedCarEvent:function(){var self=this;return function(event,vehicle,from,to){if(typeof self.items['rentedcar-choose-1']==='undefined'){return;}
var item=self.items['rentedcar-choose-1'];item.label=vehicle.name+', '+$(from).val()+' - '+$(to).val();item.price.primary=vehicle.priceArray;if(typeof vehicle.priceSecondaryArray!=='undefined'){item.price.secondary=vehicle.priceSecondaryArray;}
self._rentedCarEventAdditional();if(typeof self.selectedItems.rentedcar==='undefined'||self.selectedItems.rentedcar!==self.items['rentedcar-choose-1']){return;}
self.showItem(item);};},_rentedCarEventAdditional:function(){},showItem:function(item){this.selectedItems[item.target]=item;var row=this.element.find('.'+item.target).first();if(row.length===0){return;}
if(item.label.length===0){row.find('.label .value').html('');}else{row.find('.label .value').html('('+item.label+')');}
row.find('.price').html(this.format(item.price.primary));if(typeof item.price.secondary!=='undefined'&&item.price.secondary!==null){row.find('.secondaryPrice').html(this.format(item.price.secondary));}else{row.find('.secondaryPrice').remove();}
if(parseFloat(item.price.primary.amount)===0&&item.target!=='payment'&&item.target!=='travelprice-hint'&&item.target!=='totalprice-hint'&&item.target!=='child1'&&item.target!=='child2'&&item.target!=='child3'&&item.target!=='child4'){row.addClass('displayNone');}else{row.removeClass('displayNone');}
this.calculateTotalPrice();},calculateTotalPrice:function(){var self=this,totalPrice={amount:0,currency:'EUR',symbol:'€'},totalPriceSecondary={amount:0,currency:'EUR',symbol:'€'};$.each(this.selectedItems,function(index){if(index==='voucher'||index==='travelduration'||index==='taxesAndFees'||index.match('traveller')||index.match('child')){return;}
totalPrice.amount+=parseFloat(this.price.primary.amount);totalPrice.currency=this.price.primary.currency;totalPrice.symbol=this.price.primary.symbol;totalPrice.calculated=this.price.primary.calculated||totalPrice.calculated;if(typeof this.price.secondary!=='undefined'&&this.price.secondary!==null){totalPriceSecondary.amount+=parseFloat(this.price.secondary.amount);totalPriceSecondary.currency=this.price.secondary.currency;totalPriceSecondary.symbol=this.price.secondary.symbol;totalPriceSecondary.calculated=this.price.secondary.calculated||totalPriceSecondary.calculated;}});this.element.find('.totalprice .price').html(this.format(totalPrice));if(totalPriceSecondary.amount!==0){this.element.find('.totalprice .secondaryPrice').html(this.format(totalPriceSecondary));}else{this.element.find('.totalprice .secondaryPrice').remove();}
self.totalPriceSecondary=totalPriceSecondary;},format:function(priceObject,ignorePlaceholder){var amount=this._formatMoney(priceObject.amount,2,',','.'),priceString='';if(priceObject.currency==='CHF'){amount=this._formatMoney(priceObject.amount,0,',','\'');}
if(typeof priceObject.calculated!=='undefined'&&priceObject.calculated===true&&ignorePlaceholder!==true){priceString=this.placeholderPriceSecondary.replace('{{amount}}',amount+' '+priceObject.symbol);}else{priceString+=amount+' '+priceObject.symbol;}
return priceString;},_formatMoney:function(number,decimal,decimalSeparator,thousandsSeparator){var n=number,c=isNaN(decimal)?2:Math.abs(decimal),d=decimalSeparator||'.',t=(typeof thousandsSeparator==='undefined')?',':thousandsSeparator,sign=(n<0)?'-':'',i=(parseInt(n=Math.abs(n).toFixed(c),10)).toString(),j=i.length;j=(j>3)?j%3:0;return sign+(j?i.substr(0,j)+t:'')+
i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):'');}});}(jQuery));
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCB', bundleError);}


/* LIBCORJHCB */
try{
(function($){"use strict";$.widget('hc.hcbookingpricelistadditional',$.hc.hcbookingpricelist,{_additions:null,_rentedcar:null,_insurance:null,_init:function(){$.hc.hcbookingpricelist.prototype._init.call(this);var self=this;self._additions=$('#travelAdditions');self._rentedcar=self._additions.find('.rentedcar');self._insurance=self._additions.find('.insurance');$.each(this.options.items,function(id){var selector=$('#'+id);if(selector.length>0){selector.bind('click',self._changeAdditional());}
if(this.selected===true){self.enable(this.target,this.label);}});},_rentedCarEventAdditional:function(){var self=this;if(typeof self.selectedItems.rentedcar==='undefined'||self.selectedItems.rentedcar!==self.items['rentedcar-choose-1']){return;}
self.enable('rentedcar',self.selectedItems.rentedcar.label);},_changeAdditional:function(){var self=this;return function(){if(typeof self.items[$(this).attr('id')]==='undefined'){return;}
var item=self.items[$(this).attr('id')];if(item.target==='insurance'){if(item.label!==''){self.enable('insurance',item.label);}else{self.disable('insurance');}}
if(item.target==='rentedcar'){if(item.label!==''){self.enable('rentedcar',item.label);}else{self.disable('rentedcar');}}};},calculateTotalPrice:function(){$.hc.hcbookingpricelist.prototype.calculateTotalPrice.call(this);if(this.totalPriceSecondary!==null){this.element.find('.totalprice-hint .secondaryPriceHint').html(this.format(this.totalPriceSecondary,true));}},enable:function(target,label){if(label===''){return;}
switch(target){case'insurance':this._insurance.removeClass('displayNone');this._insurance.find('.value').html(label);break;case'rentedcar':this._rentedcar.removeClass('displayNone');this._rentedcar.find('.value').html(label);break;}
this._checkDisplay();},disable:function(target){switch(target){case'insurance':this._insurance.addClass('displayNone');break;case'rentedcar':this._rentedcar.addClass('displayNone');break;}
this._checkDisplay();},_checkDisplay:function(){if((this._insurance.length===0||this._insurance.hasClass('displayNone'))&&this._rentedcar.hasClass('displayNone')){this._additions.addClass('displayNone');return;}
this._additions.removeClass('displayNone');}});}(jQuery));
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCB', bundleError);}


/* LIBCORJHCC */
try{
(function($){"use strict";$.widget('hc.hccheckbox',{options:{classHidden:'hiddenCheckbox',classChecked:'checked',classChanged:'changed'},_create:function(){var self=this;$.each(this._findCheckboxes(self.element),function(){self._addToElement($(this));});},_init:function(){var self=this,label;if(self.element.attr('type')==='checkbox'){self.element.parent().find('.checkbox').first().on('click',function(event){self.element.click();});self.element.on('change',function(event){self._change(event,this);});label=self.element.parent().find('label[for='+self.element.attr('id')+']');return;}
$(self.element).delegate('input[type=checkbox]','change',function(event){self._change(event,this);});},_addToElement:function(element){var value,classes;if(element.parent().find('.checkbox').first().length>0){return;}
value=element.attr('checked');classes=element.attr('class');element.addClass(this.options.classHidden);element.after('<div class="hccheckbox-container"><div class="checkbox '+
(value||'')+' '+(classes||'')+'"></div></div>');},_findCheckboxes:function(element){if(element.attr('type')==='checkbox'){return $(element);}
return element.find('input[type=checkbox]');},_change:function(event,eventElement){var checkbox=$(eventElement),element=checkbox.parent().find('.checkbox').first();if(checkbox.attr('checked')==='checked'){element.addClass(this.options.classChecked);checkbox.addClass(this.options.classChanged);}else{element.removeClass(this.options.classChecked);checkbox.removeClass(this.options.classChanged);}},hasLayer:function(){return false;},label:function(){return $('label[for="'+this.element.attr('id')+'"]');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCC', bundleError);}


/* LIBCORJHCC */
try{
(function($){"use strict";$.widget('hc.hcchildgroup',$.hc.hchoverslider,{options:{defaultValue:0,value:0},_selects:null,_title:null,_layer:null,_create:function(){$.hc.hchoverslider.prototype._create.call(this);this._layer=this.element.find('.hcmultiselect-container').first();this._selects=this._layer.find('.element');this._title=this._layer.find('.hcmultiselect-header-title span');},_init:function(){var self=this;$.hc.hchoverslider.prototype._init.call(self);self.element.bind('hcchildgroupchange',function(){var value=self.value(),showUntil=0;self._hideSelects();$.each(self._selects,function(index){var element=$(this);if(index<value){element.removeClass(self.options.classHidden);return;}
if(element.find('select').val()>0){showUntil=index;}});if(showUntil>0){$.each(self._selects.slice(showUntil,self._selects.length),function(){$(this).find('select').val(0).trigger('change');});}
if(value<=0){return;}
self._title.text(self._select.find('option:selected').text());self.element.find('.hcmultiselect-container').removeClass(self.options.classHidden);self._layer.hclayer('open');});self._layer.bind('hclayerclose',function(){var counter=0,lastSelect=[];$.each(self._selects.find('select'),function(){if($(this).val()>0){if(lastSelect.length!==0&&parseInt(lastSelect.val(),0)===0){lastSelect.val(this.value).trigger('change');$(this).val(0).trigger('change');lastSelect=$(this);}
counter++;}else{if(lastSelect.length===0){lastSelect=$(this);}}});self._changeCurrent(counter,true);self.element.find('.hcmultiselect-container').addClass(self.options.classHidden);});},_hideSelects:function(){this._selects.addClass('displayNone');},hasLayer:function(){return this._layer.hclayer('hasLayer');},open:function(){this.element.trigger('hcchildgroupchange');},close:function(){this._layer.hclayer('close');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCC', bundleError);}


/* LIBCORJHCD */
try{
(function($){"use strict";$.extend(true,$.datepicker,{_selectDateDefault:$.datepicker._selectDate,_setDateDefault:$.datepicker._setDate,_newDefaultInst:$.datepicker._newInst,_showDefaultDatepicker:$.datepicker._showDatepicker,_defaults:{classChanged:'changed',defaultValue:null,position:{my:"left top",at:"left bottom",collision:"fit none"},beforeShow:function(input,inst){var label=$(input),connector=$('<div class="connector"></div>').css('width',label.outerWidth()-2+'px').append($('<div class="arrow"></div>').css('left',((label.outerWidth()-2)/2)-5+'px')),closeArea=$('<div class="closeArea"></div>').click(function(event){if($(event.target).hasClass('closeArea')){$.datepicker._hideDatepicker(input);}});label.after(closeArea).after(connector).addClass('active');},onClose:function(dateText,inst){if($.inArray(inst.input.attr('id'),['package-departureDate','package-returnDate','hotel-departureDate','hotel-returnDate'])!==-1){dataLayer.push({event:'event',eventCategory:((inst.input.attr('id').indexOf('package-')!==-1)?'LaPa':'EA')+' siteSearch',eventAction:inst.input.attr('id').replace('package-','').replace('hotel-',''),eventLabel:dateText});}
var label=$(inst.input);label.next('.connector').remove();label.next('.closeArea').remove();label.removeClass('active');}},_newInst:function(target,inline){var instance=$.datepicker._newDefaultInst(target,inline),self=this;instance.element=target;instance.label=function(){return $('label[for="'+target.attr('id')+'"]');};instance.hasLayer=function(){return true;};instance.open=function(){self._showDatepicker(target[0]);};instance.close=function(){self._hideDatepicker(target[0]);};return instance;},_checkOffset:function(inst,offset,isFixed){var position=this._get(inst,'position');if($.support.touch){position.collision="none none";}
inst.dpDiv.position($.extend(position,{of:$(inst.input).next()}));return{};},_selectDate:function(id,dateStr){var inst=this._getInst($(id)[0]),classChanged=this._get(inst,'classChanged'),defaultValue=this._get(inst,'defaultValue'),$input=$(inst.input);$input.trigger('hcdatepickerbeforeselect');this._selectDateDefault(id,dateStr);$('.ui-datepicker a').removeAttr('href');$input.removeClass(classChanged);if(defaultValue!==null&&defaultValue!=$input.val()){$input.addClass(classChanged);}
$input.trigger('hcdatepickerselect');},_setDate:function(inst,date,noChange){var classChanged=this._get(inst,'classChanged'),defaultValue=this._get(inst,'defaultValue'),$input=$(inst.input);$input.trigger('hcdatepickerbeforeset');this._setDateDefault(inst,date,noChange);$input.removeClass(classChanged);if(defaultValue!==null&&defaultValue!=$input.val()){$input.addClass(classChanged);}
$input.trigger('hcdatepickerset');},_showDatepicker:function(input){$(this).blur();if($(input).attr('type')!=='text'){input.preventDefault();}
$.datepicker._showDefaultDatepicker(input);}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCD', bundleError);}


/* LIBCORJHCD */
try{
(function($){"use strict";$.widget('hc.hcdestination',$.hc.hclayer,{options:{autowidth:false,defaultValue:{value:0,type:'tr',label:''},selectedTab:0},_value:null,_type:null,_any:null,_autocompleter:null,_closing:false,_create:function(){$.hc.hclayer.prototype._create.call(this);this._any=this.element.find('.any a').first();this._value=this.element.find('.target').first();this._type=this.element.find('.target_type').first();this._autocompleter=this.element.find('.autocompleter input[type=text]');},_init:function(){var self=this;$.hc.hclayer.prototype._init.call(self);self._values.find('.hcdestination-tabs').tabs({selected:self.options.selectedTab});self._autocompleter.bind('hcautocompleteselect',function(event,ui){var item=ui.item;if(typeof item.id==='undefined'){return;}
self._value.val(item.id);self._type.val(item.typ);self.element.addClass(self.options.classChanged);self._label.find('.text').html(item.label);dataLayer.push({event:'event',eventCategory:'LaPa siteSearch',eventAction:'Reiseziel',eventLabel:'autocomplete '+item.label});if(self._closing===true){return;}
self.close();});self.element.bind('hcdestinationopen',function(){self._closing=false;if($.support.touch){return;}
self._autocompleter.focus();});self.element.bind('hcdestinationclose',function(){self._closing=true;self._autocompleter.hcautocomplete('selectFirst');});self._any.click(function(){self._value.val(self.options.defaultValue.value);self._type.val(self.options.defaultValue.type);self._label.find('.text').html(self.options.defaultValue.label);self.element.removeClass(self.options.classChanged);self._autocompleter.hcautocomplete('reset');self.close();dataLayer.push({event:'event',eventCategory:'LaPa siteSearch',eventAction:'Reiseziel',eventLabel:'beliebiges Reiseziel'});return false;});$(self._values).delegate('.group a','click',function(){var className=$(this).attr('class').split('-');self._type.val(className[0]);self._value.val(className[1]);self.element.addClass(self.options.classChanged);self._label.find('.text').html($(this).text());self._autocompleter.val('');self.close();dataLayer.push({event:'event',eventCategory:'LaPa siteSearch',eventAction:'Reiseziel',eventLabel:$(this).text()});return false;});},keydown:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){this.close();return false;}
return true;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCD', bundleError);}


/* LIBCORJHCE */
try{
(function($){"use strict";$.widget('hc.hcexpander',$.hc.hccacheable,{options:{labelClose:'',labelOpen:'',closed:true,slide:false,opener:'',cacheId:false},_closed:true,_toggler:null,_content:null,_slide:false,_opener:false,_create:function(){this._closed=this.options.closed;this._slide=this.options.slide;this._toggler=this.element.find('.hcexpander-toggler');this._content=this.element.find('.hcexpander-content');this._opener=this.options.opener;if(this.options.cacheId!==false){this._initCache(this.options.cacheId,86400000);if(this._getCache('closed')!==null){this._closed=/^true$/i.test(this._getCache('closed'));}
if(this._closed===true){this.close();}else{this.open();}}
var self=this;self._toggler.click(function(){self.toggle();return false;});if(this.opener!==''){$('#'+this._opener).on('click',null,function(){self.toggle();return false;});}},toggle:function(){if(this._closed===true){this.open();return false;}
this.close();},open:function(){if(this._slide){this._content.slideDown(250);}
this._toggler.removeClass('hcexpander-toggler-close');this._toggler.addClass('hcexpander-toggler-open');this._content.removeClass('hcexpander-content-close');this._content.addClass('hcexpander-content-open');if(this.options.labelClose.length){this._toggler.children('span').html(this.options.labelClose);}
this._closed=false;if(this.options.cacheId!==false){this._setCache('closed',"false");}
this._trigger('open');},close:function(){if(this._slide){this._content.slideUp(250);}
this._toggler.addClass('hcexpander-toggler-close');this._toggler.removeClass('hcexpander-toggler-open');this._content.addClass('hcexpander-content-close');this._content.removeClass('hcexpander-content-open');if(this.options.labelOpen.length){this._toggler.children('span').html(this.options.labelOpen);}
this._closed=true;if(this.options.cacheId!==false){this._setCache('closed',"true");}
this._trigger('close');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCE', bundleError);}


/* LIBCORJHCF */
try{
(function($){"use strict";$.widget('hc.hcform',{options:{scrollToTarget:null,classChanged:'changed',expired:1800000},_form:null,_create:function(){var self=this;if(!$.hc.hcofferlist.submitCount){$.hc.hcofferlist.submitCount=1;}
function onsubmit(event){var isPackageSearch=self.element.find('#package-submit');if(isPackageSearch){++$.hc.hcofferlist.submitCount;dataLayer.push({event:"event",eventCategory:"LaPa Offerlist",eventAction:"Offer Refresh",eventLabel:"OfferRefresh_"+$.hc.hcofferlist.submitCount});var filter=self.element.find('#package-filter');if(filter){filter.val(0);}}
$('#searchOffersChangeHint').css({display:"none"});self.element.trigger('initCache',[self.getCacheId(),self.options.expired]);self._trigger('submit',event,[self]);self.scroll();self.setValuesUnchanged();return false;}
self.form().submit(onsubmit);$(document).bind('cacheExpired',function(event,widgetName,bookingId){$('#dialog-expired').dialog("open");});$(document).bind('offersreload',function(event){$('#dialog-expired').dialog("close");self._trigger('submit',event,[self]);self.scroll();});$(document).bind('hcselectclose hcmultiselectclose hcairportclose hctravelrangeclose hctravellergroupclose',function(event){if(!self.isOnScreen(self.element.find('[type=submit]'))){self.scroll();}
try{var id=event.target.id;}catch(e){return;}
var relevantIds=["package-airport","hctravelrange-package-departureDatepackage-returnDatepackage-durationSelect","hctravellergroup-package-adultschildFirstchildSecondchildThirdchildFourth","package-roomType","hcselect-package-catering","hcselect-package-transfer","package-organizer","hcselect-package-priceSelect"];if($.inArray(id,relevantIds)==-1){return;}
if(self.areValuesChanged()){$('#searchOffersChangeHint').css({display:"block"});}else{$('#searchOffersChangeHint').css({display:"none"});}});$(document).bind('hcofferlistvacancyclear',function(event){self._trigger('submit',event,[self]);});},_init:function(){window.setTimeout($.proxy(function(){this.element.trigger('initCache',[this.getCacheId(),this.options.expired]);this._trigger('submit',{},[this]);},this),1);},form:function(){if(this._form===null){this._form=this.element.find('form').first();}
return this._form;},getCacheId:function(){var form=this.form().find(':input').not('.hcairport .hcmultiselect-header :input'),formData=form.serialize();return formData.replace(/[A-Za-z0-9\%]+=/g,'|');},changed:function(){var changed={};$.each(this.form().find('.'+this.options.classChanged),function(){var $this=$(this);if($this.hasClass('hasDatepicker')){changed[$this.attr('id')]=$this.data('datepicker');}
$.each(['hctravelrange','hcmultiselect','hcselect'],function(index,name){if($this.is(':hc-'+name)){var id=$this.attr('id'),widget=$this.data(name);changed[id]=widget;return false;}});});return changed;},areValuesChanged:function(){var changed=false;var self=this;$.each(['hctravelrange','hcmultiselect','hcselect'],function(index,name){$.each(self.form().find(':hc-'+name),function(){var $this=$(this);try{if($this.data(name).isValueChanged()){changed=true;return false;}}catch(e){}});});return changed;},setValuesUnchanged:function(){var self=this;$.each(['hctravelrange','hcmultiselect','hcselect'],function(index,name){$.each(self.form().find(':hc-'+name),function(){var $this=$(this);try{$this.data(name).setValueUnchanged();}catch(e){}});});},getElementByWidget:function(name){return this.element.find(':hc-'+name).data(name);},getElementById:function(id,dataName){return this.form().find('#'+id).data(dataName);},scroll:function(){if(this.options.scrollToTarget===null){return;}
var $target=$(this.options.scrollToTarget);$('html, body').animate({"scrollTop":$target.offset().top-6},'slow');},isOnScreen:function($element){var $window=$(window),bounds=$element.offset(),viewport={top:$window.scrollTop(),left:$window.scrollLeft()};viewport.right=viewport.left+$window.width();viewport.bottom=viewport.top+$window.height();bounds.right=bounds.left+$element.outerWidth();bounds.bottom=bounds.top+$element.outerHeight();return(!(viewport.right<bounds.left||viewport.left>bounds.right||viewport.bottom<bounds.top||viewport.top>bounds.bottom));}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCF', bundleError);}


/* LIBCORJHCF */
try{
(function($){"use strict";$.widget('hc.hcformdependency',{options:{duration:null,hotelsearch:null,showLoading:true},_create:function(){var self=this;this.element.submit(function(){if(self.options.showLoading===true){showLoadingAnimation();}
$(this).find('[placeholder]').each(function(){var input=$(this);if(input.val()===input.attr('placeholder')){input.val('');}});});$('[placeholder]',this.element).focus(function(){var input=$(this);if(input.val()===input.attr('placeholder')||input.val()===''){input.val('');input.removeClass('placeholder');}}).blur(function(){var input=$(this);if(input.val()===''||input.val()===input.attr('placeholder')){input.addClass('placeholder');input.val(input.attr('placeholder'));}}).blur();}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCF', bundleError);}


/* LIBCORJHCF */
try{
(function($){"use strict";$.widget('hc.hcformsticky',{options:{offset:10,affixSelector:'#affix',offsetDocumentBottom:521,minHeight:650},heightChangingEvents:['hcofferlistrendererdone','hcformsubmit','hcexpanderopen','hcexpanderclose','hcofferlistheadertoggledone','hcofferlistsuccess','hcofferlistfiltersuccess'],_create:function(){this.affix=$(this.options.affixSelector);this.window=$(window);this.offers=$('#goldmonkey-data');this.boundary={top:$('[data-affixBoundary="top"]')}
if(this.options.minHeight>this.window.height()){return;}
$('body').css({'position':'relative'});this.affix.affix({offset:{top:$.proxy(this._top,this),bottom:$.proxy(this._bottom,this)},disabled:$.proxy(this._disabled,this)});$(window).on(this.heightChangingEvents.join(' '),$.proxy(function(){window.setTimeout($.proxy(function(){this.affix.affix('checkPosition');},this),1000);},this));},_top:function(){return this.boundary.top.offset().top-this.options.offset;},_bottom:function(){return this.options.offsetDocumentBottom;},_disabled:function(){if(this.affix.outerHeight()>this.offers.outerHeight()){return true;}
return false;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCF', bundleError);}


/* LIBCORJHCF */
try{
(function($){$.widget('hc.hcfurtherFilter',$.hc.hclayer,{options:{defaultValue:'',autowidth:false,linkextension:false,position:{my:"left top",at:"left bottom",offset:"-180 0",collision:"fit none"}},_title:null,_checkboxes:null,_checkGroup:null,_checkAll:null,_uncheckAll:null,_seoLinks:null,_create:function(){$.hc.hclayer.prototype._create.call(this);this._title=this.element.find('.hcmultiselect-header-title').first();this._selectedValuesSpan=this.element.parent().find('div.selectedValues');this._checkboxes=$('input[type=checkbox]:not(.check-group)',this._values);this._hcselects=$('select',this._values);this._checkGroup=$('input.check-group',this._values);this._checkAll=$('.checkall',this._values);this._uncheckAll=$('.uncheckall',this._values);if(this.options.linkextension){this._seoLinks=this._checkboxes.parent().find('.seoInputLink');}},_init:function(){var self=this;$.hc.hclayer.prototype._init.call(self);self._checkAll.click(function(){self.checkAll();self._trigger('checkall');return false;});self._uncheckAll.click(function(){self.uncheckAll();self._trigger('uncheckall');return false;});$.each(self._hcselects,function(key,element){$(element).bind('change',function(event){self.setLabel();});});self._checkGroup.bind('click',function(event){if(typeof event.isTrigger==='boolean'){return;}
var parent=$(this).parent().parent().parent();var checkboxes=parent.find('input[type=checkbox]:not(.check-group)');var checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length===checkboxesChecked.length){checkboxes.attr('checked',null);}else{checkboxes.attr('checked','checked');}
checkboxes.trigger('change');self.setLabel();});$(self._values).delegate(self._checkboxes,'click',function(event){var element=$(event.target);if(typeof event.isTrigger=='boolean'&&event.isTrigger==true){event.preventDefault();if(typeof element.attr('checked')==='undefined'){element.attr('checked','checked');}else{element.attr('checked',null);}
element.change();}
if(element.attr('checked')==='checked'){element.parent().addClass('checked');}else{element.parent().removeClass('checked');}
self.setLabel();var parent=element.parent().parent().parent();if(!parent.hasClass('hcselect-group')){self.setLabel();return;}
var group=parent.find('input.check-group').first();var checkboxes=parent.find('input[type=checkbox]:not(.check-group)');var checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length===checkboxesChecked.length){group.attr('checked','checked');}else{group.attr('checked',null);}
group.trigger('change');self.setLabel();});if(self.options.linkextension){self._seoLinks.each(function(key,obj){$(obj).bind('click',function(event){event.preventDefault();$(obj).prevAll('input[type=checkbox]').trigger('click');});});}
$.each(self.getCheckedOptions(),function(index){$(this).addClass('checked');$(this).change();});self.setLabel();},setLabel:function(overwrite){this._selectedValuesSpan.removeClass(this.options.classChanged);if(typeof overwrite!=='undefined'){if(overwrite!==this.options.defaultValue){this._selectedValuesSpan.addClass(this.options.classChanged);}
this._selectedValuesSpan.find('.text').text(overwrite);this._title.text(overwrite);return;}
var value=[];$.each(this.getCheckedGroups(),function(){value.push($(this).parent().text());});var self=this;if(self._checkGroup.length===0||self.getCheckedGroups().length!==self._checkGroup.length){self.getCheckedOptions().each(function(index,option){if(self.isCheckedGroupMember($(option).find('input').attr('id'))){return;}
value.push($(option).text());});}
var defaultValues=[];$.each(this._values.find('.hcoptions a.defaultVal'),function(){defaultValues.push($(this).attr('rel'));});$.each(self.getSelectedValues(),function(key,arr){if($.inArray('#'+arr.value,defaultValues)==-1){value.push(arr.text);}});if(value.length===0){this._selectedValuesSpan.find('.text').text('');this._title.text(this.options.defaultValue);return;}
this._selectedValuesSpan.addClass(this.options.classChanged);var selectedValues=value.join(', ');var joinedValues=value.join(', ');if(selectedValues.length>=75){selectedValues=joinedValues.substring(0,75)+'...';}
var selectedValuesWBrackets='('+selectedValues+')';this._selectedValuesSpan.find('.text').text(selectedValuesWBrackets);this._title.text(value.join(', '));},check:function(value){$.each(this._checkboxes,function(){checkbox=$(this);if(checkbox.val()!==value){return;}
checkbox.trigger('click');return false;});},checkAll:function(){this._checkboxes.attr('checked','checked');this._checkGroup.attr('checked','checked');this._values.find('label').addClass('checked');this.setLabel();this._checkboxes.change();this._checkGroup.change();},uncheckAll:function(){var self=this;this._checkboxes.attr('checked',null);this._checkGroup.attr('checked',null);this._values.find('label').removeClass('checked');this.setLabel(this.options.defaultValue);this._checkboxes.change();this._checkGroup.change();$.each(this._hcselects,function(key,obj){$(obj).find('option:first').attr('selected',true);});this._hcselects.change();},getCheckedGroups:function(){var checkedGroups=[];$.each(this._checkGroup,function(index){var parent=$(this).parent().parent().parent();var checkboxes=parent.find('input[type=checkbox]:not(.check-group)');var checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length!==checkboxesChecked.length){return;}
checkedGroups.push(this);});return checkedGroups;},getSelectedValues:function(){var selectfields=[];$.each(this._hcselects,function(key,selectobj){var element=$(selectobj).find('option:selected');var value=element.val();var text=element.text();selectfields.push({'value':value,'text':text});});return selectfields;},open:function(){this._closeArea.removeClass(this.options.classHidden);this._label.addClass(this.options.classActive);this._values.removeClass(this.options.classHidden);this._connector.removeClass(this.options.classHidden);this._values.position($.extend({},{of:this._connector},this.options.position));this._trigger('open');},isCheckedGroupMember:function(id){var isMember=false;if(this._checkGroup.length===0){return isMember;}
$.each(this.getCheckedGroups(),function(){if($(this).parent().parent().parent().find('#'+id).length>0){isMember=true;return false;}});return isMember;},getCheckedOptions:function(){return $(this._values).find('input[type=checkbox]:not(.check-group):checked').parent();}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCF', bundleError);}


/* LIBCORJHCH */
try{
(function($){"use strict";$.widget('hc.hcheaderofferbox',{options:{template:{airport:'headerOfferboxItemAirport',board:'headerOfferboxItemBoardcode',duration:'headerOfferboxItemDuration',organizer:'headerOfferboxItemOrganizer',departure:'headerOfferboxItemDeparture',buttonmore:'headerOfferboxItemMore',buttonone:'headerOfferboxItemOne'},count:2,scrollToTarget:null},offers:{},cachedTemplates:{},_create:function(){var self=this;$('#goldmonkey').on('hcofferlistrendererdone',function(event,listedOffers){var filtered,$airport,$board,$duration,$organizer,$departure=[];var template=self.options.template.airport;var offers=listedOffers||[];$airport=self.filter(offers,self._filterAirport);$board=self.filter(offers,self._filterBoardcode);$duration=self.filter(offers,self._filterDuration);$organizer=self.filter(offers,self._filterOrganizer);$departure=self.filter(offers,self._filterDeparture);if($airport.length>=self.options.count){filtered=$airport;}
else if($board.length>=self.options.count){filtered=$board;template=self.options.template.board;}
else if($duration.length>=self.options.count){filtered=$duration;template=self.options.template.duration;}
else if($organizer.length>=self.options.count){filtered=$organizer;template=self.options.template.organizer;}
else if($departure.length>=self.options.count){filtered=$departure;template=self.options.template.departure;}
else{filtered=offers;}
var count=0;self.reset();filtered.each(function(i){if(count>=self.options.count){return;}
self.renderOffer(i,template);count++;});if(count===self.options.count){self.renderOffer(filtered[0],self.options.template.buttonmore);}
if(filtered.length===0){self.element.find('p.nooffer').show();}
if(filtered.length===1){self.renderOffer(filtered[0],self.options.template.buttonone);}});this.element.on('click','div.item',function(){$('html,body').stop().animate({scrollTop:$('table[data-bookingid="'+$(this).data('targetid')+'"]').offset().top},'fast');});this.element.on('click','div.button',function(){var jumpTo=self.options.scrollToTarget||'table[data-bookingid="'+$(this).data('targetid')+'"]';$('html,body').stop().animate({scrollTop:$(jumpTo).offset().top-6},'fast');});},reset:function(){this.element.find('p').hide();this.element.find('div').remove();this.element.find('hr').remove();},filter:function(offers,callback){var filtered=[],persistance={};offers.each(function(offer){if(callback(offer,persistance))filtered.push(offer);});return filtered;},renderOffer:function(offer,template){if(typeof this.cachedTemplates[template]==="undefined"){this.cachedTemplates[template]=jQuery('#'+template).html();}
var compiled=this.cachedTemplates[template];var offer=jQuery(compiled(offer));this.element.append(offer);},_filterAirport:function(offer,persistance){if(typeof persistance[offer.departureAirport]==="undefined"){persistance[offer.departureAirport]=true;return true;}
return false;},_filterBoardcode:function(offer,persistance){if(typeof persistance[offer.boardCode]==="undefined"){persistance[offer.boardCode]=true;return true;}
return false;},_filterDuration:function(offer,persistance){if(typeof persistance[offer.duration]==="undefined"){persistance[offer.duration]=true;return true;}
return false;},_filterOrganizer:function(offer,persistance){if(typeof persistance[offer.organizerId]==="undefined"){persistance[offer.organizerId]=true;return true;}
return false;},_filterDeparture:function(offer,persistance){if(typeof persistance[offer.departureDate]==="undefined"){persistance[offer.departureDate]=true;return true;}
return false;}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCH', bundleError);}


/* LIBCORJHCM */
try{
(function($){"use strict";$.widget('hc.hcmultiselect',$.hc.hclayer,{options:{defaultValue:'',autowidth:false,linkextension:false},_title:null,_checkboxes:null,_checkGroup:null,_checkAll:null,_uncheckAll:null,_labeling:null,_seoLinks:null,_initCheckedValues:[],_create:function(){$.hc.hclayer.prototype._create.call(this);this._title=this.element.find('.hcmultiselect-header-title').first();this._checkboxes=$('input[type=checkbox]:not(.check-group)',this._values);this._checkGroup=$('input.check-group',this._values);this._checkAll=$('.checkall',this._values);this._uncheckAll=$('.uncheckall',this._values);if(this.options.linkextension){this._seoLinks=this._checkboxes.parent().find('.seoInputLink');}},_init:function(){var self=this;$.hc.hclayer.prototype._init.call(self);self._checkAll.click(function(){self.checkAll();self._trigger('checkall');return false;});self._uncheckAll.click(function(){self.uncheckAll();self._trigger('uncheckall');return false;});self._checkGroup.bind('click',function(event){if(typeof event.isTrigger==='boolean'){return;}
var parent=$(this).parent().parent().parent(),checkboxes=parent.find('input[type=checkbox]:not(.check-group)'),checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length===checkboxesChecked.length){checkboxes.attr('checked',null);}else{checkboxes.attr('checked','checked');}
try{if(parent.parent().parent().attr('id')=="hcairport-package-airport"){dataLayer.push({event:'event',eventCategory:'siteSearch',eventAction:'Abflughafen',eventLabel:$(this).parent().text()+($(this).attr('checked')===undefined?' check_out':'')});}}
catch(err){}
checkboxes.trigger('change');self.setLabel();});$(self._values).delegate(self._checkboxes,'click',function(event){var element=$(event.target),parent,group,checkboxes,checkboxesChecked;var prefixes={'package-specialRequest-':'BesondereWunsche','package-toprated-':'BesondersGutBewertet','package-organizer-':'Reiseveranstalter','package-roomType-':'Zimmertyp','package-airport-':'Abflughafen','hotel-toprated':'BesondersGutBewertet'};if(element.attr('id')!==undefined){for(var prefixContent in prefixes){if(element.attr('id').indexOf(prefixContent)!==-1){dataLayer.push({event:'event',eventCategory:((element.attr('id').indexOf('package-')!==-1)?'LaPa':'EA')+' siteSearch',eventAction:prefixes[prefixContent],eventLabel:element.parent().text()+(element.attr('checked')===undefined?' check_out':'')});break;}}}
if(typeof event.isTrigger==='boolean'&&event.isTrigger===true){event.preventDefault();if(typeof element.attr('checked')==='undefined'){element.attr('checked','checked');}else{element.attr('checked',null);}
element.change();}
self._trigger('change',event,element);if(element.attr('checked')==='checked'){element.parent().addClass('checked');}else{element.parent().removeClass('checked');}
self.setLabel();parent=element.parent().parent().parent();if(!parent.hasClass('hcselect-group')){self.setLabel();return;}
group=parent.find('input.check-group').first();checkboxes=parent.find('input[type=checkbox]:not(.check-group)');checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length===checkboxesChecked.length){group.attr('checked','checked');}else{group.attr('checked',null);}
group.trigger('change');self.setLabel();});if(self.options.linkextension){self._seoLinks.each(function(key,obj){$(obj).bind('click',function(event){event.preventDefault();$(obj).prevAll('input[type=checkbox]').trigger('click');});});}
$.each(self.getCheckedOptions(),function(){$(this).addClass('checked');$(this).change();});self.setLabel();self._initCheckedValues=self.getCheckedValues();},setLabel:function(overwrite){var self=this;if(self._labeling!==null){clearTimeout(self._labeling);}
self._labeling=setTimeout(function(){self._setLabel(overwrite);self._labeling=null;},50);},_setLabel:function(overwrite){var self=this,value=[];this.element.removeClass(this.options.classChanged);if(typeof overwrite!=='undefined'){if(overwrite!==this.options.defaultValue){this.element.addClass(this.options.classChanged);}
this._label.find('.text').text(overwrite);this._title.text(overwrite);return;}
$.each(this.getCheckedGroups(),function(){value.push($(this).parent().text());});if(self._checkGroup.length===0||self.getCheckedGroups().length!==self._checkGroup.length){self.getCheckedOptions().each(function(index,option){if(self.isCheckedGroupMember($(option).find('input').attr('id'))){return;}
value.push($(option).text());});}
if(value.length===0){this._label.find('.text').text(this.options.defaultValue);this._title.text(this.options.defaultValue);return;}else{value.sort(function(a,b){var nameA=a.toLowerCase(),nameB=b.toLowerCase();if(nameA<nameB){return-1;}
if(nameA>nameB){return 1;}
return 0;});}
this.element.addClass(this.options.classChanged);this._label.find('.text').text(value.join(', '));this._title.text(value.join(', '));},check:function(value){$.each(this._checkboxes,function(){var checkbox=$(this);if(checkbox.val()!==value){return;}
checkbox.trigger('click');return false;});},checkAll:function(){this._checkboxes.attr('checked','checked');this._checkGroup.attr('checked','checked');this._values.find('label').addClass('checked');this.setLabel();this._checkboxes.change();this._checkGroup.change();try{if($(this._checkGroup.context).attr('id')=='package-organizer'){dataLayer.push({event:'event',eventCategory:'LaPa siteSearch',eventAction:'Reiseveranstalter',eventLabel:'Alle auswählen'});}}
catch(e){}},uncheckAll:function(){this._checkboxes.attr('checked',null);this._checkGroup.attr('checked',null);this._values.find('label').removeClass('checked');this.setLabel(this.options.defaultValue);this._checkboxes.change();this._checkGroup.change();try{var prefixes={'package-toprated':'BesondersGutBewertet','package-organizer':'Reiseveranstalter','package-roomType':'Zimmertyp','package-airport':'Abflughafen','hotel-toprated':'BesondersGutBewertet'};if($(this._checkGroup.context).attr('id')!==undefined){for(var prefixContent in prefixes){if($(this._checkGroup.context).attr('id').indexOf(prefixContent)!==-1){dataLayer.push({event:'event',eventCategory:(($(this._checkGroup.context).attr('id').indexOf('package-')!==-1)?'LaPa':'EA')+' siteSearch',eventAction:prefixes[prefixContent],eventLabel:'Auswahl aufheben'});break;}}}}
catch(e){}},getCheckedGroups:function(){var checkedGroups=[];$.each(this._checkGroup,function(){var parent=$(this).parent().parent().parent(),checkboxes=parent.find('input[type=checkbox]:not(.check-group)'),checkboxesChecked=parent.find('input[type=checkbox]:not(.check-group):checked');if(checkboxes.length!==checkboxesChecked.length){return;}
checkedGroups.push(this);});return checkedGroups;},isCheckedGroupMember:function(id){var isMember=false;if(this._checkGroup.length===0){return isMember;}
$.each(this.getCheckedGroups(),function(){if($(this).parent().parent().parent().find('#'+id).length>0){isMember=true;return false;}});return isMember;},getCheckedOptions:function(){return $(this._values).find('input[type=checkbox]:not(.check-group):checked').parent();},getCheckedValues:function(){var values=[];$.each(this.getCheckedOptions(),function(){values.push($(this).find('input').val());});return values;},isValueChanged:function(){var values=this.getCheckedValues();var changed=$(this._initCheckedValues).not(values).length!=0||$(values).not(this._initCheckedValues).length!=0;return changed;},setValueUnchanged:function(){this._initCheckedValues=this.getCheckedValues();}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCM', bundleError);}


/* LIBCORJHCR */
try{
(function($){"use strict";$.widget('hc.hcreferrer',{_create:function(){var self=this;History.addEvent('change',function(url,state){if(!History.hasPushState()){url=Hc.FacetSearch.urlMap[url];}
self.element.val(url);});}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCR', bundleError);}


/* LIBCORJHCS */
try{
(function($){"use strict";$.widget('hc.hcselect',$.hc.hclayer,{options:{defaultValue:null,value:0,delay:300,followHref:false},_select:null,_selected:{},_searching:null,_searchTerm:'',_searchTermPrevious:null,_indexCounter:null,_searchTerms:[],_initCheckedValue:null,_isDisabled:false,_create:function(){$.hc.hclayer.prototype._create.call(this);this._select=this.element.find('select');this._id=this._select.attr('id');this._openedBoxStyle=($('#'+this._id).parent().parent().hasClass('selectboxopened'))?true:false;var self=this;this.element.on('updateoption',function(event,value,label){self.updateOption(value,label);});this.element.on('removeoption',function(event,value){self.removeOption(value);});this.element.on('selectoption',function(event,value){self.selectOption(value);});},_init:function(){var self=this;$.hc.hclayer.prototype._init.call(self);self._selected=self.getSelected();if(self._openedBoxStyle){self._closeArea.unbind('click').remove();}
self._values.find('a').click(function(){if(self.options.followHref===true){try{if(jQuery(this).parents('#hcselect-offersHotelDestination').length>0){dataLayer.push({event:'event',eventCategory:dataLayer[2]['ofSearchFilters']['EAorLaPa']+' Hotellist',eventAction:'Filter',eventLabel:jQuery(this).html()});}}
catch(e){}
self.close();return;}
var value=$(this).attr('rel').replace(/#/,'');self._select.val(value).change();if(!self._openedBoxStyle){self.close();}
return false;});self._select.change(function(event){var selected=self.getSelected();if(self._selected.value===selected.value){return false;}
self.change();self._trigger('change',event,self._selected);});self._initCheckedValue=this.options.value;},_hrefClick:function(element){var self=this;if(self.options.followHref===true){self.close();return;}
var value=$(element).attr('rel').replace(/#/,'');self._select.val(value).change();if(!self._openedBoxStyle){self.close();}
return false;},keydown:function(event){var value;switch(event.keyCode){case $.ui.keyCode.TAB:return true;case $.ui.keyCode.ESCAPE:case $.ui.keyCode.ENTER:case $.ui.keyCode.NUMPAD_ENTER:this.close();return false;case $.ui.keyCode.HOME:value=this._select.find('option').first().val();this._select.val(value).change();return false;case $.ui.keyCode.END:value=this._select.find('option').last().val();this._select.val(value).change();return false;case $.ui.keyCode.UP:case $.ui.keyCode.PAGE_UP:value=this._select.find('option:selected').prev().val();this._select.val(value).change();return false;case $.ui.keyCode.DOWN:case $.ui.keyCode.PAGE_DOWN:value=this._select.find('option:selected').next().val();this._select.val(value).change();return false;case $.ui.keyCode.CONTROL:break;default:this._searchTimeout(event);break;}},_searchTimeout:function(event){var self=this;this._searchTermPrevious=this._searchTerm;this._searchTerm+=String.fromCharCode(event.keyCode).toLowerCase();if(self._searchTerm.charAt(0)===self._searchTerm.charAt(1)&&this._searchTerm.charAt(this._searchTerm.length-1)!==this._searchTermPrevious.charAt(this._searchTermPrevious.length-1)){this._searchTerm=this._searchTerm.charAt(this._searchTerm.length-1);this._searchTermPrevious=null;}
this._search();clearTimeout(this._searching);this._searching=window.setTimeout(function(){self._searching=null;self._searchTerm='';},this.options.delay);},_search:function(){var self=this,searchTermCounter=0;if(self._searchTerm===self._searchTermPrevious||self._searchTerm.charAt(0)===self._searchTerm.charAt(1)){if(self._indexCounter>=self._searchTerms.length){self._indexCounter=0;}
self._select.val(self._searchTerms[self._indexCounter]).change();self._indexCounter+=1;return;}
$('option',self._select).each(function(){var thisText=$(this).text().substr(0,self._searchTerm.length).toLowerCase();if(thisText===self._searchTerm){if(searchTermCounter===0){self._searchTerms=[];self._indexCounter=1;}
self._searchTerms[searchTermCounter]=$(this).val();searchTermCounter+=1;self._select.val(self._searchTerms[0]).change();}});},getData:function(name){return this.element.find('a.active').data(name);},getSelected:function(){var option=this._select.find('option:selected'),text=option.text(),value=option.val();return{value:value,text:text};},value:function(){return this.getSelected().value;},text:function(){return this.getSelected().text;},change:function(){var selected=this.getSelected();var trackedIds=['package-transfer','package-catering','package-adults','children-package-adultschildFirstchildSecondchildThirdchildFourth','package-childFirst','package-childSecond','package-childThird','package-childFourth','package-durationSelect','package-categorySelect','package-priceSelect','package-sport','children-hotel-adultschildFirstchildSecondchildThirdchildFourth','hotel-adults','hotel-childFirst','hotel-childSecond','hotel-childThird','hotel-childFourth','hotel-specialFeature','hotel-categorySelect'];if($.inArray(this._select.attr('id'),trackedIds)!==-1){dataLayer.push({event:'event',eventCategory:((this._select.attr('id').indexOf('package-')!==-1)?'LaPa':'EA')+' siteSearch',eventAction:this._select.attr('id').replace('package-','').replace('hotel-',''),eventLabel:selected.text});}
var sortingAndFilteringIds=['hotellistOrder','cityName','offerlistsort'];if($.inArray(this._select.attr('id'),sortingAndFilteringIds)!==-1){var eventCategory;var doPush=true;if(this._select.attr('id')=='offerlistsort'){eventCategory='LaPa Offerlist';if(jQuery('#offerlistsort').data('setNotOnStartup')===undefined){doPush=false;jQuery('#offerlistsort').data('setNotOnStartup','1');}}
else{eventCategory='Hotellist';try{eventCategory=dataLayer[2]['ofSearchFilters']['EAorLaPa']+' '+eventCategory;}
catch(e){}}
if(doPush){dataLayer.push({event:'event',eventCategory:eventCategory,eventAction:this._select.attr('id').replace('hotellistOrder','Sorting').replace('offerlistsort','Sorting').replace('cityName','Filter'),eventLabel:selected.text});}}
this._selected=selected;this._label.removeClass(this.options.classChanged);this.element.removeClass(this.options.classChanged);if(this.options.defaultValue!==null&&this.options.defaultValue!=selected.value){this.element.addClass(this.options.classChanged);this._label.addClass(this.options.classChanged);}
this._label.find('.text').text(selected.text);this._values.find('a').removeClass(this.options.classActive);$(this._values.find('a[rel="#'+selected.value+'"]')).addClass(this.options.classActive);},isValueChanged:function(){return this.getSelected().value!=this._initCheckedValue;},setValueUnchanged:function(){this._initCheckedValue=this.getSelected().value;},updateOption:function(value,label){var self=this;var optionObj=self._searchOption(value);if(!optionObj){self._select.append('<option value="'+value+'" label="'+label+'">'+label+'</option>');ahrefObj=self.element.find('ul').append('<li><a href="#'+value+'_a" rel="#'+value+'" title="'+label+'">'+
label+'</a></li>');ahrefObj.find('a').click(function(){self._hrefClick(this);});}else{var ahrefObj=self._searchAhref(value);$(optionObj).attr('label',label);$(optionObj).html(label);$(ahrefObj).attr('title',label);$(ahrefObj).html(label);self.change();}},removeOption:function(value){var optionObj=this._searchOption(value);if(optionObj){$(optionObj).remove();}
var ahrefObj=this._searchAhref(value);if(ahrefObj){$($(ahrefObj).parent()).remove();}},selectOption:function(value){this._select.val(value);this.change();},_searchOption:function(value){var optionObj=null;this._select.find('option').each(function(){if(this.value==value){optionObj=this;}});return optionObj;},_searchAhref:function(value){var ahrefObj=null;this.element.find('a').each(function(){if($(this).attr('rel')=='#'+value){ahrefObj=this;}});return ahrefObj;},setDisabled:function(flag){this._isDisabled=flag;if(flag){this._label.addClass('hcSelectDisabled');}else{this._label.removeClass('hcSelectDisabled');}},open:function(){if(!this._isDisabled){$.hc.hclayer.prototype.open.call(this);}}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCS', bundleError);}


/* LIBCORJHCS */
try{
(function($){$.widget('hc.hcshoweffect',{options:{advancedlisteners:null},_init:function(){var self=this;this.element.on('click','button',function(){$(location).attr('hash',self.element.attr('id'));self.element.children('.ui-show-effect-button').addClass('displayNone');self.element.children('.ui-show-effect-content').removeClass('displayNone');});}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCS', bundleError);}


/* LIBCORJHCS */
try{
(function($){$.widget('ui.hcslidebar',{slides:null,options:{activeTab:0,sliderWidth:0,slideStep:700,slideSwipeStep:700,slidesLeft:0,slidesMaxLeft:0,clickDetectionTimeout:200},stepInit:function(){this.options.sliderWidth=this.element.width();if(this.options.slideStep==0){this.options.slideStep=this.options.sliderWidth;}
this.options.slidesLeft=this.element.offset().left;this.options.slidesMaxLeft=(this.options.slidesLeft+this.options.sliderWidth)-this.slides.width();},init:function(){this.slides=$(this.element.find('.slides').get(this.options.activeTab));var slidesWidth=0;this.slides.find('.element').each(function(){slidesWidth+=$(this).outerWidth();});this.slides.width(slidesWidth);},_create:function(){this.element=$(this.element);if(this.element.hasClass('hcslidebarReady')){return;}else{this.element.addClass('hcslidebarReady');}
this.init();this.stepInit();$(window).resize(function(){this.init();this.stepInit();}.bind(this));var sliderButton=$('<div class="displayNone sliderButton">'
+'<div class="bg"><div class="arrow"></div><div class="shadow"></div></div>'
+'</div>');this.buttonLeft=sliderButton.clone().insertBefore(this.slides).addClass('left');this.buttonRight=sliderButton.clone().insertAfter(this.slides).addClass('right');var buttonOptions={'height':this.element.height()};this.buttonLeft.find('.bg, .arrow').css(buttonOptions);this.buttonRight.find('.bg, .arrow').css(buttonOptions);var clickTimer=0;var clicked=true;var preMouseDown=function(event){if(this.options.sliderWidth==0){this.stepInit();}
if(this.options.sliderWidth>this.slides.width()){return;}
clicked=true;clickTimer=setTimeout(function(){$(event.target).trigger('hcMouseDown');clicked=false;}.bind(this),this.options.clickDetectionTimeout);}.bind(this);var preMouseUp=function(event){if(this.options.sliderWidth>this.slides.width()){return;}
if(clicked){$(event.target).trigger('hcClicked');}else{$(event.target).trigger('hcMouseUp');}
clearTimeout(clickTimer);}.bind(this);this.buttonRight.bind('mousedown',preMouseDown);this.buttonLeft.bind('mousedown',preMouseDown);this.buttonRight.bind('mouseup',preMouseUp);this.buttonLeft.bind('mouseup',preMouseUp);var mouseDown=function(direction,left,speed,callback){this.dispButtons();this.slideFrame(direction,left,speed,callback);}.bind(this);this.buttonRight.bind('hcMouseDown',function(){this.slideFrame('-',5,1,mouseDown);}.bind(this)).bind('hcMouseUp',function(){this.slideFrame('-',5,'fast',function(){this.dispButtons();}.bind(this));}.bind(this)).bind('hcClicked',function(){this.slideFrame('-',this.options.slideStep,'fast',function(){this.dispButtons();}.bind(this));}.bind(this));this.buttonLeft.bind('hcMouseDown',function(){this.slideFrame('+',5,1,mouseDown);}.bind(this)).bind('hcMouseUp',function(){this.slideFrame('+',5,'fast',function(){this.dispButtons();}.bind(this));}.bind(this)).bind('hcClicked ',function(){this.slideFrame('+',this.options.slideStep,'fast',function(){this.dispButtons();}.bind(this));}.bind(this));this.dispButtons();},slideFrame:function(direction,left,speed,callback){if(direction=='+'&&((this.slides.offset().left+left)>this.options.slidesLeft)){this.slides.animate({'left':0},"fast","linear",function(){this.dispButtons();}.bind(this));return;}else if(direction=='-'&&((this.slides.offset().left-left)<=this.options.slidesMaxLeft)){this.slides.animate({'left':(this.slides.width()-this.options.sliderWidth)*-1},"fast","linear",function(){this.dispButtons();}.bind(this));return;}
this.slides.animate({'left':direction+'='+left},speed,"linear",function(){callback(direction,left,speed,callback);});},dispButtons:function(){var diffLeft=this.slides.offset().left-this.options.slidesLeft;if(diffLeft>=-3&&diffLeft<=3){this.buttonLeft.addClass('displayNone');}else{this.buttonLeft.removeClass('displayNone');}
var diffRight=this.slides.offset().left-this.options.slidesMaxLeft;if(diffRight>=-3&&diffRight<=3){this.buttonRight.addClass('displayNone');}else{this.buttonRight.removeClass('displayNone');}}});jQuery(document).ready(function(){jQuery('.slidebar').hcslidebar();});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCS', bundleError);}


/* LIBCORJHCS */
try{
(function($){$.widget('hc.hcslider',$.ui.slider,{_mouseCapture:function(event){var o=this.options,position,normValue,distance,closestHandle,self,index=0,allowed,offset,mouseOverHandle;if(o.disabled){return false;}
this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);distance=this._valueMax()-this._valueMin()+1;self=this;closestHandle=$(this.handles[0]);this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance==thisDistance&&event.target==this){closestHandle=$(this);index=i;}
if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i;}});allowed=this._start(event,index);if(allowed===false)return false;this._mouseSliding=true;self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();offset=closestHandle.offset();mouseOverHandle=!jQuery(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)
-(parseInt(closestHandle.css("borderTopWidth"),10)||0)
-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)
+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index,normValue);}
this._animateOff=true;return true;},_calculatePercent:function(value,element){if(!this.handlePercents){this.handlePercents=(this.handles.width()/this.element.width())*100;}
if(!this.percents){this.percents=100-(this.handlePercents*this.handles.length);}
if(!value||!element){return;}
if(element.hasClass('ui-slider-handle-right')){return((value-this._valueMin())/(this._valueMax()-this._valueMin())*this.percents)+this.handlePercents;}
return((value-this._valueMin())/(this._valueMax()-this._valueMin())*this.percents);},_refreshValue:function(){var oRange=this.options.range,o=this.options,self=this,animate=(!this._animateOff)?o.animate:false,valPercent,_set={},lastValPercent=0,value,valueMin,valueMax;if(this.options.values&&this.options.values.length){this.handles.each(function(i,j){valPercent=self._calculatePercent(self.values(i),$(j));_set[self.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation==="horizontal"){if(i===0){self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);}
if(i===1){self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}}else{if(i===0){self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);}
if(i===1){self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate});}}}
lastValPercent=valPercent;});}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();this._calculatePercent();valPercent=(valueMax!==valueMin)?(value-valueMin)/(valueMax-valueMin)*this.percents:0;_set[self.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);}
if(oRange==="max"&&this.orientation==="horizontal"){this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});}
if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);}
if(oRange==="max"&&this.orientation==="vertical"){this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate});}}}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCS', bundleError);}


/* LIBCORJHCT */
try{
(function($){"use strict";$.widget('hc.hctravellergroup',$.hc.hclayer,{options:{classHidden:'displayNone',classInactive:'inactive',classChanged:'changed',defaultValue:{adults:2,children:0}},_title:null,_adults:null,_children:null,_childrenGroup:null,_selects:null,_create:function(){$.hc.hclayer.prototype._create.call(this);var self=this;self._title=self.element.find('.hcmultiselect-header-title').first();self._adults=self.element.find('.adults');self._children=self.element.find('.children');self._childrenGroup=self.element.find('.childrenGroup');self._selects=self._childrenGroup.find('.element');self._adults.bind('hcselectchange',function(){self._change();});self._children.bind('hcselectchange',function(){var children=$(this).hcselect('value'),counter=0;$.each(self._selects,function(){if(counter<children){$(this).removeClass(self.options.classHidden);}else{$(this).addClass(self.options.classHidden);$(this).find('select').val(0).trigger('change');}
counter++;});self._change();});},_change:function(){this._childrenGroup.removeClass(this.options.classHidden);this._children.removeClass(this.options.classInactive);if(this._children.hcselect('value')<=0){this._children.addClass(this.options.classInactive);this._childrenGroup.addClass(this.options.classHidden);}
this.setLabel();this.element.removeClass(this.options.classChanged);if(this.options.defaultValue.children!==this.value().children||this.options.defaultValue.adults!==this.value().adults){this.element.addClass(this.options.classChanged);}
this._trigger('change','change',[this]);},setLabel:function(){var adults=this._adults.hcselect('value'),children=this._children.hcselect('value');this._label.find('.adult-label').text(adults);this._label.find('.child-label').text(children);this._title.find('.adult-label').text(adults);this._title.find('.child-label').text(children);},value:function(){return{adults:parseInt(this._adults.hcselect('value'),10),children:parseInt(this._children.hcselect('value'),10)};},open:function(){this._children.trigger('hcselectchange');$.hc.hclayer.prototype.open.call(this);},close:function(){$.hc.hclayer.prototype.close.call(this);var counter=0,lastSelect=[];$.each(this._selects.find('select'),function(){if($(this).val()>0){if(lastSelect.length!==0&&parseInt(lastSelect.val(),0)===0){lastSelect.val(this.value).trigger('change');$(this).val(0).trigger('change');lastSelect=$(this);}
counter++;}else{if(lastSelect.length===0){lastSelect=$(this);}}});this._children.find('select').val(counter).trigger('change');}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCT', bundleError);}


/* LIBCORJHCT */
try{
(function($){"use strict";$.widget('hc.hctravelrange',$.hc.hclayer,{options:{defaultValue:'',namespace:'package',durationDifference:1,durationSelector:'durationSelect'},secondsToDay:86400000,_hint:null,_title:null,_info:null,_departure:null,_isChangedFirst:false,_return:null,_duration:null,_initDepartureVal:null,_initReturnVal:null,_create:function(){$.hc.hclayer.prototype._create.call(this);var self=this,namespace=this.options.namespace;self._hint=self.element.find('.hint');self._title=self.element.find('.hcmultiselect-header-title').first();self._info=self.element.find('.info').first();self._departure=$('#'+namespace+'-departureDate');self._return=$('#'+namespace+'-returnDate');self._duration=$('#hcselect-'+namespace+'-'+self.options.durationSelector);self._departure.on('hcdatepickerselect',function(){self.change();});self._return.on('hcdatepickerselect',function(){self._checkDuration();self.setLabel();});self._duration.on('hcselectchange',function(){self._checkDuration();self.setLabel();});self._calculateMinDate();self._checkDuration();self.setLabel();self._isChangedFirst=self.element.hasClass(self.options.classChanged);self._initDepartureVal=self._departure.val();self._initReturnVal=self._return.val();},change:function(){var departureDate=this._departure.datepicker('getDate'),departureDateNew=departureDate.clone(),departureDateMinNew=departureDate.clone(),difference=this._calculateDuration(),newDifference,doOpen=false;this._calculateMinDate();departureDateNew.setDate(departureDateNew.getDate()+this.options.durationDifference);departureDateMinNew.setDate(departureDateMinNew.getDate()+1);if(this._isChangedFirst===false){this._return.datepicker('setDate',departureDateNew);doOpen=true;this._isChangedFirst=true;}
if(difference.value<1){this._return.datepicker('setDate',departureDateMinNew);doOpen=true;}
newDifference=this._calculateDuration();this._checkDuration(newDifference);if(doOpen===true){this._return.datepicker('show');}
this.setLabel(newDifference);},setLabel:function(difference){var defaultValue=this.options.defaultValue,titleText,labelText,formattedDeparture=this._formatDate('departure'),formattedReturn=this._formatDate('return'),durationValue,value,calculate=false;difference=difference||this._calculateDuration();if(this._duration.length>0){durationValue=this._duration.hcselect('getSelected');if(parseInt(durationValue.value,10)===25){calculate=true;}}else{calculate=true;}
if(calculate===true){durationValue=difference;this.element.find('.durationHotel').text(durationValue.text);}
titleText=durationValue.text+' / '+this._departure.val()+' - '+this._return.val();labelText=durationValue.text.capitalize()+' / '+formattedDeparture+' - '+formattedReturn;value=this._departure.val()+this._return.val()+durationValue.value;this.element.removeClass(this.options.classChanged);if(defaultValue!==''&&defaultValue!==value){this.element.addClass(this.options.classChanged);}
this._hint.find('.from').text(this._departure.val());this._hint.find('.to').text(this._return.val());this._label.find('.text').text(labelText);this._title.text(titleText);},_checkDuration:function(difference){if(this._duration.length<1){return;}
difference=difference||this._calculateDuration();this._info.addClass(this.options.classHidden);if(difference.value<this._duration.data('hcHcselect').getData('min')){this._info.removeClass(this.options.classHidden);}},_calculateDuration:function(){var departureDate=this._departure.datepicker('getDate'),returnDate=this._return.datepicker('getDate'),difference=Math.round((returnDate-departureDate)/this.secondsToDay);if(difference===1){return{text:difference+' Tag',value:difference};}
return{text:difference+' Tage',value:difference};},_calculateMinDate:function(){var departureDate=this._departure.datepicker('getDate'),departureDateMinNew=departureDate.clone();departureDateMinNew.setDate(departureDateMinNew.getDate()+1);this._return.datepicker('option','minDate',departureDateMinNew);},_formatDate:function(type){var value,values;switch(type){case'departure':value=this._departure.val()||this._departure.get(0).defaultValue;values=value.split('.');values.shift();values.pop();return values.join('.')+'.';case'return':value=this._return.val()||this._return.get(0).defaultValue;values=value.split('.');values.shift();return values.join('.');default:return'';}},open:function(){$.hc.hclayer.prototype.open.call(this);$('#ui-datepicker-div').appendTo(this.element.find('.hcmultiselect-body'));},close:function(){$.hc.hclayer.prototype.close.call(this);$('#ui-datepicker-div').appendTo('body');},isValueChanged:function(){var changed=this._initDepartureVal!=this._departure.val()||this._initReturnVal!=this._return.val();return changed;},setValueUnchanged:function(){this._initDepartureVal=this._departure.val();this._initReturnVal=this._return.val();}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCT', bundleError);}


/* LIBCORJHCU */
try{
jQuery(document).on('hcAsyncModuleLoaded',function(){jQuery('.ui-tabs-hideOnEmpty').each(function(i,tab){tab=jQuery(tab);var pane=tab.parents('.ui-tabs').children('#tab-'+tab.attr('id'));if(pane.children('.loadModule').length>0){if(pane.children('.loadModule').children().length>0){tab.removeClass('ui-tabs-hideOnEmpty');jQuery(document).trigger('hcTabLoaded');}}else if(pane.children().length>0){tab.removeClass('ui-tabs-hideOnEmpty');jQuery(document).trigger('hcTabLoaded');}});});jQuery(document).on('hcAsyncModuleLoaded',function(){jQuery('.ui-tabs-nav').children().each(function(i,tab){tab=jQuery(tab);var pane=tab.parents('.ui-tabs').children('#tab-'+tab.attr('id'));if(pane.children('.loadModule').length>0){if(pane.children('.loadModule').children().length>0){var params=window.parseRel(pane.children('.loadModule').children(':first').attr('rel'),'hcTab');if(typeof params['headline']!='undefined'){tab.children('a').html(params['headline']);}}}});});window.parseRel=function(rel,identifier){var params={};var regex=new RegExp(identifier+"\\[(.*?)\\]");var result=regex.exec(rel);if(result&&result.length>0){var paramsArray=result[1].split(";");for(var i=0;i<paramsArray.length;i++){var keyValue=paramsArray[i].split("=");params[keyValue[0]]=keyValue[1];}}
return params;}
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHCU', bundleError);}


/* LIBCORJHOL */
try{
(function($){"use strict";$.widget("hc.holidaycalendar",{heading:null,datepickerInstance:null,parent:null,isopen:false,options:{close:null,open:null,change:null,select:null,datepickerInstance:null,dateFormat:'dd.mm.yy'},_create:function(){var self=this;this.heading=this.element.find('.holidaycalendar-heading');this.datepickerInstance=this.option('datepickerInstance');this.element.delegate('input[type=radio]','click',function(event){self.change(this,event);});this.element.delegate('select','change',function(event){self.element.find('.ui-datepicker-holiday-date input:checked').trigger('click');});this.element.delegate('li.activ','mouseover touchstart',function(event){self.hover(this,event);});this.element.delegate('li.activ','mouseout touchend',function(event){self.out(this,event);});this.element.delegate('li.activ','click',function(event){$('.ui-datepicker-holiday-calendar li.ui-state-active').removeClass('ui-state-active');self.select(this,event);});this.change($('.ui-datepicker-holiday-country').find('input:checked')[0]);},toggle:function(event){if(!this.isopen){return this.open(event);}
this.close(event);},hover:function(element){$(element).addClass('ui-state-hover');},out:function(element){$(element).removeClass('ui-state-hover');},open:function(event){this._open(event);},_open:function(event){if(this.parent===null&&this.isopen===false){this.parent=this.element.parent();}
if(this.datepickerInstance!==null){this.datepickerInstance.dpDiv.find('.ui-datepicker-holiday .ui-datepicker-holiday-head').before(this.element);}
this.element.removeClass('displayNone');this.isopen=true;this._trigger('open',event);},change:function(element,event){var $element=$(element),id=$element.attr('id'),elementName=$element.attr('name'),calendarId;this.element.find('#notice-date').addClass('displayNone');if(elementName==='country'){this.element.find('.ui-datepicker-holiday-region:not(.displayNone)').addClass('displayNone');this.element.find('.ui-datepicker-holiday-region[ref='+id+']').removeClass('displayNone');this.element.find('.ui-datepicker-holiday-date input:checked').trigger('click');this.heading.find('.country').html($element.parent().find('span').html());return this._trigger('change');}
this.element.find('.ui-datepicker-holiday-calendar:not(.displayNone)').addClass('displayNone');this.heading.find('.type').html($element.parent().find('span').html());if(elementName==='years'&&$element.val().indexOf('day_')!==-1){this.element.find('.ui-datepicker-holiday-region:not(.displayNone)').addClass('displayNone');calendarId=this._generateCalendarId(id,"day");this.element.find('#notice-date').removeClass('displayNone');this.element.find(calendarId).removeClass('displayNone');return this._trigger('change');}
if(elementName==='years'&&$element.val().indexOf('date_')!==-1){calendarId=this._generateCalendarId(id,"date");this.element.find(calendarId).removeClass('displayNone');return this._trigger('change');}
this._trigger('change');},select:function(element,event){$(element).addClass('ui-state-active');var dates=[];dates.push($.datepicker.parseDate(this.option('dateFormat'),$(element).children('span.startdate').text()));if($(element).children('span.enddate').length>0){dates.push($.datepicker.parseDate(this.option('dateFormat'),$(element).children('span.enddate').text()));}
this._trigger('select',event,dates);},_generateCalendarId:function(elementId,type){var countryValue=this.element.find('.ui-datepicker-holiday-country input:checked').val(),region,regionValue;switch(type){case"day":return'#country-'+countryValue+'-'+elementId;case"date":region=this.element.find('.ui-datepicker-holiday-region[ref="country-'+countryValue+'"]');region.removeClass('displayNone');regionValue=region.find('.hcselect-container select').val();return'#country-'+countryValue+'-region-'+regionValue+'-'+elementId;}},close:function(event){this._close(event);},_close:function(event){var self=this;if(self.parent!==null&&this.isopen===true){self.element.addClass('displayNone');self.parent.append(self.element);}
this.isopen=false;self._trigger('close',event);}});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJHOL', bundleError);}


/* LIBCORJJ-B */
try{
(function(jQuery){var options={'selector':'.boxAutoHeight','boxGroup':[],'boxHeight':0,'groupTopPosition':null};var methods={init:function(newOptions){jQuery(options.selector).each(function(key,box){var currentBox=jQuery(box);var child=currentBox.children(1);methods.initTopPosition(currentBox);if(options.groupTopPosition==currentBox.position().top){methods.appendBox(child);}else{methods.setBoxSize();methods.initTopPosition(currentBox);methods.appendBox(child);}});methods.setBoxSize();},initTopPosition:function(currentBox){if(options.groupTopPosition==null){options.groupTopPosition=currentBox.position().top;}},appendBox:function(child){if(options.boxHeight<child.height()){options.boxHeight=child.height();}
options.boxGroup.push(child);},setBoxSize:function(){jQuery(options.boxGroup).each(function(key,box){box.css('min-height',options.boxHeight);});options.boxGroup=[];options.boxHeight=0;options.groupTopPosition=null}};jQuery.fn.blockheight=function(method){return methods.init.apply(this,arguments);};})(jQuery);jQuery(document).ready(function(){jQuery(document).blockheight();});
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJ-B', bundleError);}


/* LIBCORJJ-C */
try{
(function(jQuery){var options={'idselector':/charts\[(.*?)\]/,'selector':'.charts','defaultParams':{'entity':'','entityId':'','template':'1','data':'','minValue':'auto','maxValue':'auto'},'additionalQuery':'','availableActions':['hotelrecommendation','hotelrating','counthotelreviews','age','traveledwith','temperatureair','temperaturewater','sunnyhoursrainydays','hotelierhotelstats','hoteliercompetitorstats'],'callbacks':{'pie':function(data,params,div){var chart=new AmCharts.AmPieChart();chart.dataProvider=data;chart.valueField="value";chart.titleField="data";chart.colors=templates[params.template].color;chart.startDuration=0.5;chart.startEffect='>';chart.startAngle=0;chart.write(div);},'bar':function(data,params,div){var chart=new AmCharts.AmSerialChart();chart.dataProvider=data;chart.categoryField="data";chart.startDuration=0.5;chart.startEffect='>';if(typeof(templates[params.template].horizontal)!='undefined'){chart.rotate=templates[params.template].horizontal;}
var categoryAxis=chart.categoryAxis;categoryAxis.gridPosition="start";categoryAxis.axisColor="#DADADA";categoryAxis.dashLength=2;var valueAxis=new AmCharts.ValueAxis();valueAxis.dashLength=5;valueAxis.axisAlpha=0.2;if(typeof(parseInt(params.minValue))=='number'){valueAxis.minimum=params.minValue;}
if(typeof(parseInt(params.maxValue))=='number'){valueAxis.maximum=params.maxValue;}
chart.addValueAxis(valueAxis);var graph=new AmCharts.AmGraph();graph.type="column";graph.valueField="value";graph.lineAlpha=0;graph.fillColors=templates[params.template].color;graph.fillAlphas=0.8;graph.balloonText=methods.getBalloonText(data);chart.addGraph(graph);chart.write(div);},'candle':function(data,params,div){var chart=new AmCharts.AmSerialChart();chart.dataProvider=data;chart.categoryField="period";chart.marginTop=10;var categoryAxis=chart.categoryAxis;categoryAxis.dashLength=1;categoryAxis.tickLength=0;var valueAxis=new AmCharts.ValueAxis();valueAxis.dashLength=1;valueAxis.axisAlpha=0;if(typeof(parseInt(params.minValue))=='number'){valueAxis.minimum=params.minValue;}
if(typeof(parseInt(params.maxValue))=='number'){valueAxis.maximum=params.maxValue;}
chart.addValueAxis(valueAxis);var graph=new AmCharts.AmGraph();graph.balloonText=methods.getBalloonText(data);graph.type="candlestick";graph.negativeLineColor=templates[params.template].color;graph.negativeFillColors=templates[params.template].color;graph.fillAlphas=0.8;graph.openField="open";graph.highField="high";graph.lowField="low";graph.closeField="close";chart.addGraph(graph);chart.write(div);},'line':function(data,params,div){var chart=new AmCharts.AmSerialChart();chart.categoryField="data";chart.dataProvider=data;chart.zoomOutText='zurücksetzen';var valueAxis=new AmCharts.ValueAxis();valueAxis.dashLength=1;valueAxis.axisAlpha=0;if(typeof(parseInt(params.minValue))=='number'){valueAxis.minimum=params.minValue;}
if(typeof(parseInt(params.maxValue))=='number'){valueAxis.maximum=params.maxValue;}
chart.addValueAxis(valueAxis);for(var count=1;count<10;count++){var colorField="color";var valueField="value";var titleField="title";if(count>1){valueField+=count;colorField+=count;titleField+=count;}
var graph=new AmCharts.AmGraph();graph.type="line";graph.valueField=valueField;graph.balloonText=methods.getBalloonText(data,count);graph.bullet='round';graph.lineColor=templates[params.template][colorField];if(data[0][titleField]){graph.title=data[0][titleField];}else{graph.visibleInLegend=false;}
graph.connect=false;chart.addGraph(graph);}
if(params.legend==1){var legend=new AmCharts.AmLegend();chart.addLegend(legend);}
var chartCursor=new AmCharts.ChartCursor();chartCursor.cursorPosition="mouse";chart.addChartCursor(chartCursor);chart.write(div);}}};var templates={'1':{'type':'bar','color':'#325FAA'},'2':{'type':'bar','color':'#FAD73C'},'3':{'type':'bar','color':'#325FAA'},'4':{'type':'bar','color':'#FAD73C'},'5':{'type':'bar','color':'#325FAA','horizontal':true},'6':{'type':'pie','color':['#5B7FBB','#73B1EE','#325FAA','#FAD73C','#F5A01A','#E36F1E','#143764','#5B7FBB','#73B1EE','#325FAA','#FAD73C','#F5A01A','#E36F1E','#143764']},'7':{'type':'candle','color':'#FAD73C'},'8':{'type':'line','color':'#325FAA','color2':'#FAD73C'},'9':{'type':'line','color':'#FAD73C','color2':'#F5A01A','color3':'#325FAA','color4':'#73B1EE','color5':'#143764','color6':'#5B7FBB'}};var methods={getAction:function(params){if(jQuery.inArray(params.data,options.availableActions)>-1){return params.data;}
return false;},getBalloonText:function(data,index){if(typeof index=='undefined'||typeof index!='number'||index==1){index='';}
if(data.length>0&&typeof data[0].label+index!='undefined'){return"[[label"+index+"]]";}
return'[[value]]';},init:function(newOptions){options=jQuery.extend(options,newOptions);jQuery(options.selector).each(function(key,div){var chartDiv=jQuery(div);if(chartDiv.hasClass('chartReady')){return true;}
chartDiv.addClass('chartReady');chartDiv.attr('id','chart'+key);var params=jQuery.extend({},options.defaultParams);var additionalQuery='';var rel=chartDiv.attr('rel');var result=options.idselector.exec(rel);if(result&&result.length>0){var paramsArray=result[1].split(";");for(var i=0;i<paramsArray.length;i++){var keyValue=paramsArray[i].split("=");params[keyValue[0]]=keyValue[1];}
params=jQuery.extend({},options.defaultParams,params);}
if(params.entityId==''){return false;}
var action=methods.getAction(params);var date=new Date();var dateString=date.getFullYear()+''+date.getMonth()+''+date.getDate();if(action){var url='/charts?action='+action
+"&entity="+params.entity
+"&entityId="+params.entityId
+"&dataSource="+params.dataSource
+"&accessId="+params.accessId
+"&cachedate="+dateString
+"&"+options.additionalQuery;showLoadingAnimationForElement('chart'+key);jQuery.ajax({url:url,dataType:'json',success:function(data){if(typeof data["errorType"]!='undefined'&&data.errorType!=''){var clone=jQuery('#'+data.errorType).clone().removeClass('displayNone');jQuery(div).append(clone);}else{options.callbacks[templates[params.template].type].apply(this,[data,params,div]);}
hideLoadingAnimationForElement('chart'+key);},error:function(){var clone=jQuery('#unavailableChart').clone().removeClass('displayNone');jQuery(div).append(clone);hideLoadingAnimationForElement('chart'+key);}});}});}};jQuery.fn.charts=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}};})(jQuery);jQuery(document).bind('ready hcAsyncModuleLoaded',function(){jQuery(document).charts();});
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJ-C', bundleError);}


/* LIBCORJJ-E */
try{
(function(jQuery){jQuery(document).on('mouseenter','.expandableElement',function(){var self=this;jQuery(this).addClass('mouseIn');if(!jQuery(this).hasClass('expanding')){jQuery(this).addClass('expanding');jQuery(this).find('.expandableContent').slideDown(function(){jQuery(self).removeClass('expanding');});}});jQuery(document).on('mouseleave','.expandableElement',function(){jQuery(this).removeClass('mouseIn');var self=this;setTimeout(function(){if(!jQuery(self).hasClass('mouseIn')){jQuery(self).find('.expandableContent').slideUp();}},1000);});jQuery(document).on('click','.buttonExpandableContainer .expandableArea',function(){jQuery(this).parent('.buttonExpandableContainer').find('.buttonExpandable span').click();});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJ-E', bundleError);}


/* LIBCORJJ-T */
try{
(function(jQuery){var options={'closedHeight':0,'scrollOffset':100,'idselectorHeight':/toggableBox\[height=([0-9]+)\]/,'selector':'.toggableBox'};var methods={init:function(newOptions){options=jQuery.extend(options,newOptions);jQuery(options.selector).each(function(key,box){var toggableBox=jQuery(box);if(!toggableBox.hasClass('toggable')){var toggableBoxElements=toggableBox.find('.content');var showToggleBar=false;var closedHeight=options.closedHeight;var rel=toggableBox.attr('rel');var result=options.idselectorHeight.exec(rel);if(result&&result.length>1){closedHeight=result[1];}
toggableBoxElements.each(function(key,div){if(jQuery(div).height()>closedHeight&&showToggleBar==false){toggableBox.addClass('toggable');if(!toggableBox.hasClass('opened')){toggableBox.toggleClass('closed');}
if(toggableBox.find('.toggableBoxText').length==0){toggableBox.find('.toggler').bind('click',function(){toggableBox.toggleClass('closed');var boxPosition=toggableBox.position().top+options.scrollOffset;if(toggableBox.hasClass('closed')&&jQuery(window).scrollTop()>boxPosition){if(toggableBox.parents('#sb-container').length==0){scroll(box,null,options.scrollOffset);}}});}
showToggleBar=true;}});}});}};jQuery.fn.toggableBox=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}};})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJ-T', bundleError);}


/* LIBCORJJ-T */
try{
(function(jQuery){var options={'selector':'*[rel*="tooltip"]','idselector':/tooltip\[([a-zA-Z0-9_-]+)\]/,'activeSelector':'tooltipActive','mouseoutDelay':500,'sitePaddings':10,'arrowHeight':6,'toolTipType':'bottom','toolTipMarkup':'<div class="toolTip" id="toolTipHelper">'
+'<div class="mouseHelper"></div>'
+'<div class="arrow"></div>'
+'<div class="content"></div>'
+'</div>','boundaryBoxes':['body','#sb-wrapper']};var documentWidth=null;var toolTipHelper=null;var noClose=false;var methods={init:function(newOptions){options=jQuery.extend(options,newOptions);jQuery('body').append(options.toolTipMarkup);toolTipHelper=jQuery("#toolTipHelper");toolTipHelper.on('mouseenter',methods.checkActive);toolTipHelper.on('mouseleave',methods.mouseLeaveFunction);var toolTipElements=jQuery(options.selector);toolTipElements.on('mouseenter',methods.elementMouseEnterFunction);toolTipElements.on('mouseleave',methods.mouseLeaveFunction);},elementMouseEnterFunction:function(element){methods.close();noClose=true;var id=methods.getToolTipId(element);if(id){toolTipHelper.find('.content').html(jQuery('#'+id).html());toolTipHelper.find('.content').attr('class','content '+methods.getToolTipClass(element));var position=methods.getCurrentPosition(element,methods.getToolTipType(element));toolTipHelper.find('.content').css({top:position.tooltipTop,left:position.tooltipLeft});toolTipHelper.find('.mouseHelper').css({top:position.mouseHelperTop,left:position.mouseHelperLeft});toolTipHelper.find('.arrow').css({top:position.arrowTop,left:position.arrowLeft}).removeClass('top').removeClass('bottom').removeClass('left').removeClass('right').addClass(methods.getToolTipType(element));methods.open();}},checkActive:function(){if(toolTipHelper.hasClass(options.activeSelector)){noClose=true;}},mouseLeaveFunction:function(element){methods.closeToolTip();},closeToolTip:function(){noClose=false;setTimeout(function(){if(!noClose){methods.close();}},options.mouseoutDelay);},open:function(){if(!toolTipHelper.hasClass(options.activeSelector)){toolTipHelper.toggleClass(options.activeSelector);}},close:function(element){if(toolTipHelper.hasClass(options.activeSelector)){toolTipHelper.toggleClass(options.activeSelector);}},getToolTipId:function(element){element=jQuery(element.currentTarget);var rel=element.attr('rel');if(rel){var result=options.idselector.exec(rel);if(result&&result.length>1){return result[1];}}
return null;},getToolTipType:function(element){element=jQuery(element.currentTarget);var toolTipType=element.attr('tooltip-type');if(toolTipType){return toolTipType;}
return options.toolTipType;},getToolTipClass:function(element){element=jQuery(element.currentTarget);var toolTipClass=element.attr('tooltip-class');if(toolTipClass){return toolTipClass;}
return'';},getCurrentPosition:function(element,positionType){element=jQuery(element.currentTarget);var position=element.offset();var toolTipWidth=toolTipHelper.find('.content').outerWidth();var toolTipHeight=toolTipHelper.find('.content').outerHeight();var halfToolTipWidth=toolTipWidth/2;var halfElementWidth=element.width()/2;var elementHeight=element.height();if(positionType=='top'||positionType=="bottom"){position.arrowLeft=(position.left+halfElementWidth)-options.sitePaddings;position.tooltipLeft=position.left+(halfElementWidth-halfToolTipWidth)-(options.sitePaddings/2);position.mouseHelperLeft=position.arrowLeft-30;if(positionType=='top'){position.arrowTop=position.top-options.arrowHeight;position.tooltipTop=position.top-toolTipHeight-options.arrowHeight;position.mouseHelperTop=position.arrowTop-15;}
if(positionType=='bottom'){position.arrowTop=position.top+elementHeight;position.tooltipTop=position.top+elementHeight+options.arrowHeight;position.mouseHelperTop=position.arrowTop-2;}}
if(positionType=='left'||positionType=="right"){position.tooltipTop=position.top+(elementHeight/2)-(toolTipHeight/2);position.arrowTop=position.top+(elementHeight/2)-options.arrowHeight;position.mouseHelperTop=position.arrowTop-7;if(positionType=='left'){position.tooltipLeft=position.left-toolTipWidth-options.arrowHeight;position.arrowLeft=position.left-options.arrowHeight;position.mouseHelperLeft=position.arrowLeft-65;}
if(positionType=='right'){position.tooltipLeft=position.left+(halfElementWidth*2)+options.arrowHeight;position.arrowLeft=position.left+(halfElementWidth*2);position.mouseHelperLeft=position.arrowLeft;}}
var leftPosition=position.tooltipLeft;jQuery.each(options.boundaryBoxes,function(index,boxSelector){var boundaryBox=element.parents(boxSelector);if(boundaryBox.length!=1){return;}
if(positionType=='left'||positionType=="right"){return;}
var bbBoxRight=boundaryBox.innerWidth()+boundaryBox.position().left-options.sitePaddings;var bbBoxLeft=boundaryBox.position().left+options.sitePaddings;if(leftPosition+toolTipWidth>bbBoxRight){position.tooltipLeft=bbBoxRight-toolTipWidth;}
if(leftPosition<bbBoxLeft){position.tooltipLeft=bbBoxLeft;}});return position;}};jQuery.fn.tooltip=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}};})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORJJ-T', bundleError);}


/* LIBCORMOOMOD */
try{
;window.Modernizr=function(a,b,c){function D(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return C(d,b)}function C(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function B(a,b){return!!~(""+a).indexOf(b)}function A(a,b){return typeof a===b}function z(a,b){return y(o.join(a+";")+(b||""))}function y(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l,m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={},r={},s={},t=[],u=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["&shy;","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},v,w={}.hasOwnProperty,x;!A(w,c)&&!A(w.call,c)?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],c)};var E=function(a,c){var d=a.join(""),f=c.length;u(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.generatedcontent=i.generatedcontent.offsetHeight>=1},f,c)}([,['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],[,"generatedcontent"]);q.multiplebgs=function(){y("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},q.backgroundsize=function(){return D("backgroundSize")},q.borderimage=function(){return D("borderImage")},q.borderradius=function(){return D("borderRadius")},q.boxshadow=function(){return D("boxShadow")},q.textshadow=function(){return b.createElement("div").style.textShadow===""},q.opacity=function(){z("opacity:.55");return/^0.55$/.test(k.opacity)},q.csscolumns=function(){return D("columnCount")},q.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";y((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return B(k.backgroundImage,"gradient")},q.generatedcontent=function(){return e.generatedcontent},q.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},q.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c};for(var F in q)x(q,F)&&(v=F.toLowerCase(),e[v]=q[F](),t.push((e[v]?"":"no-")+v));y(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.testProp=function(a){return C([a])},e.testAllProps=D,e.testStyles=u,g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+t.join(" "):"");return e}(this,this.document),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length-++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORMOOMOD', bundleError);}


/* LIBCORMOOMOO */
try{
var useOldMootool=window.location.hostname.match(/holidaycheck/);(function(){this.MooTools={version:'1.31',holidaycheck_modified:'true',build:'a3eed692dd85050d80168ec2c708efe901bb7db3'};var typeOf=this.typeOf=function(item){if(item==null)return'null';if(item.$family)return item.$family();if(item.nodeName){if(item.nodeType==1)return'element';if(item.nodeType==3)return(/\S/).test(item.nodeValue)?'textnode':'whitespace';}else if(typeof item.length=='number'){if(item.callee)return'arguments';if('item'in item)return'collection';}
return typeof item;};var instanceOf=this.instanceOf=function(item,object){if(item==null)return false;var constructor=item.$constructor||item.constructor;while(constructor){if(constructor===object)return true;constructor=constructor.parent;}
return item instanceof object;};var Function=this.Function;var enumerables=true;for(var i in{toString:1})enumerables=null;if(enumerables)enumerables=['hasOwnProperty','valueOf','isPrototypeOf','propertyIsEnumerable','toLocaleString','toString','constructor'];Function.prototype.overloadSetter=function(usePlural){var self=this;return function(a,b){if(a==null)return this;if(usePlural||typeof a!='string'){for(var k in a)self.call(this,k,a[k]);if(enumerables)for(var i=enumerables.length;i--;){k=enumerables[i];if(a.hasOwnProperty(k))self.call(this,k,a[k]);}}else{self.call(this,a,b);}
return this;};};Function.prototype.overloadGetter=function(usePlural){var self=this;return function(a){var args,result;if(usePlural||typeof a!='string')args=a;else if(arguments.length>1)args=arguments;if(args){result={};for(var i=0;i<args.length;i++)result[args[i]]=self.call(this,args[i]);}else{result=self.call(this,a);}
return result;};};Function.prototype.extend=function(key,value){this[key]=value;}.overloadSetter();Function.prototype.implement=function(key,value){this.prototype[key]=value;}.overloadSetter();var slice=Array.prototype.slice;Function.from=function(item){return(typeOf(item)=='function')?item:function(){return item;};};Array.from=function(item){if(item==null)return[];return(Type.isEnumerable(item)&&typeof item!='string')?(typeOf(item)=='array')?item:slice.call(item):[item];};Number.from=function(item){var number=parseFloat(item);return isFinite(number)?number:null;};String.from=function(item){return item+'';};Function.implement({hide:function(){this.$hidden=true;return this;},protect:function(){this.$protected=true;return this;}});var Type=this.Type=function(name,object){if(name){var lower=name.toLowerCase();var typeCheck=function(item){return(typeOf(item)==lower);};Type['is'+name]=typeCheck;if(object!=null){object.prototype.$family=(function(){return lower;}).hide();object.type=typeCheck;}}
if(object==null)return null;object.extend(this);object.$constructor=Type;object.prototype.$constructor=object;return object;};var toString=Object.prototype.toString;Type.isEnumerable=function(item){return(item!=null&&typeof item.length=='number'&&toString.call(item)!='[object Function]');};var hooks={};var hooksOf=function(object){var type=typeOf(object.prototype);return hooks[type]||(hooks[type]=[]);};var implement=function(name,method){if(method&&method.$hidden)return this;var hooks=hooksOf(this);for(var i=0;i<hooks.length;i++){var hook=hooks[i];if(typeOf(hook)=='type')implement.call(hook,name,method);else hook.call(this,name,method);}
var previous=this.prototype[name];if(previous==null||!previous.$protected)this.prototype[name]=method;if(this[name]==null&&typeOf(method)=='function')extend.call(this,name,function(item){return method.apply(item,slice.call(arguments,1));});return this;};var extend=function(name,method){if(method&&method.$hidden)return this;var previous=this[name];if(previous==null||!previous.$protected)this[name]=method;return this;};Type.implement({implement:implement.overloadSetter(),extend:extend.overloadSetter(),alias:function(name,existing){implement.call(this,name,this.prototype[existing]);}.overloadSetter(),mirror:function(hook){hooksOf(this).push(hook);return this;}});new Type('Type',Type);var force=function(name,object,methods){var isType=(object!=Object),prototype=object.prototype;if(isType)object=new Type(name,object);for(var i=0,l=methods.length;i<l;i++){var key=methods[i],generic=object[key],proto=prototype[key];if(generic)generic.protect();if(isType&&proto){delete prototype[key];prototype[key]=proto.protect();}}
if(isType)object.implement(prototype);return force;};force('String',String,['charAt','charCodeAt','concat','indexOf','lastIndexOf','match','quote','replace','search','slice','split','substr','substring','toLowerCase','toUpperCase'])('Array',Array,['pop','push','reverse','shift','sort','splice','unshift','concat','join','slice','indexOf','lastIndexOf','filter','forEach','every','map','some','reduce','reduceRight'])('Number',Number,['toExponential','toFixed','toLocaleString','toPrecision'])('Function',Function,['apply','call','bind'])('RegExp',RegExp,['exec','test'])('Object',Object,['create','defineProperty','defineProperties','keys','getPrototypeOf','getOwnPropertyDescriptor','getOwnPropertyNames','preventExtensions','isExtensible','seal','isSealed','freeze','isFrozen'])('Date',Date,['now']);Object.extend=extend.overloadSetter();Date.extend('now',function(){return+(new Date);});new Type('Boolean',Boolean);Number.prototype.$family=function(){return isFinite(this)?'number':'null';}.hide();Number.extend('random',function(min,max){return Math.floor(Math.random()*(max-min+1)+min);});var hasOwnProperty=Object.prototype.hasOwnProperty;Object.extend('forEach',function(object,fn,bind){for(var key in object){if(hasOwnProperty.call(object,key))fn.call(bind,object[key],key,object);}});Object.each=Object.forEach;Array.implement({forEach:function(fn,bind){for(var i=0,l=this.length;i<l;i++){if(i in this)fn.call(bind,this[i],i,this);}},each:function(fn,bind){Array.forEach(this,fn,bind);return this;}});var cloneOf=function(item){switch(typeOf(item)){case'array':return item.clone();case'object':return Object.clone(item);default:return item;}};Array.implement('clone',function(){var i=this.length,clone=new Array(i);while(i--)clone[i]=cloneOf(this[i]);return clone;});var mergeOne=function(source,key,current){switch(typeOf(current)){case'object':if(typeOf(source[key])=='object')Object.merge(source[key],current);else source[key]=Object.clone(current);break;case'array':source[key]=current.clone();break;default:source[key]=current;}
return source;};Object.extend({merge:function(source,k,v){if(typeOf(k)=='string')return mergeOne(source,k,v);for(var i=1,l=arguments.length;i<l;i++){var object=arguments[i];for(var key in object)mergeOne(source,key,object[key]);}
return source;},clone:function(object){var clone={};for(var key in object)clone[key]=cloneOf(object[key]);return clone;},append:function(original){for(var i=1,l=arguments.length;i<l;i++){var extended=arguments[i]||{};for(var key in extended)original[key]=extended[key];}
return original;}});['Object','WhiteSpace','TextNode','Collection','Arguments'].each(function(name){new Type(name);});var UID=Date.now();String.extend('uniqueID',function(){return(UID++).toString(36);});var Hash=this.Hash=new Type('Hash',function(object){if(typeOf(object)=='hash')object=Object.clone(object.getClean());for(var key in object)this[key]=object[key];return this;});Hash.implement({forEach:function(fn,bind){Object.forEach(this,fn,bind);},getClean:function(){var clean={};for(var key in this){if(this.hasOwnProperty(key))clean[key]=this[key];}
return clean;},getLength:function(){var length=0;for(var key in this){if(this.hasOwnProperty(key))length++;}
return length;}});Hash.alias('each','forEach');Object.type=Type.isObject;var Native=this.Native=function(properties){return new Type(properties.name,properties.initialize);};Native.type=Type.type;Native.implement=function(objects,methods){for(var i=0;i<objects.length;i++)objects[i].implement(methods);return Native;};var arrayType=Array.type;Array.type=function(item){return instanceOf(item,Array)||arrayType(item);};this.$A=function(item){return Array.from(item).slice();};this.$arguments=function(i){return function(){return arguments[i];};};this.$chk=function(obj){return!!(obj||obj===0);};this.$clear=function(timer){clearTimeout(timer);clearInterval(timer);return null;};this.$defined=function(obj){return(obj!=null);};this.$each=function(iterable,fn,bind){var type=typeOf(iterable);((type=='arguments'||type=='collection'||type=='array'||type=='elements')?Array:Object).each(iterable,fn,bind);};this.$empty=function(){};this.$extend=function(original,extended){return Object.append(original,extended);};this.$H=function(object){return new Hash(object);};this.$merge=function(){var args=Array.slice(arguments);args.unshift({});return Object.merge.apply(null,args);};this.$lambda=Function.from;this.$mixin=Object.merge;this.$random=Number.random;this.$splat=Array.from;this.$time=Date.now;this.$type=function(object){var type=typeOf(object);if(type=='elements')return'array';return(type=='null')?false:type;};this.$unlink=function(object){switch(typeOf(object)){case'object':return Object.clone(object);case'array':return Array.clone(object);case'hash':return new Hash(object);default:return object;}};})();Array.implement({invoke:function(methodName){var args=Array.slice(arguments,1);return this.map(function(item){return item[methodName].apply(item,args);});},every:function(fn,bind){for(var i=0,l=this.length;i<l;i++){if((i in this)&&!fn.call(bind,this[i],i,this))return false;}
return true;},filter:function(fn,bind){var results=[];for(var i=0,l=this.length;i<l;i++){if((i in this)&&fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},clean:function(){return this.filter(function(item){return item!=null;});},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},map:function(fn,bind){var results=[];for(var i=0,l=this.length;i<l;i++){if(i in this)results[i]=fn.call(bind,this[i],i,this);}
return results;},some:function(fn,bind){for(var i=0,l=this.length;i<l;i++){if((i in this)&&fn.call(bind,this[i],i,this))return true;}
return false;},associate:function(keys){var obj={},length=Math.min(this.length,keys.length);for(var i=0;i<length;i++)obj[keys[i]]=this[i];return obj;},link:function(object){var result={};for(var i=0,l=this.length;i<l;i++){for(var key in object){if(object[key](this[i])){result[key]=this[i];delete object[key];break;}}}
return result;},contains:function(item,from){return this.indexOf(item,from)!=-1;},append:function(array){this.push.apply(this,array);return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[Number.random(0,this.length-1)]:null;},include:function(item){if(!this.contains(item))this.push(item);return this;},combine:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},erase:function(item){for(var i=this.length;i--;){if(this[i]===item)this.splice(i,1);}
return this;},empty:function(){this.length=0;return this;},flatten:function(){var array=[];for(var i=0,l=this.length;i<l;i++){var type=typeOf(this[i]);if(type=='null')continue;array=array.concat((type=='array'||type=='collection'||type=='arguments'||instanceOf(this[i],Array))?Array.flatten(this[i]):this[i]);}
return array;},pick:function(){for(var i=0,l=this.length;i<l;i++){if(this[i]!=null)return this[i];}
return null;},hexToRgb:function(array){if(this.length!=3)return null;var rgb=this.map(function(value){if(value.length==1)value+=value;return value.toInt(16);});return(array)?rgb:'rgb('+rgb+')';},rgbToHex:function(array){if(this.length<3)return null;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return(array)?hex:'#'+hex.join('');}});Array.alias('extend','append');var $pick=function(){return Array.from(arguments).pick();};String.implement({test:function(regex,params){return((typeOf(regex)=='regexp')?regex:new RegExp(''+regex,params)).test(this);},contains:function(string,separator){return(separator)?(separator+this+separator).indexOf(separator+string+separator)>-1:this.indexOf(string)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,'');},clean:function(){return this.replace(/\s+/g,' ').trim();},camelCase:function(){return this.replace(/-\D/g,function(match){return match.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(match){return('-'+match.charAt(0).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(match){return match.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,'\\$1');},toInt:function(base){return parseInt(this,base||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(array){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(hex)?hex.slice(1).hexToRgb(array):null;},rgbToHex:function(array){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHex(array):null;},substitute:function(object,regexp){return this.replace(regexp||(/\\?\{([^{}]+)\}/g),function(match,name){if(match.charAt(0)=='\\')return match.slice(1);return(object[name]!=null)?object[name]:'';});}});Number.implement({limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0).toFixed(precision<0?-precision:0);return Math.round(this*precision)/precision;},times:function(fn,bind){for(var i=0;i<this;i++)fn.call(bind,i,this);},toFloat:function(){return parseFloat(this);},toInt:function(base){return parseInt(this,base||10);}});Number.alias('each','times');(function(math){var methods={};math.each(function(name){if(!Number[name])methods[name]=function(){return Math[name].apply(null,[this].concat(Array.from(arguments)));};});Number.implement(methods);})(['abs','acos','asin','atan','atan2','ceil','cos','exp','floor','log','max','min','pow','sin','sqrt','tan']);Function.extend({attempt:function(){for(var i=0,l=arguments.length;i<l;i++){try{return arguments[i]();}catch(e){}}
return null;}});var implementFunctionConfig={attempt:function(args,bind){try{return this.apply(bind,Array.from(args));}catch(e){}
return null;},pass:function(args,bind){var self=this;if(args!=null)args=Array.from(args);return function(){return self.apply(bind,args||arguments);};},delay:function(delay,bind,args){return setTimeout(this.pass(args,bind),delay);},periodical:function(periodical,bind,args){return setInterval(this.pass(args,bind),periodical);}};if(useOldMootool){implementFunctionConfig.bind=function(bind){var self=this,args=(arguments.length>1)?Array.slice(arguments,1):null;return function(){if(!args&&!arguments.length)return self.call(bind);if(args&&arguments.length)return self.apply(bind,args.concat(Array.from(arguments)));return self.apply(bind,args||arguments);};};}
Function.implement(implementFunctionConfig);if(useOldMootool){delete Function.prototype.bind;}
Function.implement({create:function(options){var self=this;options=options||{};return function(event){var args=options.arguments;args=(args!=null)?Array.from(args):Array.slice(arguments,(options.event)?1:0);if(options.event)args=[event||window.event].extend(args);var returns=function(){return self.apply(options.bind||null,args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)return Function.attempt(returns);return returns();};},bind:function(bind,args){var self=this;if(args!=null)args=Array.from(args);return function(){return self.apply(bind,args||arguments);};},bindWithEvent:function(bind,args){var self=this;if(args!=null)args=Array.from(args);return function(event){return self.apply(bind,(args==null)?arguments:[event].concat(args));};},run:function(args,bind){return this.apply(bind,Array.from(args));}});var $try=Function.attempt;Object.extend({subset:function(object,keys){var results={};for(var i=0,l=keys.length;i<l;i++){var k=keys[i];results[k]=object[k];}
return results;},map:function(object,fn,bind){var results={};for(var key in object){if(object.hasOwnProperty(key))results[key]=fn.call(bind,object[key],key,object);}
return results;},filter:function(object,fn,bind){var results={};Object.each(object,function(value,key){if(fn.call(bind,value,key,object))results[key]=value;});return results;},every:function(object,fn,bind){for(var key in object){if(object.hasOwnProperty(key)&&!fn.call(bind,object[key],key))return false;}
return true;},some:function(object,fn,bind){for(var key in object){if(object.hasOwnProperty(key)&&fn.call(bind,object[key],key))return true;}
return false;},keys:function(object){var keys=[];for(var key in object){if(object.hasOwnProperty(key))keys.push(key);}
return keys;},values:function(object){var values=[];for(var key in object){if(object.hasOwnProperty(key))values.push(object[key]);}
return values;},getLength:function(object){return Object.keys(object).length;},keyOf:function(object,value){for(var key in object){if(object.hasOwnProperty(key)&&object[key]===value)return key;}
return null;},contains:function(object,value){return Object.keyOf(object,value)!=null;},toQueryString:function(object,base){var queryString=[];Object.each(object,function(value,key){if(base)key=base+'['+key+']';var result;switch(typeOf(value)){case'object':result=Object.toQueryString(value,key);break;case'array':var qs={};value.each(function(val,i){qs[i]=val;});result=Object.toQueryString(qs,key);break;default:result=key+'='+encodeURIComponent(value);}
if(value!=null)queryString.push(result);});return queryString.join('&');}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(value){return Object.keyOf(this,value);},hasValue:function(value){return Object.contains(this,value);},extend:function(properties){Hash.each(properties||{},function(value,key){Hash.set(this,key,value);},this);return this;},combine:function(properties){Hash.each(properties||{},function(value,key){Hash.include(this,key,value);},this);return this;},erase:function(key){if(this.hasOwnProperty(key))delete this[key];return this;},get:function(key){return(this.hasOwnProperty(key))?this[key]:null;},set:function(key,value){if(!this[key]||this.hasOwnProperty(key))this[key]=value;return this;},empty:function(){Hash.each(this,function(value,key){delete this[key];},this);return this;},include:function(key,value){if(this[key]==null)this[key]=value;return this;},map:function(fn,bind){return new Hash(Object.map(this,fn,bind));},filter:function(fn,bind){return new Hash(Object.filter(this,fn,bind));},every:function(fn,bind){return Object.every(this,fn,bind);},some:function(fn,bind){return Object.some(this,fn,bind);},getKeys:function(){return Object.keys(this);},getValues:function(){return Object.values(this);},toQueryString:function(base){return Object.toQueryString(this,base);}});Hash.extend=Object.append;Hash.alias({indexOf:'keyOf',contains:'hasValue'});(function(){var document=this.document;var window=document.window=this;var UID=1;this.$uid=(window.ActiveXObject)?function(item){return(item.uid||(item.uid=[UID++]))[0];}:function(item){return item.uid||(item.uid=UID++);};$uid(window);$uid(document);var ua=navigator.userAgent.toLowerCase(),platform=navigator.platform.toLowerCase(),UA=ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,'unknown',0],mode=UA[1]=='ie'&&document.documentMode;var Browser=this.Browser={extend:Function.prototype.extend,name:(UA[1]=='version')?UA[3]:UA[1],version:mode||parseFloat((UA[1]=='opera'&&UA[4])?UA[4]:UA[2]),Platform:{name:ua.match(/ip(?:ad|od|hone)/)?'ios':(ua.match(/(?:webos|android)/)||platform.match(/mac|win|linux/)||['other'])[0]},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector),json:!!(window.JSON)},Plugins:{}};Browser[Browser.name]=true;Browser[Browser.name+parseInt(Browser.version,10)]=true;Browser.Platform[Browser.Platform.name]=true;Browser.Request=(function(){var XMLHTTP=function(){return new XMLHttpRequest();};var MSXML2=function(){return new ActiveXObject('MSXML2.XMLHTTP');};var MSXML=function(){return new ActiveXObject('Microsoft.XMLHTTP');};return Function.attempt(function(){XMLHTTP();return XMLHTTP;},function(){MSXML2();return MSXML2;},function(){MSXML();return MSXML;});})();Browser.Features.xhr=!!(Browser.Request);var version=(Function.attempt(function(){return navigator.plugins['Shockwave Flash'].description;},function(){return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');})||'0 r0').match(/\d+/g);Browser.Plugins.Flash={version:Number(version[0]||'0.'+version[1])||0,build:Number(version[2])||0};Browser.exec=function(text){if(!text)return text;if(window.execScript){window.execScript(text);}else{var script=document.createElement('script');script.setAttribute('type','text/javascript');script.text=text;document.head.appendChild(script);document.head.removeChild(script);}
return text;};String.implement('stripScripts',function(exec){var scripts='';var text=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(all,code){scripts+=code+'\n';return'';});if(exec===true)Browser.exec(scripts);else if(typeOf(exec)=='function')exec(scripts,text);return text;});Browser.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event});this.Window=this.$constructor=new Type('Window',function(){});this.$family=Function.from('window').hide();Window.mirror(function(name,method){window[name]=method;});this.Document=document.$constructor=new Type('Document',function(){});document.$family=Function.from('document').hide();Document.mirror(function(name,method){document[name]=method;});document.html=document.documentElement;document.head=document.getElementsByTagName('head')[0];if(document.execCommand)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}
if(this.attachEvent&&!this.addEventListener){var unloadEvent=function(){this.detachEvent('onunload',unloadEvent);document.head=document.html=document.window=null;};this.attachEvent('onunload',unloadEvent);}
var arrayFrom=Array.from;try{arrayFrom(document.html.childNodes);}catch(e){Array.from=function(item){if(typeof item!='string'&&Type.isEnumerable(item)&&typeOf(item)!='array'){var i=item.length,array=new Array(i);while(i--)array[i]=item[i];return array;}
return arrayFrom(item);};var prototype=Array.prototype,slice=prototype.slice;['pop','push','reverse','shift','sort','splice','unshift','concat','join','slice'].each(function(name){var method=prototype[name];Array[name]=function(item){return method.apply(Array.from(item),slice.call(arguments,1));};});}
if(Browser.Platform.ios)Browser.Platform.ipod=true;Browser.Engine={};var setEngine=function(name,version){Browser.Engine.name=name;Browser.Engine[name+version]=true;Browser.Engine.version=version;};if(Browser.ie){Browser.Engine.trident=true;switch(Browser.version){case 6:setEngine('trident',4);break;case 7:setEngine('trident',5);break;case 8:setEngine('trident',6);}}
if(Browser.firefox){Browser.Engine.gecko=true;if(Browser.version>=3)setEngine('gecko',19);else setEngine('gecko',18);}
if(Browser.safari||Browser.chrome){Browser.Engine.webkit=true;switch(Browser.version){case 2:setEngine('webkit',419);break;case 3:setEngine('webkit',420);break;case 4:setEngine('webkit',525);}}
if(Browser.opera){Browser.Engine.presto=true;if(Browser.version>=9.6)setEngine('presto',960);else if(Browser.version>=9.5)setEngine('presto',950);else setEngine('presto',925);}
if(Browser.name=='unknown'){switch((ua.match(/(?:webkit|khtml|gecko)/)||[])[0]){case'webkit':case'khtml':Browser.Engine.webkit=true;break;case'gecko':Browser.Engine.gecko=true;}}
this.$exec=Browser.exec;})();var Event=new Type('Event',function(event,win){if(!win)win=window;var doc=win.document;event=event||win.event;if(event.$extended)return event;this.$extended=true;var type=event.type,target=event.target||event.srcElement,page={},client={};while(target&&target.nodeType==3)target=target.parentNode;if(type.indexOf('key')!=-1){var code=event.which||event.keyCode;var key=Object.keyOf(Event.Keys,code);if(type=='keydown'){var fKey=code-111;if(fKey>0&&fKey<13)key='f'+fKey;}
if(!key)key=String.fromCharCode(code).toLowerCase();}else if(type.test(/click|mouse|menu/i)){doc=(!doc.compatMode||doc.compatMode=='CSS1Compat')?doc.html:doc.body;page={x:(event.pageX!=null)?event.pageX:event.clientX+doc.scrollLeft,y:(event.pageY!=null)?event.pageY:event.clientY+doc.scrollTop};client={x:(event.pageX!=null)?event.pageX-win.pageXOffset:event.clientX,y:(event.pageY!=null)?event.pageY-win.pageYOffset:event.clientY};if(type.test(/DOMMouseScroll|mousewheel/)){var wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;}
var rightClick=(event.which==3)||(event.button==2),related=null;if(type.test(/over|out/)){related=event.relatedTarget||event[(type=='mouseover'?'from':'to')+'Element'];var testRelated=function(){while(related&&related.nodeType==3)related=related.parentNode;return true;};var hasRelated=(Browser.firefox2)?testRelated.attempt():testRelated();related=(hasRelated)?related:null;}}else if(type.test(/gesture|touch/i)){this.rotation=event.rotation;this.scale=event.scale;this.targetTouches=event.targetTouches;this.changedTouches=event.changedTouches;var touches=this.touches=event.touches;if(touches&&touches[0]){var touch=touches[0];page={x:touch.pageX,y:touch.pageY};client={x:touch.clientX,y:touch.clientY};}}
return Object.append(this,{event:event,type:type,page:page,client:client,rightClick:rightClick,wheel:wheel,relatedTarget:document.id(related),target:document.id(target),code:code,key:key,shift:event.shiftKey,control:event.ctrlKey,alt:event.altKey,meta:event.metaKey});});Event.Keys={'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46};Event.Keys=new Hash(Event.Keys);Event.implement({stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});(function(){var Class=this.Class=new Type('Class',function(params){if(instanceOf(params,Function))params={initialize:params};var newClass=function(){reset(this);if(newClass.$prototyping)return this;this.$caller=null;var value=(this.initialize)?this.initialize.apply(this,arguments):this;this.$caller=this.caller=null;return value;}.extend(this).implement(params);newClass.$constructor=Class;newClass.prototype.$constructor=newClass;newClass.prototype.parent=parent;return newClass;});var parent=function(){if(!this.$caller)throw new Error('The method "parent" cannot be called.');var name=this.$caller.$name,parent=this.$caller.$owner.parent,previous=(parent)?parent.prototype[name]:null;if(!previous)throw new Error('The method "'+name+'" has no parent.');return previous.apply(this,arguments);};var reset=function(object){for(var key in object){var value=object[key];switch(typeOf(value)){case'object':var F=function(){};F.prototype=value;object[key]=reset(new F);break;case'array':object[key]=value.clone();break;}}
return object;};var wrap=function(self,key,method){if(method.$origin)method=method.$origin;var wrapper=function(){if(method.$protected&&this.$caller==null)throw new Error('The method "'+key+'" cannot be called.');var caller=this.caller,current=this.$caller;this.caller=current;this.$caller=wrapper;var result=method.apply(this,arguments);this.$caller=current;this.caller=caller;return result;}.extend({$owner:self,$origin:method,$name:key});return wrapper;};var implement=function(key,value,retain){if(Class.Mutators.hasOwnProperty(key)){value=Class.Mutators[key].call(this,value);if(value==null)return this;}
if(typeOf(value)=='function'){if(value.$hidden)return this;this.prototype[key]=(retain)?value:wrap(this,key,value);}else{Object.merge(this.prototype,key,value);}
return this;};var getInstance=function(klass){klass.$prototyping=true;var proto=new klass;delete klass.$prototyping;return proto;};Class.implement('implement',implement.overloadSetter());Class.Mutators={Extends:function(parent){this.parent=parent;this.prototype=getInstance(parent);},Implements:function(items){Array.from(items).each(function(item){var instance=new item;for(var key in instance)implement.call(this,key,instance[key],true);},this);}};})();(function(){this.Chain=new Class({$chain:[],chain:function(){this.$chain.append(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();return this;}});var removeOn=function(string){return string.replace(/^on([A-Z])/,function(full,first){return first.toLowerCase();});};this.Events=new Class({$events:{},addEvent:function(type,fn,internal){type=removeOn(type);if(fn==$empty)return this;this.$events[type]=(this.$events[type]||[]).include(fn);if(internal)fn.internal=true;return this;},addEvents:function(events){for(var type in events)this.addEvent(type,events[type]);return this;},fireEvent:function(type,args,delay){type=removeOn(type);var events=this.$events[type];if(!events)return this;args=Array.from(args);events.each(function(fn){if(delay)fn.delay(delay,this,args);else fn.apply(this,args);},this);return this;},removeEvent:function(type,fn){type=removeOn(type);var events=this.$events[type];if(events&&!fn.internal){var index=events.indexOf(fn);if(index!=-1)delete events[index];}
return this;},removeEvents:function(events){var type;if(typeOf(events)=='object'){for(type in events)this.removeEvent(type,events[type]);return this;}
if(events)events=removeOn(events);for(type in this.$events){if(events&&events!=type)continue;var fns=this.$events[type];for(var i=fns.length;i--;)this.removeEvent(type,fns[i]);}
return this;}});this.Options=new Class({setOptions:function(){var options=this.options=Object.merge.apply(null,[{},this.options].append(arguments));if(!this.addEvent)return this;for(var option in options){if(typeOf(options[option])!='function'||!(/^on[A-Z]/).test(option))continue;this.addEvent(option,options[option]);delete options[option];}
return this;}});})();(function(){var parsed,separatorIndex,combinatorIndex,reversed,cache={},reverseCache={},reUnescape=/\\/g;var parse=function(expression,isReversed){if(expression==null)return null;if(expression.Slick===true)return expression;expression=(''+expression).replace(/^\s+|\s+$/g,'');reversed=!!isReversed;var currentCache=(reversed)?reverseCache:cache;if(currentCache[expression])return currentCache[expression];parsed={Slick:true,expressions:[],raw:expression,reverse:function(){return parse(this.raw,true);}};separatorIndex=-1;while(expression!=(expression=expression.replace(regexp,parser)));parsed.length=parsed.expressions.length;return currentCache[expression]=(reversed)?reverse(parsed):parsed;};var reverseCombinator=function(combinator){if(combinator==='!')return' ';else if(combinator===' ')return'!';else if((/^!/).test(combinator))return combinator.replace(/^!/,'');else return'!'+combinator;};var reverse=function(expression){var expressions=expression.expressions;for(var i=0;i<expressions.length;i++){var exp=expressions[i];var last={parts:[],tag:'*',combinator:reverseCombinator(exp[0].combinator)};for(var j=0;j<exp.length;j++){var cexp=exp[j];if(!cexp.reverseCombinator)cexp.reverseCombinator=' ';cexp.combinator=cexp.reverseCombinator;delete cexp.reverseCombinator;}
exp.reverse().push(last);}
return expression;};var escapeRegExp=function(string){return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,"\\$&");};var regexp=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|:+(<unicode>+)(?:\\((?:(?:([\"'])([^\\12]*)\\12)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,'['+escapeRegExp(">+~`!@$%^&={}\\;</")+']').replace(/<unicode>/g,'(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])').replace(/<unicode1>/g,'(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])'));function parser(rawMatch,separator,combinator,combinatorChildren,tagName,id,className,attributeKey,attributeOperator,attributeQuote,attributeValue,pseudoClass,pseudoQuote,pseudoClassQuotedValue,pseudoClassValue){if(separator||separatorIndex===-1){parsed.expressions[++separatorIndex]=[];combinatorIndex=-1;if(separator)return'';}
if(combinator||combinatorChildren||combinatorIndex===-1){combinator=combinator||' ';var currentSeparator=parsed.expressions[separatorIndex];if(reversed&&currentSeparator[combinatorIndex])
currentSeparator[combinatorIndex].reverseCombinator=reverseCombinator(combinator);currentSeparator[++combinatorIndex]={combinator:combinator,tag:'*'};}
var currentParsed=parsed.expressions[separatorIndex][combinatorIndex];if(tagName){currentParsed.tag=tagName.replace(reUnescape,'');}else if(id){currentParsed.id=id.replace(reUnescape,'');}else if(className){className=className.replace(reUnescape,'');if(!currentParsed.classList)currentParsed.classList=[];if(!currentParsed.classes)currentParsed.classes=[];currentParsed.classList.push(className);currentParsed.classes.push({value:className,regexp:new RegExp('(^|\\s)'+escapeRegExp(className)+'(\\s|$)')});}else if(pseudoClass){pseudoClassValue=pseudoClassValue||pseudoClassQuotedValue;pseudoClassValue=pseudoClassValue?pseudoClassValue.replace(reUnescape,''):null;if(!currentParsed.pseudos)currentParsed.pseudos=[];currentParsed.pseudos.push({key:pseudoClass.replace(reUnescape,''),value:pseudoClassValue});}else if(attributeKey){attributeKey=attributeKey.replace(reUnescape,'');attributeValue=(attributeValue||'').replace(reUnescape,'');var test,regexp;switch(attributeOperator){case'^=':regexp=new RegExp('^'+escapeRegExp(attributeValue));break;case'$=':regexp=new RegExp(escapeRegExp(attributeValue)+'$');break;case'~=':regexp=new RegExp('(^|\\s)'+escapeRegExp(attributeValue)+'(\\s|$)');break;case'|=':regexp=new RegExp('^'+escapeRegExp(attributeValue)+'(-|$)');break;case'=':test=function(value){return attributeValue==value;};break;case'*=':test=function(value){return value&&value.indexOf(attributeValue)>-1;};break;case'!=':test=function(value){return attributeValue!=value;};break;default:test=function(value){return!!value;};}
if(attributeValue==''&&(/^[*$^]=$/).test(attributeOperator))test=function(){return false;};if(!test)test=function(value){return value&&regexp.test(value);};if(!currentParsed.attributes)currentParsed.attributes=[];currentParsed.attributes.push({key:attributeKey,operator:attributeOperator,value:attributeValue,test:test});}
return'';};var Slick=(this.Slick||{});Slick.parse=function(expression){return parse(expression);};Slick.escapeRegExp=escapeRegExp;if(!this.Slick)this.Slick=Slick;}).apply((typeof exports!='undefined')?exports:this);(function(){var local={};local.isNativeCode=function(fn){return(/\{\s*\[native code\]\s*\}/).test(''+fn);};local.isXML=function(document){return(!!document.xmlVersion)||(!!document.xml)||(Object.prototype.toString.call(document)==='[object XMLDocument]')||(document.nodeType===9&&document.documentElement.nodeName!=='HTML');};local.setDocument=function(document){if(document.nodeType===9);else if(document.ownerDocument)document=document.ownerDocument;else if(document.navigator)document=document.document;else return;if(this.document===document)return;this.document=document;var root=this.root=document.documentElement;this.isXMLDocument=this.isXML(document);this.brokenStarGEBTN=this.starSelectsClosedQSA=this.idGetsName=this.brokenMixedCaseQSA=this.brokenGEBCN=this.brokenCheckedQSA=this.brokenEmptyAttributeQSA=this.isHTMLDocument=false;var starSelectsClosed,starSelectsComments,brokenSecondClassNameGEBCN,cachedGetElementsByClassName;var selected,id;var testNode=document.createElement('div');root.appendChild(testNode);try{id='slick_getbyid_test';testNode.innerHTML='<a id="'+id+'"></a>';this.isHTMLDocument=!!document.getElementById(id);}catch(e){};if(this.isHTMLDocument){testNode.style.display='none';testNode.appendChild(document.createComment(''));starSelectsComments=(testNode.getElementsByTagName('*').length>0);try{testNode.innerHTML='foo</foo>';selected=testNode.getElementsByTagName('*');starSelectsClosed=(selected&&selected.length&&selected[0].nodeName.charAt(0)=='/');}catch(e){};this.brokenStarGEBTN=starSelectsComments||starSelectsClosed;if(testNode.querySelectorAll)try{testNode.innerHTML='foo</foo>';selected=testNode.querySelectorAll('*');this.starSelectsClosedQSA=(selected&&selected.length&&selected[0].nodeName.charAt(0)=='/');}catch(e){};try{id='slick_id_gets_name';testNode.innerHTML='<a name="'+id+'"></a><b id="'+id+'"></b>';this.idGetsName=document.getElementById(id)===testNode.firstChild;}catch(e){};try{testNode.innerHTML='<a class="MiXedCaSe"></a>';this.brokenMixedCaseQSA=!testNode.querySelectorAll('.MiXedCaSe').length;}catch(e){};try{testNode.innerHTML='<a class="f"></a><a class="b"></a>';testNode.getElementsByClassName('b').length;testNode.firstChild.className='b';cachedGetElementsByClassName=(testNode.getElementsByClassName('b').length!=2);}catch(e){};try{testNode.innerHTML='<a class="a"></a><a class="f b a"></a>';brokenSecondClassNameGEBCN=(testNode.getElementsByClassName('a').length!=2);}catch(e){};this.brokenGEBCN=cachedGetElementsByClassName||brokenSecondClassNameGEBCN;try{testNode.innerHTML='<select><option selected="selected">a</option></select>';this.brokenCheckedQSA=(testNode.querySelectorAll(':checked').length==0);}catch(e){};try{testNode.innerHTML='<a class=""></a>';this.brokenEmptyAttributeQSA=(testNode.querySelectorAll('[class*=""]').length!=0);}catch(e){};}
root.removeChild(testNode);testNode=null;this.hasAttribute=(root&&this.isNativeCode(root.hasAttribute))?function(node,attribute){return node.hasAttribute(attribute);}:function(node,attribute){node=node.getAttributeNode(attribute);return!!(node&&(node.specified||node.nodeValue));};this.contains=(root&&this.isNativeCode(root.contains))?function(context,node){return context.contains(node);}:(root&&root.compareDocumentPosition)?function(context,node){return context===node||!!(context.compareDocumentPosition(node)&16);}:function(context,node){if(node)do{if(node===context)return true;}while((node=node.parentNode));return false;};this.documentSorter=(root.compareDocumentPosition)?function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition)return 0;return a.compareDocumentPosition(b)&4?-1:a===b?0:1;}:('sourceIndex'in root)?function(a,b){if(!a.sourceIndex||!b.sourceIndex)return 0;return a.sourceIndex-b.sourceIndex;}:(document.createRange)?function(a,b){if(!a.ownerDocument||!b.ownerDocument)return 0;var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);return aRange.compareBoundaryPoints(Range.START_TO_END,bRange);}:null;this.getUID=(this.isHTMLDocument)?this.getUIDHTML:this.getUIDXML;};local.search=function(context,expression,append,first){var found=this.found=(first)?null:(append||[]);if(!context)return found;if(context.navigator)context=context.document;else if(!context.nodeType)return found;var parsed,i;var uniques=this.uniques={};if(this.document!==(context.ownerDocument||context))this.setDocument(context);var shouldUniques=!!(append&&append.length);if(shouldUniques)for(i=found.length;i--;)this.uniques[this.getUID(found[i])]=true;if(typeof expression=='string'){for(i=this.overrides.length;i--;){var override=this.overrides[i];if(override.regexp.test(expression)){var result=override.method.call(context,expression,found,first);if(result===false)continue;if(result===true)return found;return result;}}
parsed=this.Slick.parse(expression);if(!parsed.length)return found;}else if(expression==null){return found;}else if(expression.Slick){parsed=expression;}else if(this.contains(context.documentElement||context,expression)){(found)?found.push(expression):found=expression;return found;}else{return found;}
this.posNTH={};this.posNTHLast={};this.posNTHType={};this.posNTHTypeLast={};this.push=(!shouldUniques&&(first||(parsed.length==1&&parsed.expressions[0].length==1)))?this.pushArray:this.pushUID;if(found==null)found=[];var j,m,n;var combinator,tag,id,classList,classes,attributes,pseudos;var currentItems,currentExpression,currentBit,lastBit,expressions=parsed.expressions;search:for(i=0;(currentExpression=expressions[i]);i++)for(j=0;(currentBit=currentExpression[j]);j++){combinator='combinator:'+currentBit.combinator;if(!this[combinator])continue search;tag=(this.isXMLDocument)?currentBit.tag:currentBit.tag.toUpperCase();id=currentBit.id;classList=currentBit.classList;classes=currentBit.classes;attributes=currentBit.attributes;pseudos=currentBit.pseudos;lastBit=(j===(currentExpression.length-1));this.bitUniques={};if(lastBit){this.uniques=uniques;this.found=found;}else{this.uniques={};this.found=[];}
if(j===0){this[combinator](context,tag,id,classes,attributes,pseudos,classList);if(first&&lastBit&&found.length)break search;}else{if(first&&lastBit)for(m=0,n=currentItems.length;m<n;m++){this[combinator](currentItems[m],tag,id,classes,attributes,pseudos,classList);if(found.length)break search;}else for(m=0,n=currentItems.length;m<n;m++)this[combinator](currentItems[m],tag,id,classes,attributes,pseudos,classList);}
currentItems=this.found;}
if(shouldUniques||(parsed.expressions.length>1))this.sort(found);return(first)?(found[0]||null):found;};local.uidx=1;local.uidk='slick:uniqueid';local.getUIDXML=function(node){var uid=node.getAttribute(this.uidk);if(!uid){uid=this.uidx++;node.setAttribute(this.uidk,uid);}
return uid;};local.getUIDHTML=function(node){return node.uniqueNumber||(node.uniqueNumber=this.uidx++);};local.sort=function(results){if(!this.documentSorter)return results;results.sort(this.documentSorter);return results;};local.cacheNTH={};local.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/;local.parseNTHArgument=function(argument){var parsed=argument.match(this.matchNTH);if(!parsed)return false;var special=parsed[2]||false;var a=parsed[1]||1;if(a=='-')a=-1;var b=+parsed[3]||0;parsed=(special=='n')?{a:a,b:b}:(special=='odd')?{a:2,b:1}:(special=='even')?{a:2,b:0}:{a:0,b:a};return(this.cacheNTH[argument]=parsed);};local.createNTHPseudo=function(child,sibling,positions,ofType){return function(node,argument){var uid=this.getUID(node);if(!this[positions][uid]){var parent=node.parentNode;if(!parent)return false;var el=parent[child],count=1;if(ofType){var nodeName=node.nodeName;do{if(el.nodeName!==nodeName)continue;this[positions][this.getUID(el)]=count++;}while((el=el[sibling]));}else{do{if(el.nodeType!==1)continue;this[positions][this.getUID(el)]=count++;}while((el=el[sibling]));}}
argument=argument||'n';var parsed=this.cacheNTH[argument]||this.parseNTHArgument(argument);if(!parsed)return false;var a=parsed.a,b=parsed.b,pos=this[positions][uid];if(a==0)return b==pos;if(a>0){if(pos<b)return false;}else{if(b<pos)return false;}
return((pos-b)%a)==0;};};local.pushArray=function(node,tag,id,classes,attributes,pseudos){if(this.matchSelector(node,tag,id,classes,attributes,pseudos))this.found.push(node);};local.pushUID=function(node,tag,id,classes,attributes,pseudos){var uid=this.getUID(node);if(!this.uniques[uid]&&this.matchSelector(node,tag,id,classes,attributes,pseudos)){this.uniques[uid]=true;this.found.push(node);}};local.matchNode=function(node,selector){var parsed=this.Slick.parse(selector);if(!parsed)return true;if(parsed.length==1&&parsed.expressions[0].length==1){var exp=parsed.expressions[0][0];return this.matchSelector(node,(this.isXMLDocument)?exp.tag:exp.tag.toUpperCase(),exp.id,exp.classes,exp.attributes,exp.pseudos);}
var nodes=this.search(this.document,parsed);for(var i=0,item;item=nodes[i++];){if(item===node)return true;}
return false;};local.matchPseudo=function(node,name,argument){var pseudoName='pseudo:'+name;if(this[pseudoName])return this[pseudoName](node,argument);var attribute=this.getAttribute(node,name);return(argument)?argument==attribute:!!attribute;};local.matchSelector=function(node,tag,id,classes,attributes,pseudos){if(tag){if(tag=='*'){if(node.nodeName<'@')return false;}else{if(node.nodeName!=tag)return false;}}
if(id&&node.getAttribute('id')!=id)return false;var i,part,cls;if(classes)for(i=classes.length;i--;){cls=('className'in node)?node.className:node.getAttribute('class');if(!(cls&&classes[i].regexp.test(cls)))return false;}
if(attributes)for(i=attributes.length;i--;){part=attributes[i];if(part.operator?!part.test(this.getAttribute(node,part.key)):!this.hasAttribute(node,part.key))return false;}
if(pseudos)for(i=pseudos.length;i--;){part=pseudos[i];if(!this.matchPseudo(node,part.key,part.value))return false;}
return true;};var combinators={' ':function(node,tag,id,classes,attributes,pseudos,classList){var i,item,children;if(this.isHTMLDocument){getById:if(id){item=this.document.getElementById(id);if((!item&&node.all)||(this.idGetsName&&item&&item.getAttributeNode('id').nodeValue!=id)){children=node.all[id];if(!children)return;if(!children[0])children=[children];for(i=0;item=children[i++];)if(item.getAttributeNode('id').nodeValue==id){this.push(item,tag,null,classes,attributes,pseudos);break;}
return;}
if(!item){if(this.contains(this.document.documentElement,node))return;else break getById;}else if(this.document!==node&&!this.contains(node,item))return;this.push(item,tag,null,classes,attributes,pseudos);return;}
getByClass:if(classes&&node.getElementsByClassName&&!this.brokenGEBCN){children=node.getElementsByClassName(classList.join(' '));if(!(children&&children.length))break getByClass;for(i=0;item=children[i++];)this.push(item,tag,id,null,attributes,pseudos);return;}}
getByTag:{children=node.getElementsByTagName(tag);if(!(children&&children.length))break getByTag;if(!this.brokenStarGEBTN)tag=null;for(i=0;item=children[i++];)this.push(item,tag,id,classes,attributes,pseudos);}},'>':function(node,tag,id,classes,attributes,pseudos){if((node=node.firstChild))do{if(node.nodeType===1)this.push(node,tag,id,classes,attributes,pseudos);}while((node=node.nextSibling));},'+':function(node,tag,id,classes,attributes,pseudos){while((node=node.nextSibling))if(node.nodeType===1){this.push(node,tag,id,classes,attributes,pseudos);break;}},'^':function(node,tag,id,classes,attributes,pseudos){node=node.firstChild;if(node){if(node.nodeType===1)this.push(node,tag,id,classes,attributes,pseudos);else this['combinator:+'](node,tag,id,classes,attributes,pseudos);}},'~':function(node,tag,id,classes,attributes,pseudos){while((node=node.nextSibling)){if(node.nodeType!==1)continue;var uid=this.getUID(node);if(this.bitUniques[uid])break;this.bitUniques[uid]=true;this.push(node,tag,id,classes,attributes,pseudos);}},'++':function(node,tag,id,classes,attributes,pseudos){this['combinator:+'](node,tag,id,classes,attributes,pseudos);this['combinator:!+'](node,tag,id,classes,attributes,pseudos);},'~~':function(node,tag,id,classes,attributes,pseudos){this['combinator:~'](node,tag,id,classes,attributes,pseudos);this['combinator:!~'](node,tag,id,classes,attributes,pseudos);},'!':function(node,tag,id,classes,attributes,pseudos){while((node=node.parentNode))if(node!==this.document)this.push(node,tag,id,classes,attributes,pseudos);},'!>':function(node,tag,id,classes,attributes,pseudos){node=node.parentNode;if(node!==this.document)this.push(node,tag,id,classes,attributes,pseudos);},'!+':function(node,tag,id,classes,attributes,pseudos){while((node=node.previousSibling))if(node.nodeType===1){this.push(node,tag,id,classes,attributes,pseudos);break;}},'!^':function(node,tag,id,classes,attributes,pseudos){node=node.lastChild;if(node){if(node.nodeType===1)this.push(node,tag,id,classes,attributes,pseudos);else this['combinator:!+'](node,tag,id,classes,attributes,pseudos);}},'!~':function(node,tag,id,classes,attributes,pseudos){while((node=node.previousSibling)){if(node.nodeType!==1)continue;var uid=this.getUID(node);if(this.bitUniques[uid])break;this.bitUniques[uid]=true;this.push(node,tag,id,classes,attributes,pseudos);}}};for(var c in combinators)local['combinator:'+c]=combinators[c];var pseudos={'empty':function(node){var child=node.firstChild;return!(child&&child.nodeType==1)&&!(node.innerText||node.textContent||'').length;},'not':function(node,expression){return!this.matchNode(node,expression);},'contains':function(node,text){return(node.innerText||node.textContent||'').indexOf(text)>-1;},'first-child':function(node){while((node=node.previousSibling))if(node.nodeType===1)return false;return true;},'last-child':function(node){while((node=node.nextSibling))if(node.nodeType===1)return false;return true;},'only-child':function(node){var prev=node;while((prev=prev.previousSibling))if(prev.nodeType===1)return false;var next=node;while((next=next.nextSibling))if(next.nodeType===1)return false;return true;},'nth-child':local.createNTHPseudo('firstChild','nextSibling','posNTH'),'nth-last-child':local.createNTHPseudo('lastChild','previousSibling','posNTHLast'),'nth-of-type':local.createNTHPseudo('firstChild','nextSibling','posNTHType',true),'nth-last-of-type':local.createNTHPseudo('lastChild','previousSibling','posNTHTypeLast',true),'index':function(node,index){return this['pseudo:nth-child'](node,''+index+1);},'even':function(node,argument){return this['pseudo:nth-child'](node,'2n');},'odd':function(node,argument){return this['pseudo:nth-child'](node,'2n+1');},'first-of-type':function(node){var nodeName=node.nodeName;while((node=node.previousSibling))if(node.nodeName===nodeName)return false;return true;},'last-of-type':function(node){var nodeName=node.nodeName;while((node=node.nextSibling))if(node.nodeName===nodeName)return false;return true;},'only-of-type':function(node){var prev=node,nodeName=node.nodeName;while((prev=prev.previousSibling))if(prev.nodeName===nodeName)return false;var next=node;while((next=next.nextSibling))if(next.nodeName===nodeName)return false;return true;},'enabled':function(node){return(node.disabled===false);},'disabled':function(node){return(node.disabled===true);},'checked':function(node){return node.checked||node.selected;},'focus':function(node){return this.isHTMLDocument&&this.document.activeElement===node&&(node.href||node.type||this.hasAttribute(node,'tabindex'));},'root':function(node){return(node===this.root);},'selected':function(node){return node.selected;}};for(var p in pseudos)local['pseudo:'+p]=pseudos[p];local.attributeGetters={'class':function(){return('className'in this)?this.className:this.getAttribute('class');},'for':function(){return('htmlFor'in this)?this.htmlFor:this.getAttribute('for');},'href':function(){return('href'in this)?this.getAttribute('href',2):this.getAttribute('href');},'style':function(){return(this.style)?this.style.cssText:this.getAttribute('style');}};local.getAttribute=function(node,name){var method=this.attributeGetters[name];if(method)return method.call(node);var attributeNode=node.getAttributeNode(name);return attributeNode?attributeNode.nodeValue:null;};local.overrides=[];local.override=function(regexp,method){this.overrides.push({regexp:regexp,method:method});};var reEmptyAttribute=/\[.*[*$^]=(?:["']{2})?\]/;local.override(/./,function(expression,found,first){if(!this.querySelectorAll||this.nodeType!=9||!local.isHTMLDocument||local.brokenMixedCaseQSA||(local.brokenCheckedQSA&&expression.indexOf(':checked')>-1)||(local.brokenEmptyAttributeQSA&&reEmptyAttribute.test(expression))||Slick.disableQSA)return false;var nodes,node;try{if(first)return this.querySelector(expression)||null;else nodes=this.querySelectorAll(expression);}catch(error){return false;}
var i,hasOthers=!!(found.length);if(local.starSelectsClosedQSA)for(i=0;node=nodes[i++];){if(node.nodeName>'@'&&(!hasOthers||!local.uniques[local.getUIDHTML(node)]))found.push(node);}else for(i=0;node=nodes[i++];){if(!hasOthers||!local.uniques[local.getUIDHTML(node)])found.push(node);}
if(hasOthers)local.sort(found);return true;});local.override(/^[\w-]+$|^\*$/,function(expression,found,first){var tag=expression;if(tag=='*'&&local.brokenStarGEBTN)return false;var nodes=this.getElementsByTagName(tag);if(first)return nodes[0]||null;var i,node,hasOthers=!!(found.length);for(i=0;node=nodes[i++];){if(!hasOthers||!local.uniques[local.getUID(node)])found.push(node);}
if(hasOthers)local.sort(found);return true;});local.override(/^\.[\w-]+$/,function(expression,found,first){if(!local.isHTMLDocument||(!this.getElementsByClassName&&this.querySelectorAll))return false;var nodes,node,i,hasOthers=!!(found&&found.length),className=expression.substring(1);if(this.getElementsByClassName&&!local.brokenGEBCN){nodes=this.getElementsByClassName(className);if(first)return nodes[0]||null;for(i=0;node=nodes[i++];){if(!hasOthers||!local.uniques[local.getUIDHTML(node)])found.push(node);}}else{var matchClass=new RegExp('(^|\\s)'+Slick.escapeRegExp(className)+'(\\s|$)');nodes=this.getElementsByTagName('*');for(i=0;node=nodes[i++];){className=node.className;if(!className||!matchClass.test(className))continue;if(first)return node;if(!hasOthers||!local.uniques[local.getUIDHTML(node)])found.push(node);}}
if(hasOthers)local.sort(found);return(first)?null:true;});local.override(/^#[\w-]+$/,function(expression,found,first){if(!local.isHTMLDocument||this.nodeType!=9)return false;var id=expression.substring(1),el=this.getElementById(id);if(!el)return found;if(local.idGetsName&&el.getAttributeNode('id').nodeValue!=id)return false;if(first)return el||null;var hasOthers=!!(found.length);if(!hasOthers||!local.uniques[local.getUIDHTML(el)])found.push(el);if(hasOthers)local.sort(found);return true;});if(typeof document!='undefined')local.setDocument(document);var Slick=local.Slick=(this.Slick||{});Slick.version='0.9dev';Slick.search=function(context,expression,append){return local.search(context,expression,append);};Slick.find=function(context,expression){return local.search(context,expression,null,true);};Slick.contains=function(container,node){local.setDocument(container);return local.contains(container,node);};Slick.getAttribute=function(node,name){return local.getAttribute(node,name);};Slick.match=function(node,selector){if(!(node&&selector))return false;if(!selector||selector===node)return true;if(typeof selector!='string')return false;local.setDocument(node);return local.matchNode(node,selector);};Slick.defineAttributeGetter=function(name,fn){local.attributeGetters[name]=fn;return this;};Slick.lookupAttributeGetter=function(name){return local.attributeGetters[name];};Slick.definePseudo=function(name,fn){local['pseudo:'+name]=function(node,argument){return fn.call(node,argument);};return this;};Slick.lookupPseudo=function(name){var pseudo=local['pseudo:'+name];if(pseudo)return function(argument){return pseudo.call(this,argument);};return null;};Slick.override=function(regexp,fn){local.override(regexp,fn);return this;};Slick.isXML=local.isXML;Slick.uidOf=function(node){return local.getUIDHTML(node);};if(!this.Slick)this.Slick=Slick;}).apply((typeof exports!='undefined')?exports:this);var Element=function(tag,props){var konstructor=Element.Constructors[tag];if(konstructor)return konstructor(props);if(typeof tag!='string')return document.id(tag).set(props);if(!props)props={};if(!tag.test(/^[\w-]+$/)){var parsed=Slick.parse(tag).expressions[0][0];tag=(parsed.tag=='*')?'div':parsed.tag;if(parsed.id&&props.id==null)props.id=parsed.id;var attributes=parsed.attributes;if(attributes)for(var i=0,l=attributes.length;i<l;i++){var attr=attributes[i];if(attr.value!=null&&attr.operator=='='&&props[attr.key]==null)
props[attr.key]=attr.value;}
if(parsed.classList&&props['class']==null)props['class']=parsed.classList.join(' ');}
return document.newElement(tag,props);};if(Browser.Element)Element.prototype=Browser.Element.prototype;new Type('Element',Element).mirror(function(name){if(Array.prototype[name])return;var obj={};obj[name]=function(){var results=[],args=arguments,elements=true;for(var i=0,l=this.length;i<l;i++){var element=this[i],result=results[i]=element[name].apply(element,args);elements=(elements&&typeOf(result)=='element');}
return(elements)?new Elements(results):results;};Elements.implement(obj);});if(!Browser.Element){Element.parent=Object;Element.Prototype={'$family':Function.from('element').hide()};Element.mirror(function(name,method){Element.Prototype[name]=method;});}
Element.Constructors={};Element.Constructors=new Hash;var IFrame=new Type('IFrame',function(){var params=Array.link(arguments,{properties:Type.isObject,iframe:function(obj){return(obj!=null);}});var props=params.properties||{},iframe;if(params.iframe)iframe=document.id(params.iframe);var onload=props.onload||function(){};delete props.onload;props.id=props.name=[props.id,props.name,iframe?(iframe.id||iframe.name):'IFrame_'+String.uniqueID()].pick();iframe=new Element(iframe||'iframe',props);var onLoad=function(){onload.call(iframe.contentWindow);};if(window.frames[props.id])onLoad();else iframe.addListener('load',onLoad);return iframe;});var Elements=this.Elements=function(nodes){if(nodes&&nodes.length){var uniques={},node;for(var i=0;node=nodes[i++];){var uid=Slick.uidOf(node);if(!uniques[uid]){uniques[uid]=true;this.push(node);}}}};Elements.prototype={length:0};Elements.parent=Array;new Type('Elements',Elements).implement({filter:function(filter,bind){if(!filter)return this;return new Elements(Array.filter(this,(typeOf(filter)=='string')?function(item){return item.match(filter);}:filter,bind));}.protect(),push:function(){var length=this.length;for(var i=0,l=arguments.length;i<l;i++){var item=document.id(arguments[i]);if(item)this[length++]=item;}
return(this.length=length);}.protect(),concat:function(){var newElements=new Elements(this);for(var i=0,l=arguments.length;i<l;i++){var item=arguments[i];if(Type.isEnumerable(item))newElements.append(item);else newElements.push(item);}
return newElements;}.protect(),append:function(collection){for(var i=0,l=collection.length;i<l;i++)this.push(collection[i]);return this;}.protect(),empty:function(){while(this.length)delete this[--this.length];return this;}.protect()});(function(){var splice=Array.prototype.splice,object={'0':0,'1':1,length:2};splice.call(object,1,1);if(object[1]==1)Elements.implement('splice',function(){var length=this.length;splice.apply(this,arguments);while(length>=this.length)delete this[length--];return this;}.protect());Elements.implement(Array.prototype);Array.mirror(Elements);var createElementAcceptsHTML;try{var x=document.createElement('<input name=x>');createElementAcceptsHTML=(x.name=='x');}catch(e){}
var escapeQuotes=function(html){return(''+html).replace(/&/g,'&amp;').replace(/"/g,'&quot;');};Document.implement({newElement:function(tag,props){if(props&&props.checked!=null)props.defaultChecked=props.checked;if(createElementAcceptsHTML&&props){tag='<'+tag;if(props.name)tag+=' name="'+escapeQuotes(props.name)+'"';if(props.type)tag+=' type="'+escapeQuotes(props.type)+'"';tag+='>';delete props.name;delete props.type;}
return this.id(this.createElement(tag)).set(props);}});})();Document.implement({newTextNode:function(text){return this.createTextNode(text);},getDocument:function(){return this;},getWindow:function(){return this.window;},id:(function(){var types={string:function(id,nocash,doc){id=Slick.find(doc,'#'+id.replace(/(\W)/g,'\\$1'));return(id)?types.element(id,nocash):null;},element:function(el,nocash){$uid(el);if(!nocash&&!el.$family&&!(/^object|embed$/i).test(el.tagName)){Object.append(el,Element.Prototype);}
return el;},object:function(obj,nocash,doc){if(obj.toElement)return types.element(obj.toElement(doc),nocash);return null;}};types.textnode=types.whitespace=types.window=types.document=function(zero){return zero;};return function(el,nocash,doc){if(el&&el.$family&&el.uid)return el;var type=typeOf(el);return(types[type])?types[type](el,nocash,doc||document):null;};})()});if(window.$==null)Window.implement('$',function(el,nc){return document.id(el,nc,this.document);});Window.implement({getDocument:function(){return this.document;},getWindow:function(){return this;}});[Document,Element].invoke('implement',{getElements:function(expression){return Slick.search(this,expression,new Elements);},getElement:function(expression){return document.id(Slick.find(this,expression));}});(function(search,find,match){this.Selectors={};var pseudos=this.Selectors.Pseudo=new Hash();var addSlickPseudos=function(){for(var name in pseudos)if(pseudos.hasOwnProperty(name)){Slick.definePseudo(name,pseudos[name]);delete pseudos[name];}};Slick.search=function(context,expression,append){addSlickPseudos();return search.call(this,context,expression,append);};Slick.find=function(context,expression){addSlickPseudos();return find.call(this,context,expression);};Slick.match=function(node,selector){addSlickPseudos();return match.call(this,node,selector);};})(Slick.search,Slick.find,Slick.match);if(window.$$==null)Window.implement('$$',function(selector){var elements=new Elements;if(arguments.length==1&&typeof selector=='string')return Slick.search(this.document,selector,elements);var args=Array.flatten(arguments);for(var i=0,l=args.length;i<l;i++){var item=args[i];switch(typeOf(item)){case'element':elements.push(item);break;case'string':Slick.search(this.document,item,elements);}}
return elements;});if(window.$$==null)Window.implement('$$',function(selector){if(arguments.length==1){if(typeof selector=='string')return Slick.search(this.document,selector,new Elements);else if(Type.isEnumerable(selector))return new Elements(selector);}
return new Elements(arguments);});(function(){var collected={},storage={};var props={input:'checked',option:'selected',textarea:'value'};var get=function(uid){return(storage[uid]||(storage[uid]={}));};var clean=function(item){if(item.removeEvents)item.removeEvents();if(item.clearAttributes)item.clearAttributes();var uid=item.uid;if(uid!=null){delete collected[uid];delete storage[uid];}
return item;};var camels=['defaultValue','accessKey','cellPadding','cellSpacing','colSpan','frameBorder','maxLength','readOnly','rowSpan','tabIndex','useMap'];var bools=['compact','nowrap','ismap','declare','noshade','checked','disabled','readOnly','multiple','selected','noresize','defer'];var attributes={'html':'innerHTML','class':'className','for':'htmlFor','text':(function(){var temp=document.createElement('div');return(temp.innerText==null)?'textContent':'innerText';})()};var readOnly=['type'];var expandos=['value','defaultValue'];var uriAttrs=/^(?:href|src|usemap)$/i;bools=bools.associate(bools);camels=camels.associate(camels.map(String.toLowerCase));readOnly=readOnly.associate(readOnly);Object.append(attributes,expandos.associate(expandos));var inserters={before:function(context,element){var parent=element.parentNode;if(parent)parent.insertBefore(context,element);},after:function(context,element){var parent=element.parentNode;if(parent)parent.insertBefore(context,element.nextSibling);},bottom:function(context,element){element.appendChild(context);},top:function(context,element){element.insertBefore(context,element.firstChild);}};inserters.inside=inserters.bottom;Object.each(inserters,function(inserter,where){where=where.capitalize();var methods={};methods['inject'+where]=function(el){inserter(this,document.id(el,true));return this;};methods['grab'+where]=function(el){inserter(document.id(el,true),this);return this;};Element.implement(methods);});var injectCombinator=function(expression,combinator){if(!expression)return combinator;expression=Slick.parse(expression);var expressions=expression.expressions;for(var i=expressions.length;i--;)
expressions[i][0].combinator=combinator;return expression;};Element.implement({set:function(prop,value){var property=Element.Properties[prop];(property&&property.set)?property.set.call(this,value):this.setProperty(prop,value);}.overloadSetter(),get:function(prop){var property=Element.Properties[prop];return(property&&property.get)?property.get.apply(this):this.getProperty(prop);}.overloadGetter(),erase:function(prop){var property=Element.Properties[prop];(property&&property.erase)?property.erase.apply(this):this.removeProperty(prop);return this;},setProperty:function(attribute,value){attribute=camels[attribute]||attribute;if(value==null)return this.removeProperty(attribute);var key=attributes[attribute];(key)?this[key]=value:(bools[attribute])?this[attribute]=!!value:this.setAttribute(attribute,''+value);return this;},setProperties:function(attributes){for(var attribute in attributes)this.setProperty(attribute,attributes[attribute]);return this;},getProperty:function(attribute){attribute=camels[attribute]||attribute;var key=attributes[attribute]||readOnly[attribute];return(key)?this[key]:(bools[attribute])?!!this[attribute]:(uriAttrs.test(attribute)?this.getAttribute(attribute,2):(key=this.getAttributeNode(attribute))?key.nodeValue:null)||null;},getProperties:function(){var args=Array.from(arguments);return args.map(this.getProperty,this).associate(args);},removeProperty:function(attribute){attribute=camels[attribute]||attribute;var key=attributes[attribute];(key)?this[key]='':(bools[attribute])?this[attribute]=false:this.removeAttribute(attribute);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},hasClass:function(className){return this.className.clean().contains(className,' ');},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className).clean();return this;},removeClass:function(className){this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1');return this;},toggleClass:function(className,force){if(force==null)force=!this.hasClass(className);return(force)?this.addClass(className):this.removeClass(className);},adopt:function(){var parent=this,fragment,elements=Array.flatten(arguments),length=elements.length;if(length>1)parent=fragment=document.createDocumentFragment();for(var i=0;i<length;i++){var element=document.id(elements[i],true);if(element)parent.appendChild(element);}
if(fragment)this.appendChild(fragment);return this;},appendText:function(text,where){return this.grab(this.getDocument().newTextNode(text),where);},grab:function(el,where){inserters[where||'bottom'](document.id(el,true),this);return this;},inject:function(el,where){inserters[where||'bottom'](this,document.id(el,true));return this;},replaces:function(el){el=document.id(el,true);el.parentNode.replaceChild(this,el);return this;},wraps:function(el,where){el=document.id(el,true);return this.replaces(el).grab(el,where);},getPrevious:function(expression){return document.id(Slick.find(this,injectCombinator(expression,'!~')));},getAllPrevious:function(expression){return Slick.search(this,injectCombinator(expression,'!~'),new Elements);},getNext:function(expression){return document.id(Slick.find(this,injectCombinator(expression,'~')));},getAllNext:function(expression){return Slick.search(this,injectCombinator(expression,'~'),new Elements);},getFirst:function(expression){return document.id(Slick.search(this,injectCombinator(expression,'>'))[0]);},getLast:function(expression){return document.id(Slick.search(this,injectCombinator(expression,'>')).getLast());},getParent:function(expression){return document.id(Slick.find(this,injectCombinator(expression,'!')));},getParents:function(expression){return Slick.search(this,injectCombinator(expression,'!'),new Elements);},getSiblings:function(expression){return Slick.search(this,injectCombinator(expression,'~~'),new Elements);},getChildren:function(expression){return Slick.search(this,injectCombinator(expression,'>'),new Elements);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(id){return document.id(Slick.find(this,'#'+(''+id).replace(/(\W)/g,'\\$1')));},getSelected:function(){this.selectedIndex;return new Elements(Array.from(this.options).filter(function(option){return option.selected;}));},toQueryString:function(){var queryString=[];this.getElements('input, select, textarea').each(function(el){var type=el.type;if(!el.name||el.disabled||type=='submit'||type=='reset'||type=='file'||type=='image')return;var value=(el.get('tag')=='select')?el.getSelected().map(function(opt){return document.id(opt).get('value');}):((type=='radio'||type=='checkbox')&&!el.checked)?null:el.get('value');Array.from(value).each(function(val){if(typeof val!='undefined')queryString.push(encodeURIComponent(el.name)+'='+encodeURIComponent(val));});});return queryString.join('&');},clone:function(contents,keepid){contents=contents!==false;var clone=this.cloneNode(contents);var clean=function(node,element){if(!keepid)node.removeAttribute('id');if(Browser.ie){node.clearAttributes();node.mergeAttributes(element);node.removeAttribute('uid');if(node.options){var no=node.options,eo=element.options;for(var j=no.length;j--;)no[j].selected=eo[j].selected;}}
var prop=props[element.tagName.toLowerCase()];if(prop&&element[prop])node[prop]=element[prop];};var i;if(contents){var ce=clone.getElementsByTagName('*'),te=this.getElementsByTagName('*');for(i=ce.length;i--;)clean(ce[i],te[i]);}
clean(clone,this);if(Browser.ie){var ts=this.getElementsByTagName('object'),cs=clone.getElementsByTagName('object'),tl=ts.length,cl=cs.length;for(i=0;i<tl&&i<cl;i++)
cs[i].outerHTML=ts[i].outerHTML;}
return document.id(clone);},destroy:function(){var children=clean(this).getElementsByTagName('*');Array.each(children,clean);Element.dispose(this);return null;},empty:function(){Array.from(this.childNodes).each(Element.dispose);return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},match:function(expression){return!expression||Slick.match(this,expression);}});var contains={contains:function(element){return Slick.contains(this,element);}};if(!document.contains)Document.implement(contains);if(!document.createElement('div').contains)Element.implement(contains);Element.implement('hasChild',function(element){return this!==element&&this.contains(element);});[Element,Window,Document].invoke('implement',{addListener:function(type,fn){if(type=='unload'){var old=fn,self=this;fn=function(){self.removeListener('unload',fn);old();};}else{collected[this.uid]=this;}
if(this.addEventListener)this.addEventListener(type,fn,false);else this.attachEvent('on'+type,fn);return this;},removeListener:function(type,fn){if(this.removeEventListener)this.removeEventListener(type,fn,false);else this.detachEvent('on'+type,fn);return this;},retrieve:function(property,dflt){var storage=get(this.uid),prop=storage[property];if(dflt!=null&&prop==null)prop=storage[property]=dflt;return prop!=null?prop:null;},store:function(property,value){var storage=get(this.uid);storage[property]=value;return this;},eliminate:function(property){var storage=get(this.uid);delete storage[property];return this;}});if(window.attachEvent&&!window.addEventListener)window.addListener('unload',function(){Object.each(collected,clean);if(window.CollectGarbage)CollectGarbage();});})();Element.Properties={};Element.Properties=new Hash;Element.Properties.style={set:function(style){this.style.cssText=style;},get:function(){return this.style.cssText;},erase:function(){this.style.cssText='';}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};(function(maxLength){if(maxLength!=null)Element.Properties.maxlength=Element.Properties.maxLength={get:function(){var maxlength=this.getAttribute('maxLength');return maxlength==maxLength?null:maxlength;}};})(document.createElement('input').getAttribute('maxLength'));Element.Properties.html=(function(){var tableTest=Function.attempt(function(){var table=document.createElement('table');table.innerHTML='<tr><td></td></tr>';});var wrapper=document.createElement('div');var translations={table:[1,'<table>','</table>'],select:[1,'<select>','</select>'],tbody:[2,'<table><tbody>','</tbody></table>'],tr:[3,'<table><tbody><tr>','</tr></tbody></table>']};translations.thead=translations.tfoot=translations.tbody;var html={set:function(){var html=Array.flatten(arguments).join('');var wrap=(!tableTest&&translations[this.get('tag')]);if(wrap){var first=wrapper;first.innerHTML=wrap[1]+html+wrap[2];for(var i=wrap[0];i--;)first=first.firstChild;this.empty().adopt(first.childNodes);}else{this.innerHTML=html;}}};html.erase=html.set;return html;})();(function(){var html=document.html;Element.Properties.styles={set:function(styles){this.setStyles(styles);}};var hasOpacity=(html.style.opacity!=null);var reAlpha=/alpha\(opacity=([\d.]+)\)/i;var setOpacity=function(element,opacity){if(!element.currentStyle||!element.currentStyle.hasLayout)element.style.zoom=1;if(hasOpacity){element.style.opacity=opacity;}else{opacity=(opacity==1)?'':'alpha(opacity='+opacity*100+')';var filter=element.style.filter||element.getComputedStyle('filter')||'';element.style.filter=filter.test(reAlpha)?filter.replace(reAlpha,opacity):filter+opacity;}};Element.Properties.opacity={set:function(opacity){var visibility=this.style.visibility;if(opacity==0&&visibility!='hidden')this.style.visibility='hidden';else if(opacity!=0&&visibility!='visible')this.style.visibility='visible';setOpacity(this,opacity);},get:(hasOpacity)?function(){var opacity=this.style.opacity||this.getComputedStyle('opacity');return(opacity=='')?1:opacity;}:function(){var opacity,filter=(this.style.filter||this.getComputedStyle('filter'));if(filter)opacity=filter.match(reAlpha);return(opacity==null||filter==null)?1:(opacity[1]/100);}};var floatName=(html.style.cssFloat==null)?'styleFloat':'cssFloat';Element.implement({getComputedStyle:function(property){if(this.currentStyle)return this.currentStyle[property.camelCase()];var defaultView=Element.getDocument(this).defaultView,computed=defaultView?defaultView.getComputedStyle(this,null):null;return(computed)?computed.getPropertyValue((property==floatName)?'float':property.hyphenate()):null;},setOpacity:function(value){setOpacity(this,value);return this;},getOpacity:function(){return this.get('opacity');},setStyle:function(property,value){switch(property){case'opacity':return this.set('opacity',parseFloat(value));case'float':property=floatName;}
property=property.camelCase();if(typeOf(value)!='string'){var map=(Element.Styles[property]||'@').split(' ');value=Array.from(value).map(function(val,i){if(!map[i])return'';return(typeOf(val)=='number')?map[i].replace('@',Math.round(val)):val;}).join(' ');}else if(value==String(Number(value))){value=Math.round(value);}
this.style[property]=value;return this;},getStyle:function(property){switch(property){case'opacity':return this.get('opacity');case'float':property=floatName;}
property=property.camelCase();var result=this.style[property];if(!result||property=='zIndex'){result=[];for(var style in Element.ShortStyles){if(property!=style)continue;for(var s in Element.ShortStyles[style])result.push(this.getStyle(s));return result.join(' ');}
result=this.getComputedStyle(property);}
if(result){result=String(result);var color=result.match(/rgba?\([\d\s,]+\)/);if(color)result=result.replace(color[0],color[0].rgbToHex());}
if(Browser.opera||(Browser.ie&&isNaN(parseFloat(result)))){if(property.test(/^(height|width)$/)){var values=(property=='width')?['left','right']:['top','bottom'],size=0;values.each(function(value){size+=this.getStyle('border-'+value+'-width').toInt()+this.getStyle('padding-'+value).toInt();},this);return this['offset'+property.capitalize()]-size+'px';}
if(Browser.opera&&String(result).indexOf('px')!=-1)return result;if(property.test(/(border(.+)Width|margin|padding)/))return'0px';}
return result;},setStyles:function(styles){for(var style in styles)this.setStyle(style,styles[style]);return this;},getStyles:function(){var result={};Array.flatten(arguments).each(function(key){result[key]=this.getStyle(key);},this);return result;}});Element.Styles={left:'@px',top:'@px',bottom:'@px',right:'@px',width:'@px',height:'@px',maxWidth:'@px',maxHeight:'@px',minWidth:'@px',minHeight:'@px',backgroundColor:'rgb(@, @, @)',backgroundPosition:'@px @px',color:'rgb(@, @, @)',fontSize:'@px',letterSpacing:'@px',lineHeight:'@px',clip:'rect(@px @px @px @px)',margin:'@px @px @px @px',padding:'@px @px @px @px',border:'@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)',borderWidth:'@px @px @px @px',borderStyle:'@ @ @ @',borderColor:'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)',zIndex:'@','zoom':'@',fontWeight:'@',textIndent:'@px',opacity:'@'};Element.Styles=new Hash(Element.Styles);Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};['Top','Right','Bottom','Left'].each(function(direction){var Short=Element.ShortStyles;var All=Element.Styles;['margin','padding'].each(function(style){var sd=style+direction;Short[style][sd]=All[sd]='@px';});var bd='border'+direction;Short.border[bd]=All[bd]='@px @ rgb(@, @, @)';var bdw=bd+'Width',bds=bd+'Style',bdc=bd+'Color';Short[bd]={};Short.borderWidth[bdw]=Short[bd][bdw]=All[bdw]='@px';Short.borderStyle[bds]=Short[bd][bds]=All[bds]='@';Short.borderColor[bdc]=Short[bd][bdc]=All[bdc]='rgb(@, @, @)';});})();(function(){Element.Properties.events={set:function(events){this.addEvents(events);}};[Element,Window,Document].invoke('implement',{addEvent:function(type,fn){var events=this.retrieve('events',{});if(!events[type])events[type]={keys:[],values:[]};if(events[type].keys.contains(fn))return this;events[type].keys.push(fn);var realType=type,custom=Element.Events[type],condition=fn,self=this;if(custom){if(custom.onAdd)custom.onAdd.call(this,fn);if(custom.condition){condition=function(event){if(custom.condition.call(this,event))return fn.call(this,event);return true;};}
realType=custom.base||realType;}
var defn=function(){return fn.call(self);};var nativeEvent=Element.NativeEvents[realType];if(nativeEvent){if(nativeEvent==2){defn=function(event){event=new Event(event,self.getWindow());if(condition.call(self,event)===false)event.stop();};}
this.addListener(realType,defn);}
events[type].values.push(defn);return this;},removeEvent:function(type,fn){var events=this.retrieve('events');if(!events||!events[type])return this;var list=events[type];var index=list.keys.indexOf(fn);if(index==-1)return this;var value=list.values[index];delete list.keys[index];delete list.values[index];var custom=Element.Events[type];if(custom){if(custom.onRemove)custom.onRemove.call(this,fn);type=custom.base||type;}
return(Element.NativeEvents[type])?this.removeListener(type,value):this;},addEvents:function(events){for(var event in events)this.addEvent(event,events[event]);return this;},removeEvents:function(events){var type;if(typeOf(events)=='object'){for(type in events)this.removeEvent(type,events[type]);return this;}
var attached=this.retrieve('events');if(!attached)return this;if(!events){for(type in attached)this.removeEvents(type);this.eliminate('events');}else if(attached[events]){attached[events].keys.each(function(fn){this.removeEvent(events,fn);},this);delete attached[events];}
return this;},fireEvent:function(type,args,delay){var events=this.retrieve('events');if(!events||!events[type])return this;args=Array.from(args);events[type].keys.each(function(fn){if(delay)fn.delay(delay,this,args);else fn.apply(this,args);},this);return this;},cloneEvents:function(from,type){from=document.id(from);var events=from.retrieve('events');if(!events)return this;if(!type){for(var eventType in events)this.cloneEvents(from,eventType);}else if(events[type]){events[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}});try{if(typeof HTMLElement!='undefined')
HTMLElement.prototype.fireEvent=Element.prototype.fireEvent;}catch(e){}
Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};var check=function(event){var related=event.relatedTarget;if(related==null)return true;if(!related)return false;return(related!=this&&related.prefix!='xul'&&typeOf(this)!='document'&&!this.contains(related));};Element.Events={mouseenter:{base:'mouseover',condition:check},mouseleave:{base:'mouseout',condition:check},mousewheel:{base:(Browser.firefox)?'DOMMouseScroll':'mousewheel'}};Element.Events=new Hash(Element.Events);})();(function(){Element.implement({scrollTo:function(x,y){if(isBody(this)){this.getWindow().scrollTo(x,y);}else{this.scrollLeft=x;this.scrollTop=y;}
return this;},getSize:function(){if(isBody(this))return this.getWindow().getSize();return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(isBody(this))return this.getWindow().getScrollSize();return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(isBody(this))return this.getWindow().getScroll();return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var element=this.parentNode,position={x:0,y:0};while(element&&!isBody(element)){position.x+=element.scrollLeft;position.y+=element.scrollTop;element=element.parentNode;}
return position;},getOffsetParent:function(){var element=this;if(isBody(element))return null;if(!Browser.ie)return element.offsetParent;while((element=element.parentNode)){if(styleString(element,'position')!='static'||isBody(element))return element;}
return null;},getOffsets:function(){if(this.getBoundingClientRect&&!Browser.Platform.ios){var bound=this.getBoundingClientRect(),html=document.id(this.getDocument().documentElement),htmlScroll=html.getScroll(),elemScrolls=this.getScrolls(),isFixed=(styleString(this,'position')=='fixed');return{x:bound.left.toInt()+elemScrolls.x+((isFixed)?0:htmlScroll.x)-html.clientLeft,y:bound.top.toInt()+elemScrolls.y+((isFixed)?0:htmlScroll.y)-html.clientTop};}
var element=this,position={x:0,y:0};if(isBody(this))return position;while(element&&!isBody(element)){position.x+=element.offsetLeft;position.y+=element.offsetTop;if(Browser.firefox){if(!borderBox(element)){position.x+=leftBorder(element);position.y+=topBorder(element);}
var parent=element.parentNode;if(parent&&styleString(parent,'overflow')!='visible'){position.x+=leftBorder(parent);position.y+=topBorder(parent);}}else if(element!=this&&Browser.safari){position.x+=leftBorder(element);position.y+=topBorder(element);}
element=element.offsetParent;}
if(Browser.firefox&&!borderBox(this)){position.x-=leftBorder(this);position.y-=topBorder(this);}
return position;},getPosition:function(relative){if(isBody(this))return{x:0,y:0};var offset=this.getOffsets(),scroll=this.getScrolls();var position={x:offset.x-scroll.x,y:offset.y-scroll.y};if(relative&&(relative=document.id(relative))){var relativePosition=relative.getPosition();return{x:position.x-relativePosition.x-leftBorder(relative),y:position.y-relativePosition.y-topBorder(relative)};}
return position;},getCoordinates:function(element){if(isBody(this))return this.getWindow().getCoordinates();var position=this.getPosition(element),size=this.getSize();var obj={left:position.x,top:position.y,width:size.x,height:size.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;},computePosition:function(obj){return{left:obj.x-styleNumber(this,'margin-left'),top:obj.y-styleNumber(this,'margin-top')};},setPosition:function(obj){return this.setStyles(this.computePosition(obj));}});[Document,Window].invoke('implement',{getSize:function(){var doc=getCompatElement(this);return{x:doc.clientWidth,y:doc.clientHeight};},getScroll:function(){var win=this.getWindow(),doc=getCompatElement(this);return{x:win.pageXOffset||doc.scrollLeft,y:win.pageYOffset||doc.scrollTop};},getScrollSize:function(){var doc=getCompatElement(this),min=this.getSize(),body=this.getDocument().body;return{x:Math.max(doc.scrollWidth,body.scrollWidth,min.x),y:Math.max(doc.scrollHeight,body.scrollHeight,min.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var size=this.getSize();return{top:0,left:0,bottom:size.y,right:size.x,height:size.y,width:size.x};}});var styleString=Element.getComputedStyle;function styleNumber(element,style){return styleString(element,style).toInt()||0;};function borderBox(element){return styleString(element,'-moz-box-sizing')=='border-box';};function topBorder(element){return styleNumber(element,'border-top-width');};function leftBorder(element){return styleNumber(element,'border-left-width');};function isBody(element){return(/^(?:body|html)$/i).test(element.tagName);};function getCompatElement(element){var doc=element.getDocument();return(!doc.compatMode||doc.compatMode=='CSS1Compat')?doc.html:doc.body;};})();Element.alias({position:'setPosition'});[Window,Document,Element].invoke('implement',{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});(function(){var Fx=this.Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:'ignore'},initialize:function(options){this.subject=this.subject||this;this.setOptions(options);},getTransition:function(){return function(p){return-(Math.cos(Math.PI*p)-1)/2;};},step:function(){var time=Date.now();if(time<this.time+this.options.duration){var delta=this.transition((time-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,delta));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(now){return now;},compute:function(from,to,delta){return Fx.compute(from,to,delta);},check:function(){if(!this.timer)return true;switch(this.options.link){case'cancel':this.cancel();return true;case'chain':this.chain(this.caller.pass(arguments,this));return false;}
return false;},start:function(from,to){if(!this.check(from,to))return this;var duration=this.options.duration;this.options.duration=Fx.Durations[duration]||duration.toInt();this.from=from;this.to=to;this.time=0;this.transition=this.getTransition();this.startTimer();this.onStart();return this;},complete:function(){if(this.stopTimer())this.onComplete();return this;},cancel:function(){if(this.stopTimer())this.onCancel();return this;},onStart:function(){this.fireEvent('start',this.subject);},onComplete:function(){this.fireEvent('complete',this.subject);if(!this.callChain())this.fireEvent('chainComplete',this.subject);},onCancel:function(){this.fireEvent('cancel',this.subject).clearChain();},pause:function(){this.stopTimer();return this;},resume:function(){this.startTimer();return this;},stopTimer:function(){if(!this.timer)return false;this.time=Date.now()-this.time;this.timer=removeInstance(this);return true;},startTimer:function(){if(this.timer)return false;this.time=Date.now()-this.time;this.timer=addInstance(this);return true;}});Fx.compute=function(from,to,delta){return(to-from)*delta+from;};Fx.Durations={'short':250,'normal':500,'long':1000};var instances={},timers={};var loop=function(){for(var i=this.length;i--;){if(this[i])this[i].step();}};var addInstance=function(instance){var fps=instance.options.fps,list=instances[fps]||(instances[fps]=[]);list.push(instance);if(!timers[fps])timers[fps]=loop.periodical(Math.round(1000/fps),list);return true;};var removeInstance=function(instance){var fps=instance.options.fps,list=instances[fps]||[];list.erase(instance);if(!list.length&&timers[fps])timers[fps]=clearInterval(timers[fps]);return false;};})();Fx.CSS=new Class({Extends:Fx,prepare:function(element,property,values){values=Array.from(values);if(values[1]==null){values[1]=values[0];values[0]=element.getStyle(property);}
var parsed=values.map(this.parse);return{from:parsed[0],to:parsed[1]};},parse:function(value){value=Function.from(value)();value=(typeof value=='string')?value.split(' '):Array.from(value);return value.map(function(val){val=String(val);var found=false;Object.each(Fx.CSS.Parsers,function(parser,key){if(found)return;var parsed=parser.parse(val);if(parsed||parsed===0)found={value:parsed,parser:parser};});found=found||{value:val,parser:Fx.CSS.Parsers.String};return found;});},compute:function(from,to,delta){var computed=[];(Math.min(from.length,to.length)).times(function(i){computed.push({value:from[i].parser.compute(from[i].value,to[i].value,delta),parser:from[i].parser});});computed.$family=Function.from('fx:css:value');return computed;},serve:function(value,unit){if(typeOf(value)!='fx:css:value')value=this.parse(value);var returned=[];value.each(function(bit){returned=returned.concat(bit.parser.serve(bit.value,unit));});return returned;},render:function(element,property,value,unit){element.setStyle(property,this.serve(value,unit));},search:function(selector){if(Fx.CSS.Cache[selector])return Fx.CSS.Cache[selector];var to={};Array.each(document.styleSheets,function(sheet,j){var href=sheet.href;if(href&&href.contains('://')&&!href.contains(document.domain))return;var rules=sheet.rules||sheet.cssRules;Array.each(rules,function(rule,i){if(!rule.style)return;var selectorText=(rule.selectorText)?rule.selectorText.replace(/^\w+/,function(m){return m.toLowerCase();}):null;if(!selectorText||!selectorText.test('^'+selector+'$'))return;Element.Styles.each(function(value,style){if(!rule.style[style]||Element.ShortStyles[style])return;value=String(rule.style[style]);to[style]=(value.test(/^rgb/))?value.rgbToHex():value;});});});return Fx.CSS.Cache[selector]=to;}});Fx.CSS.Cache={};Fx.CSS.Parsers={Color:{parse:function(value){if(value.match(/^#[0-9a-f]{3,6}$/i))return value.hexToRgb(true);return((value=value.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[value[1],value[2],value[3]]:false;},compute:function(from,to,delta){return from.map(function(value,i){return Math.round(Fx.compute(from[i],to[i],delta));});},serve:function(value){return value.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(value,unit){return(unit)?value+unit:value;}},String:{parse:Function.from(false),compute:function(zero,one){return one;},serve:function(zero){return zero;}}};Fx.CSS.Parsers=new Hash(Fx.CSS.Parsers);Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(element,options){this.element=this.subject=document.id(element);this.parent(options);},set:function(property,now){if(arguments.length==1){now=property;property=this.property||this.options.property;}
this.render(this.element,property,now,this.options.unit);return this;},start:function(property,from,to){if(!this.check(property,from,to))return this;var args=Array.flatten(arguments);this.property=this.options.property||args.shift();var parsed=this.prepare(this.element,this.property,args);return this.parent(parsed.from,parsed.to);}});Element.Properties.tween={set:function(options){this.get('tween').cancel().setOptions(options);return this;},get:function(){var tween=this.retrieve('tween');if(!tween){tween=new Fx.Tween(this,{link:'cancel'});this.store('tween',tween);}
return tween;}};Element.implement({tween:function(property,from,to){this.get('tween').start(arguments);return this;},fade:function(how){var fade=this.get('tween'),o='opacity',toggle;how=[how,'toggle'].pick();switch(how){case'in':fade.start(o,1);break;case'out':fade.start(o,0);break;case'show':fade.set(o,1);break;case'hide':fade.set(o,0);break;case'toggle':var flag=this.retrieve('fade:flag',this.get('opacity')==1);fade.start(o,(flag)?0:1);this.store('fade:flag',!flag);toggle=true;break;default:fade.start(o,arguments);}
if(!toggle)this.eliminate('fade:flag');return this;},highlight:function(start,end){if(!end){end=this.retrieve('highlight:original',this.getStyle('background-color'));end=(end=='transparent')?'#fff':end;}
var tween=this.get('tween');tween.start('background-color',start||'#ffff88',end).chain(function(){this.setStyle('background-color',this.retrieve('highlight:original'));tween.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(element,options){this.element=this.subject=document.id(element);this.parent(options);},set:function(now){if(typeof now=='string')now=this.search(now);for(var p in now)this.render(this.element,p,now[p],this.options.unit);return this;},compute:function(from,to,delta){var now={};for(var p in from)now[p]=this.parent(from[p],to[p],delta);return now;},start:function(properties){if(!this.check(properties))return this;if(typeof properties=='string')properties=this.search(properties);var from={},to={};for(var p in properties){var parsed=this.prepare(this.element,p,properties[p]);from[p]=parsed.from;to[p]=parsed.to;}
return this.parent(from,to);}});Element.Properties.morph={set:function(options){this.get('morph').cancel().setOptions(options);return this;},get:function(){var morph=this.retrieve('morph');if(!morph){morph=new Fx.Morph(this,{link:'cancel'});this.store('morph',morph);}
return morph;}};Element.implement({morph:function(props){this.get('morph').start(props);return this;}});Fx.implement({getTransition:function(){var trans=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof trans=='string'){var data=trans.split(':');trans=Fx.Transitions;trans=trans[data[0]]||trans[data[0].capitalize()];if(data[1])trans=trans['ease'+data[1].capitalize()+(data[2]?data[2].capitalize():'')];}
return trans;}});Fx.Transition=function(transition,params){params=Array.from(params);return Object.append(transition,{easeIn:function(pos){return transition(pos,params);},easeOut:function(pos){return 1-transition(1-pos,params);},easeInOut:function(pos){return(pos<=0.5)?transition(2*pos,params)/2:(2-transition(2*(1-pos),params))/2;}});};Fx.Transitions={linear:function(zero){return zero;}};Fx.Transitions=new Hash(Fx.Transitions);Fx.Transitions.extend=function(transitions){for(var transition in transitions)Fx.Transitions[transition]=new Fx.Transition(transitions[transition]);};Fx.Transitions.extend({Pow:function(p,x){return Math.pow(p,x&&x[0]||6);},Expo:function(p){return Math.pow(2,8*(p-1));},Circ:function(p){return 1-Math.sin(Math.acos(p));},Sine:function(p){return 1-Math.sin((1-p)*Math.PI/2);},Back:function(p,x){x=x&&x[0]||1.618;return Math.pow(p,2)*((x+1)*p-x);},Bounce:function(p){var value;for(var a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){value=b*b-Math.pow((11-6*a-11*p)/4,2);break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x&&x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});});(function(){var progressSupport=('onprogress'in new Browser.Request);var Request=this.Request=new Class({Implements:[Chain,Events,Options],options:{url:'',data:'',headers:{'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript, text/html, application/xml, text/xml, */*'},async:true,format:false,method:'post',link:'ignore',isSuccess:null,emulation:true,urlEncoded:true,encoding:'utf-8',evalScripts:false,evalResponse:false,timeout:0,noCache:false},initialize:function(options){this.xhr=new Browser.Request();this.setOptions(options);this.headers=this.options.headers;},onStateChange:function(){var xhr=this.xhr;if(xhr.readyState!=4||!this.running)return;this.running=false;this.status=0;Function.attempt(function(){var status=xhr.status;this.status=(status==1223)?204:status;}.bind(this));xhr.onreadystatechange=function(){};clearTimeout(this.timer);this.response={text:this.xhr.responseText||'',xml:this.xhr.responseXML};if(this.options.isSuccess.call(this,this.status))
this.success(this.response.text,this.response.xml);else
this.failure();},isSuccess:function(){var status=this.status;return(status>=200&&status<300);},isRunning:function(){return!!this.running;},processScripts:function(text){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))return Browser.exec(text);return text.stripScripts(this.options.evalScripts);},success:function(text,xml){this.onSuccess(this.processScripts(text),xml);},onSuccess:function(){this.fireEvent('complete',arguments).fireEvent('success',arguments).callChain();},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent('complete').fireEvent('failure',this.xhr);},loadstart:function(event){this.fireEvent('loadstart',[event,this.xhr]);},progress:function(event){this.fireEvent('progress',[event,this.xhr]);},timeout:function(){this.fireEvent('timeout',this.xhr);},setHeader:function(name,value){this.headers[name]=value;return this;},getHeader:function(name){return Function.attempt(function(){return this.xhr.getResponseHeader(name);}.bind(this));},check:function(){if(!this.running)return true;switch(this.options.link){case'cancel':this.cancel();return true;case'chain':this.chain(this.caller.pass(arguments,this));return false;}
return false;},send:function(options){if(!this.check(options))return this;this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.running=true;var type=typeOf(options);if(type=='string'||type=='element')options={data:options};var old=this.options;options=Object.append({data:old.data,url:old.url,method:old.method},options);var data=options.data,url=String(options.url),method=options.method.toLowerCase();switch(typeOf(data)){case'element':data=document.id(data).toQueryString();break;case'object':case'hash':data=Object.toQueryString(data);}
if(this.options.format){var format='format='+this.options.format;data=(data)?format+'&'+data:format;}
if(this.options.emulation&&!['get','post'].contains(method)){var _method='_method='+method;data=(data)?_method+'&'+data:_method;method='post';}
if(this.options.urlEncoded&&['post','put'].contains(method)){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.headers['Content-type']='application/x-www-form-urlencoded'+encoding;}
if(!url)url=document.location.pathname;var trimPosition=url.lastIndexOf('/');if(trimPosition>-1&&(trimPosition=url.indexOf('#'))>-1)url=url.substr(0,trimPosition);if(this.options.noCache)
url+=(url.contains('?')?'&':'?')+String.uniqueID();if(data&&method=='get'){url+=(url.contains('?')?'&':'?')+data;data=null;}
var xhr=this.xhr;if(progressSupport){xhr.onloadstart=this.loadstart.bind(this);xhr.onprogress=this.progress.bind(this);}
xhr.open(method.toUpperCase(),url,this.options.async,this.options.user,this.options.password);if(this.options.user&&'withCredentials'in xhr)xhr.withCredentials=true;xhr.onreadystatechange=this.onStateChange.bind(this);Object.each(this.headers,function(value,key){try{xhr.setRequestHeader(key,value);}catch(e){this.fireEvent('exception',[key,value]);}},this);this.fireEvent('request');xhr.send(data);if(!this.options.async)this.onStateChange();if(this.options.timeout)this.timer=this.timeout.delay(this.options.timeout,this);return this;},cancel:function(){if(!this.running)return this;this.running=false;var xhr=this.xhr;xhr.abort();clearTimeout(this.timer);xhr.onreadystatechange=xhr.onprogress=xhr.onloadstart=function(){};this.xhr=new Browser.Request();this.fireEvent('cancel');return this;}});var methods={};['get','post','put','delete','GET','POST','PUT','DELETE'].each(function(method){methods[method]=function(data){return this.send({data:data,method:method});};});Request.implement(methods);Element.Properties.send={set:function(options){var send=this.get('send').cancel();send.setOptions(options);return this;},get:function(){var send=this.retrieve('send');if(!send){send=new Request({data:this,link:'cancel',method:this.get('method')||'post',url:this.get('action')});this.store('send',send);}
return send;}};Element.implement({send:function(url){var sender=this.get('send');sender.send({data:this,url:url||sender.options.url});return this;}});})();Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false,headers:{Accept:'text/html, application/xml, text/xml, */*'}},success:function(text){var options=this.options,response=this.response;response.html=text.stripScripts(function(script){response.javascript=script;});var match=response.html.match(/<body[^>]*>([\s\S]*?)<\/body>/i);if(match)response.html=match[1];var temp=new Element('div').set('html',response.html);response.tree=temp.childNodes;response.elements=temp.getElements('*');if(options.filter)response.tree=response.elements.filter(options.filter);if(options.update)document.id(options.update).empty().set('html',response.html);else if(options.append)document.id(options.append).adopt(temp.getChildren());if(options.evalScripts)Browser.exec(response.javascript);this.onSuccess(response.tree,response.elements,response.html,response.javascript);}});Element.Properties.load={set:function(options){var load=this.get('load').cancel();load.setOptions(options);return this;},get:function(){var load=this.retrieve('load');if(!load){load=new Request.HTML({data:this,link:'cancel',update:this,method:'get'});this.store('load',load);}
return load;}};Element.implement({load:function(){this.get('load').send(Array.link(arguments,{data:Type.isObject,url:Type.isString}));return this;}});if(!this.JSON)JSON={};JSON=new Hash({stringify:JSON.stringify,parse:JSON.parse});Object.append(JSON,{$specialChars:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},$replaceChars:function(chr){return JSON.$specialChars[chr]||'\\u00'+Math.floor(chr.charCodeAt()/16).toString(16)+(chr.charCodeAt()%16).toString(16);},encode:function(obj){switch(typeOf(obj)){case'string':return'"'+obj.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case'array':return'['+String(obj.map(JSON.encode).clean())+']';case'object':case'hash':var string=[];Object.each(obj,function(value,key){var json=JSON.encode(value);if(json)string.push(JSON.encode(key)+':'+json);});return'{'+string+'}';case'number':case'boolean':return String(obj);case'null':return'null';}
return null;},decode:function(string,secure){if(typeOf(string)!='string'||!string.length)return null;if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,'')))return null;return eval('('+string+')');}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(options){this.parent(options);Object.append(this.headers,{'Accept':'application/json','X-Request':'JSON','X-Requested-With':'XMLHttpRequest'});},success:function(text){var secure=this.options.secure;var json=this.response.json=Function.attempt(function(){return window.JSON.parse(text);});if(json==null){this.onFailure();}else{this.onSuccess(json,text);}}});var Cookie=new Class({Implements:Options,options:{path:'/',domain:false,duration:false,secure:false,document:document,encode:true},initialize:function(key,options){this.key=key;this.setOptions(options);},write:function(value){if(this.options.encode)value=encodeURIComponent(value);if(this.options.domain)value+='; domain='+this.options.domain;if(this.options.path)value+='; path='+this.options.path;if(this.options.duration){var date=new Date();date.setTime(date.getTime()+this.options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();}
if(this.options.secure)value+='; secure';this.options.document.cookie=this.key+'='+value;return this;},read:function(){var value=this.options.document.cookie.match('(?:^|;)\\s*'+this.key.escapeRegExp()+'=([^;]*)');return(value)?decodeURIComponent(value[1]):null;},dispose:function(){new Cookie(this.key,Object.merge({},this.options,{duration:-1})).write('');return this;}});Cookie.write=function(key,value,options){return new Cookie(key,options).write(value);};Cookie.read=function(key){return new Cookie(key).read();};Cookie.dispose=function(key,options){return new Cookie(key,options).dispose();};(function(window,document){var ready,loaded,checks=[],shouldPoll,timer,isFramed=true;try{isFramed=window.frameElement!=null;}catch(e){}
var domready=function(){clearTimeout(timer);if(ready)return;Browser.loaded=ready=true;document.removeListener('DOMContentLoaded',domready).removeListener('readystatechange',check);document.fireEvent('domready');window.fireEvent('domready');};var check=function(){for(var i=checks.length;i--;)if(checks[i]()){domready();return true;}
return false;};var poll=function(){clearTimeout(timer);if(!check())timer=setTimeout(poll,10);};document.addListener('DOMContentLoaded',domready);var testElement=document.createElement('div');if(testElement.doScroll&&!isFramed){checks.push(function(){try{testElement.doScroll();return true;}catch(e){}
return false;});shouldPoll=true;}
if(document.readyState)checks.push(function(){var state=document.readyState;return(state=='loaded'||state=='complete');});if('onreadystatechange'in document)document.addListener('readystatechange',check);else shouldPoll=true;if(shouldPoll)poll();Element.Events.domready={onAdd:function(fn){if(ready)fn.call(this);}};Element.Events.load={base:'load',onAdd:function(fn){if(loaded&&this==window)fn.call(this);},condition:function(){if(this==window){domready();delete Element.Events.load;}
return true;}};window.addEvent('load',function(){loaded=true;});})(window,document);(function(){var id=0;var Swiff=this.Swiff=new Class({Implements:Options,options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:'high',allowScriptAccess:'always',wMode:'window',swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;},initialize:function(path,options){this.instance='Swiff_'+id++;this.setOptions(options);options=this.options;var id=this.id=options.id||this.instance;var container=document.id(options.container);Swiff.CallBacks[this.instance]={};var params=options.params,vars=options.vars,callBacks=options.callBacks;var properties=Object.append({height:options.height,width:options.width},options.properties);var self=this;for(var callBack in callBacks){Swiff.CallBacks[this.instance][callBack]=(function(option){return function(){return option.apply(self.object,arguments);};})(callBacks[callBack]);vars[callBack]='Swiff.CallBacks.'+this.instance+'.'+callBack;}
params.flashVars=Object.toQueryString(vars);if(Browser.ie){properties.classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';params.movie=path;}else{properties.type='application/x-shockwave-flash';}
properties.data=path;var build='<object id="'+id+'"';for(var property in properties)build+=' '+property+'="'+properties[property]+'"';build+='>';for(var param in params){if(params[param])build+='<param name="'+param+'" value="'+params[param]+'" />';}
build+='</object>';this.object=((container)?container.empty():new Element('div')).set('html',build).firstChild;},replaces:function(element){element=document.id(element,true);element.parentNode.replaceChild(this.toElement(),element);return this;},inject:function(element){document.id(element,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+'</invoke>');return eval(rs);};})();
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORMOOMOO', bundleError);}


/* LIBCORMOOMOO */
try{
MooTools.More={'version':'1.2.3.1'};Class.Mutators.Binds=function(binds){return binds;};Class.Mutators.initialize=function(initialize){return function(){$splat(this.Binds).each(function(name){var original=this[name];if(original)this[name]=original.bind(this);},this);return initialize.apply(this,arguments);};};Element.implement({measure:function(fn){var vis=function(el){return!!(!el||el.offsetHeight||el.offsetWidth);};if(vis(this))return fn.apply(this);var parent=this.getParent(),toMeasure=[],restorers=[];while(!vis(parent)&&parent!=document.body){toMeasure.push(parent.expose());parent=parent.getParent();}
var restore=this.expose();var result=fn.apply(this);restore();toMeasure.each(function(restore){restore();});return result;},expose:function(){if(this.getStyle('display')!='none')return $empty;var before=this.style.cssText;this.setStyles({display:'block',position:'absolute',visibility:'hidden'});return function(){this.style.cssText=before;}.bind(this);},getDimensions:function(options){options=$merge({computeSize:false},options);var dim={};var getSize=function(el,options){return(options.computeSize)?el.getComputedSize(options):el.getSize();};if(this.getStyle('display')=='none'){dim=this.measure(function(){return getSize(this,options);});}else{try{dim=getSize(this,options);}catch(e){}}
return $chk(dim.x)?$extend(dim,{width:dim.x,height:dim.y}):$extend(dim,{x:dim.width,y:dim.height});},getComputedSize:function(options){options=$merge({styles:['padding','border'],plains:{height:['top','bottom'],width:['left','right']},mode:'both'},options);var size={width:0,height:0};switch(options.mode){case'vertical':delete size.width;delete options.plains.width;break;case'horizontal':delete size.height;delete options.plains.height;break;}
var getStyles=[];$each(options.plains,function(plain,key){plain.each(function(edge){options.styles.each(function(style){getStyles.push((style=='border')?style+'-'+edge+'-'+'width':style+'-'+edge);});});});var styles={};getStyles.each(function(style){styles[style]=this.getComputedStyle(style);},this);var subtracted=[];$each(options.plains,function(plain,key){var capitalized=key.capitalize();size['total'+capitalized]=0;size['computed'+capitalized]=0;plain.each(function(edge){size['computed'+edge.capitalize()]=0;getStyles.each(function(style,i){if(style.test(edge)){styles[style]=styles[style].toInt()||0;size['total'+capitalized]=size['total'+capitalized]+styles[style];size['computed'+edge.capitalize()]=size['computed'+edge.capitalize()]+styles[style];}
if(style.test(edge)&&key!=style&&(style.test('border')||style.test('padding'))&&!subtracted.contains(style)){subtracted.push(style);size['computed'+capitalized]=size['computed'+capitalized]-styles[style];}});});});['Width','Height'].each(function(value){var lower=value.toLowerCase();if(!$chk(size[lower]))return;size[lower]=size[lower]+this['offset'+value]+size['computed'+value];size['total'+value]=size[lower]+size['total'+value];delete size['computed'+value];},this);return $extend(styles,size);}});(function(){var original=Element.prototype.position;Element.implement({position:function(options){if(options&&($defined(options.x)||$defined(options.y)))return original?original.apply(this,arguments):this;$each(options||{},function(v,k){if(!$defined(v))delete options[k];});options=$merge({relativeTo:document.body,position:{x:'center',y:'center'},edge:false,offset:{x:0,y:0},returnPos:false,relFixedPosition:false,ignoreMargins:false,allowNegative:false},options);var parentOffset={x:0,y:0};var parentPositioned=false;var offsetParent=this.measure(function(){return document.id(this.getOffsetParent());});if(offsetParent&&offsetParent!=this.getDocument().body){parentOffset=offsetParent.measure(function(){return this.getPosition();});parentPositioned=true;options.offset.x=options.offset.x-parentOffset.x;options.offset.y=options.offset.y-parentOffset.y;}
var fixValue=function(option){if($type(option)!='string')return option;option=option.toLowerCase();var val={};if(option.test('left'))val.x='left';else if(option.test('right'))val.x='right';else val.x='center';if(option.test('upper')||option.test('top'))val.y='top';else if(option.test('bottom'))val.y='bottom';else val.y='center';return val;};options.edge=fixValue(options.edge);options.position=fixValue(options.position);if(!options.edge){if(options.position.x=='center'&&options.position.y=='center')options.edge={x:'center',y:'center'};else options.edge={x:'left',y:'top'};}
this.setStyle('position','absolute');var rel=document.id(options.relativeTo)||document.body;var calc=rel==document.body?window.getScroll():rel.getPosition();var top=calc.y;var left=calc.x;if(Browser.Engine.trident){var scrolls=rel.getScrolls();top+=scrolls.y;left+=scrolls.x;}
var dim=this.getDimensions({computeSize:true,styles:['padding','border','margin']});if(options.ignoreMargins){options.offset.x=options.offset.x-dim['margin-left'];options.offset.y=options.offset.y-dim['margin-top'];}
var pos={};var prefY=options.offset.y;var prefX=options.offset.x;var winSize=window.getSize();switch(options.position.x){case'left':pos.x=left+prefX;break;case'right':pos.x=left+prefX+rel.offsetWidth;break;default:pos.x=left+((rel==document.body?winSize.x:rel.offsetWidth)/2)+prefX;break;}
switch(options.position.y){case'top':pos.y=top+prefY;break;case'bottom':pos.y=top+prefY+rel.offsetHeight;break;default:pos.y=top+((rel==document.body?winSize.y:rel.offsetHeight)/2)+prefY;break;}
if(options.edge){var edgeOffset={};switch(options.edge.x){case'left':edgeOffset.x=0;break;case'right':edgeOffset.x=-dim.x-dim.computedRight-dim.computedLeft;break;default:edgeOffset.x=-(dim.x/2);break;}
switch(options.edge.y){case'top':edgeOffset.y=0;break;case'bottom':edgeOffset.y=-dim.y-dim.computedTop-dim.computedBottom;break;default:edgeOffset.y=-(dim.y/2);break;}
pos.x=pos.x+edgeOffset.x;pos.y=pos.y+edgeOffset.y;}
pos={left:((pos.x>=0||parentPositioned||options.allowNegative)?pos.x:0).toInt(),top:((pos.y>=0||parentPositioned||options.allowNegative)?pos.y:0).toInt()};if(rel.getStyle('position')=='fixed'||options.relFixedPosition){var winScroll=window.getScroll();pos.top=pos.top.toInt()+winScroll.y;pos.left=pos.left.toInt()+winScroll.x;}
if(options.returnPos)return pos;else this.setStyles(pos);return this;}});})();Element.implement({isDisplayed:function(){return this.getStyle('display')!='none';},toggle:function(){return this[this.isDisplayed()?'hide':'show']();},hide:function(){var d;try{if('none'!=this.getStyle('display'))d=this.getStyle('display');}catch(e){}
return this.store('originalDisplay',d||'block').setStyle('display','none');},show:function(display){return this.setStyle('display',display||this.retrieve('originalDisplay')||'block');},swapClass:function(remove,add){return this.removeClass(remove).addClass(add);}});Fx.Move=new Class({Extends:Fx.Morph,options:{relativeTo:document.body,position:'center',edge:false,offset:{x:0,y:0}},start:function(destination){return this.parent(this.element.position($merge(this.options,destination,{returnPos:true})));}});Element.Properties.move={set:function(options){var morph=this.retrieve('move');if(morph)morph.cancel();return this.eliminate('move').store('move:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('move')){if(options||!this.retrieve('move:options'))this.set('move',options);this.store('move',new Fx.Move(this,this.retrieve('move:options')));}
return this.retrieve('move');}};Element.implement({move:function(options){this.get('move').start(options);return this;}});Fx.Reveal=new Class({Extends:Fx.Morph,options:{styles:['padding','border','margin'],transitionOpacity:!Browser.Engine.trident4,mode:'vertical',display:'block',hideInputs:Browser.Engine.trident?'select, input, textarea, object, embed':false},dissolve:function(){try{if(!this.hiding&&!this.showing){if(this.element.getStyle('display')!='none'){this.hiding=true;this.showing=false;this.hidden=true;var startStyles=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});var setToAuto=(this.element.style.height===''||this.element.style.height=='auto');this.element.setStyle('display','block');if(this.options.transitionOpacity)startStyles.opacity=1;var zero={};$each(startStyles,function(style,name){zero[name]=[style,0];},this);var overflowBefore=this.element.getStyle('overflow');this.element.setStyle('overflow','hidden');var hideThese=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;this.$chain.unshift(function(){if(this.hidden){this.hiding=false;$each(startStyles,function(style,name){startStyles[name]=style;},this);this.element.setStyles($merge({display:'none',overflow:overflowBefore},startStyles));if(setToAuto){if(['vertical','both'].contains(this.options.mode))this.element.style.height='';if(['width','both'].contains(this.options.mode))this.element.style.width='';}
if(hideThese)hideThese.setStyle('visibility','visible');}
this.fireEvent('hide',this.element);this.callChain();}.bind(this));if(hideThese)hideThese.setStyle('visibility','hidden');this.start(zero);}else{this.callChain.delay(10,this);this.fireEvent('complete',this.element);this.fireEvent('hide',this.element);}}else if(this.options.link=='chain'){this.chain(this.dissolve.bind(this));}else if(this.options.link=='cancel'&&!this.hiding){this.cancel();this.dissolve();}}catch(e){this.hiding=false;this.element.setStyle('display','none');this.callChain.delay(10,this);this.fireEvent('complete',this.element);this.fireEvent('hide',this.element);}
return this;},reveal:function(){try{if(!this.showing&&!this.hiding){if(this.element.getStyle('display')=='none'||this.element.getStyle('visiblity')=='hidden'||this.element.getStyle('opacity')==0){this.showing=true;this.hiding=false;this.hidden=false;var setToAuto,startStyles;this.element.measure(function(){setToAuto=(this.element.style.height===''||this.element.style.height=='auto');startStyles=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});}.bind(this));$each(startStyles,function(style,name){startStyles[name]=style;});if($chk(this.options.heightOverride))startStyles.height=this.options.heightOverride.toInt();if($chk(this.options.widthOverride))startStyles.width=this.options.widthOverride.toInt();if(this.options.transitionOpacity){this.element.setStyle('opacity',0);startStyles.opacity=1;}
var zero={height:0,display:this.options.display};$each(startStyles,function(style,name){zero[name]=0;});var overflowBefore=this.element.getStyle('overflow');this.element.setStyles($merge(zero,{overflow:'hidden'}));var hideThese=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;if(hideThese)hideThese.setStyle('visibility','hidden');this.start(startStyles);this.$chain.unshift(function(){this.element.setStyle('overflow',overflowBefore);if(!this.options.heightOverride&&setToAuto){if(['vertical','both'].contains(this.options.mode))this.element.style.height='';if(['width','both'].contains(this.options.mode))this.element.style.width='';}
if(!this.hidden)this.showing=false;if(hideThese)hideThese.setStyle('visibility','visible');this.callChain();this.fireEvent('show',this.element);}.bind(this));}else{this.callChain();this.fireEvent('complete',this.element);this.fireEvent('show',this.element);}}else if(this.options.link=='chain'){this.chain(this.reveal.bind(this));}else if(this.options.link=='cancel'&&!this.showing){this.cancel();this.reveal();}}catch(e){this.element.setStyles({display:this.options.display,visiblity:'visible',opacity:1});this.showing=false;this.callChain.delay(10,this);this.fireEvent('complete',this.element);this.fireEvent('show',this.element);}
return this;},toggle:function(){if(this.element.getStyle('display')=='none'||this.element.getStyle('visiblity')=='hidden'||this.element.getStyle('opacity')==0){this.reveal();}else{this.dissolve();}
return this;}});Element.Properties.reveal={set:function(options){var reveal=this.retrieve('reveal');if(reveal)reveal.cancel();return this.eliminate('reveal').store('reveal:options',$extend({link:'cancel'},options));},get:function(options){if(options||!this.retrieve('reveal')){if(options||!this.retrieve('reveal:options'))this.set('reveal',options);this.store('reveal',new Fx.Reveal(this,this.retrieve('reveal:options')));}
return this.retrieve('reveal');}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(options){this.get('reveal',options).reveal();return this;},dissolve:function(options){this.get('reveal',options).dissolve();return this;},nix:function(){var params=Array.link(arguments,{destroy:Boolean.type,options:Object.type});this.get('reveal',params.options).dissolve().chain(function(){this[params.destroy?'destroy':'dispose']();}.bind(this));return this;},wink:function(){var params=Array.link(arguments,{duration:Number.type,options:Object.type});var reveal=this.get('reveal',params.options);reveal.reveal().chain(function(){(function(){reveal.dissolve();}).delay(params.duration||2000);});}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(element,options){this.element=this.subject=document.id(element);this.parent(options);var cancel=this.cancel.bind(this,false);if($type(this.element)!='element')this.element=document.id(this.element.getDocument().body);var stopper=this.element;if(this.options.wheelStops){this.addEvent('start',function(){stopper.addEvent('mousewheel',cancel);},true);this.addEvent('complete',function(){stopper.removeEvent('mousewheel',cancel);},true);}},set:function(){var now=Array.flatten(arguments);this.element.scrollTo(now[0],now[1]);},compute:function(from,to,delta){return[0,1].map(function(i){return Fx.compute(from[i],to[i],delta);});},start:function(x,y){if(!this.check(x,y))return this;var offsetSize=this.element.getSize(),scrollSize=this.element.getScrollSize();var scroll=this.element.getScroll(),values={x:x,y:y};for(var z in values){var max=scrollSize[z]-offsetSize[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=scroll[z];values[z]+=this.options.offset[z];}
return this.parent([scroll.x,scroll.y],[values.x,values.y]);},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);},toRight:function(){return this.start('right',false);},toBottom:function(){return this.start(false,'bottom');},toElement:function(el){var position=document.id(el).getPosition(this.element);return this.start(position.x,position.y);},scrollIntoView:function(el,axes,offset){axes=axes?$splat(axes):['x','y'];var to={};el=document.id(el);var pos=el.getPosition(this.element);var size=el.getSize();var scroll=this.element.getScroll();var containerSize=this.element.getSize();var edge={x:pos.x+size.x,y:pos.y+size.y};['x','y'].each(function(axis){if(axes.contains(axis)){if(edge[axis]>scroll[axis]+containerSize[axis])to[axis]=edge[axis]-containerSize[axis];if(pos[axis]<scroll[axis])to[axis]=pos[axis];}
if(to[axis]==null)to[axis]=scroll[axis];if(offset&&offset[axis])to[axis]=to[axis]+offset[axis];},this);if(to.x!=scroll.x||to.y!=scroll.y)this.start(to.x,to.y);return this;}});var SmoothScroll=Fx.SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(options,context){context=context||document;this.doc=context.getDocument();var win=context.getWindow();this.parent(this.doc,options);this.links=this.options.links?$$(this.options.links):$$(this.doc.links);var location=win.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0){return;}
var anchor=link.href.substr(location.length);if(anchor)this.useLink(link,anchor);},this);if(!Browser.Engine.webkit419){this.addEvent('complete',function(){win.location.hash=this.anchor;},true);}},useLink:function(link,anchor){var el;link.addEvent('click',function(event){if(el!==false&&!el)el=document.id(anchor)||this.doc.getElement('a[name='+anchor+']');if(el){event.preventDefault();this.anchor=anchor;this.toElement(el);link.blur();}}.bind(this));}});String.implement({parseQueryString:function(){var vars=this.split(/[&;]/),res={};if(vars.length)vars.each(function(val){var index=val.indexOf('='),keys=index<0?['']:val.substr(0,index).match(/[^\]\[]+/g),value=decodeURIComponent(val.substr(index+1)),obj=res;keys.each(function(key,i){var current=obj[key];if(i<keys.length-1)
obj=obj[key]=current||{};else if($type(current)=='array')
current.push(value);else
obj[key]=$defined(current)?[current,value]:value;});});return res;},cleanQueryString:function(method){return this.split('&').filter(function(val){var index=val.indexOf('='),key=index<0?'':val.substr(0,index),value=val.substr(index+1);return method?method.run([key,value]):$chk(value);}).join('&');}});(function(){var data={language:'en-US',languages:{'en-US':{}},cascades:['en-US']};var cascaded;MooTools.lang=new Events();$extend(MooTools.lang,{setLanguage:function(lang){if(!data.languages[lang])return this;data.language=lang;this.load();this.fireEvent('langChange',lang);return this;},load:function(){var langs=this.cascade(this.getCurrentLanguage());cascaded={};$each(langs,function(set,setName){cascaded[setName]=this.lambda(set);},this);},getCurrentLanguage:function(){return data.language;},addLanguage:function(lang){data.languages[lang]=data.languages[lang]||{};return this;},cascade:function(lang){var cascades=(data.languages[lang]||{}).cascades||[];cascades.combine(data.cascades);cascades.erase(lang).push(lang);var langs=cascades.map(function(lng){return data.languages[lng];},this);return $merge.apply(this,langs);},lambda:function(set){(set||{}).get=function(key,args){return $lambda(set[key]).apply(this,$splat(args));};return set;},get:function(set,key,args){if(cascaded&&cascaded[set])return(key?cascaded[set].get(key,args):cascaded[set]);},set:function(lang,set,members){this.addLanguage(lang);langData=data.languages[lang];if(!langData[set])langData[set]={};$extend(langData[set],members);if(lang==this.getCurrentLanguage()){this.load();this.fireEvent('langChange',lang);}
return this;},list:function(){return Hash.getKeys(data.languages);}});})();(function(){var Date=this.Date;if(!Date.now)Date.now=$time;Date.Methods={ms:'Milliseconds',year:'FullYear',min:'Minutes',mo:'Month',sec:'Seconds',hr:'Hours'};['Date','Day','FullYear','Hours','Milliseconds','Minutes','Month','Seconds','Time','TimezoneOffset','Week','Timezone','GMTOffset','DayOfYear','LastMonth','LastDayOfMonth','UTCDate','UTCDay','UTCFullYear','AMPM','Ordinal','UTCHours','UTCMilliseconds','UTCMinutes','UTCMonth','UTCSeconds'].each(function(method){Date.Methods[method.toLowerCase()]=method;});var pad=function(what,length){return new Array(length-String(what).length+1).join('0')+what;};Date.implement({set:function(prop,value){switch($type(prop)){case'object':for(var p in prop)this.set(p,prop[p]);break;case'string':prop=prop.toLowerCase();var m=Date.Methods;if(m[prop])this['set'+m[prop]](value);}
return this;},get:function(prop){prop=prop.toLowerCase();var m=Date.Methods;if(m[prop])return this['get'+m[prop]]();return null;},clone:function(){return new Date(this.get('time'));},increment:function(interval,times){interval=interval||'day';times=$pick(times,1);switch(interval){case'year':return this.increment('month',times*12);case'month':var d=this.get('date');this.set('date',1).set('mo',this.get('mo')+times);return this.set('date',d.min(this.get('lastdayofmonth')));case'week':return this.increment('day',times*7);case'day':return this.set('date',this.get('date')+times);}
if(!Date.units[interval])throw new Error(interval+' is not a supported interval');return this.set('time',this.get('time')+times*Date.units[interval]());},decrement:function(interval,times){return this.increment(interval,-1*$pick(times,1));},isLeapYear:function(){return Date.isLeapYear(this.get('year'));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0});},diff:function(date,resolution){if($type(date)=='string')date=Date.parse(date);return((date-this)/Date.units[resolution||'day'](3,3)).toInt();},getLastDayOfMonth:function(){return Date.daysInMonth(this.get('mo'),this.get('year'));},getDayOfYear:function(){return(Date.UTC(this.get('year'),this.get('mo'),this.get('date')+1)
-Date.UTC(this.get('year'),0,1))/Date.units.day();},getWeek:function(){return(this.get('dayofyear')/7).ceil();},getOrdinal:function(day){return Date.getMsg('ordinal',day||this.get('date'));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,'$1').replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,'$1$2$3');},getGMTOffset:function(){var off=this.get('timezoneOffset');return((off>0)?'-':'+')+pad((off.abs()/60).floor(),2)+pad(off%60,2);},setAMPM:function(ampm){ampm=ampm.toUpperCase();var hr=this.get('hr');if(hr>11&&ampm=='AM')return this.decrement('hour',12);else if(hr<12&&ampm=='PM')return this.increment('hour',12);return this;},getAMPM:function(){return(this.get('hr')<12)?'AM':'PM';},parse:function(str){this.set('time',Date.parse(str));return this;},isValid:function(date){return!!(date||this).valueOf();},format:function(f){if(!this.isValid())return'invalid date';f=f||'%x %X';f=formats[f.toLowerCase()]||f;var d=this;return f.replace(/%([a-z%])/gi,function($0,$1){switch($1){case'a':return Date.getMsg('days')[d.get('day')].substr(0,3);case'A':return Date.getMsg('days')[d.get('day')];case'b':return Date.getMsg('months')[d.get('month')].substr(0,3);case'B':return Date.getMsg('months')[d.get('month')];case'c':return d.toString();case'd':return pad(d.get('date'),2);case'H':return pad(d.get('hr'),2);case'I':return((d.get('hr')%12)||12);case'j':return pad(d.get('dayofyear'),3);case'm':return pad((d.get('mo')+1),2);case'M':return pad(d.get('min'),2);case'o':return d.get('ordinal');case'p':return Date.getMsg(d.get('ampm'));case'S':return pad(d.get('seconds'),2);case'U':return pad(d.get('week'),2);case'w':return d.get('day');case'x':return d.format(Date.getMsg('shortDate'));case'X':return d.format(Date.getMsg('shortTime'));case'y':return d.get('year').toString().substr(2);case'Y':return d.get('year');case'T':return d.get('GMTOffset');case'Z':return d.get('Timezone');}
return $1;});}});Date.alias('diff','compare');Date.alias('format','strftime');var formats={db:'%Y-%m-%d %H:%M:%S',compact:'%Y%m%dT%H%M%S',iso8601:'%Y-%m-%dT%H:%M:%S%T',rfc822:'%a, %d %b %Y %H:%M:%S %Z','short':'%d %b %H:%M','long':'%B %d, %Y %H:%M'};var parsePatterns=[];var nativeParse=Date.parse;var parseWord=function(type,word,num){var ret=-1;var translated=Date.getMsg(type+'s');switch($type(word)){case'object':ret=translated[word.get(type)];break;case'number':ret=translated[month-1];if(!ret)throw new Error('Invalid '+type+' index: '+index);break;case'string':var match=translated.filter(function(name){return this.test(name);},new RegExp('^'+word,'i'));if(!match.length)throw new Error('Invalid '+type+' string');if(match.length>1)throw new Error('Ambiguous '+type);ret=match[0];}
return(num)?translated.indexOf(ret):ret;};Date.extend({getMsg:function(key,args){return MooTools.lang.get('Date',key,args);},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(month,year){var d=new Date;return Date.daysInMonth($pick(month,d.get('mo')),$pick(year,d.get('year')))*86400000;},year:function(year){year=year||new Date().get('year');return Date.isLeapYear(year)?31622400000:31536000000;}},daysInMonth:function(month,year){return[31,Date.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month];},isLeapYear:function(year){return((year%4===0)&&(year%100!==0))||(year%400===0);},parse:function(from){var t=$type(from);if(t=='number')return new Date(from);if(t!='string')return from;from=from.clean();if(!from.length)return null;var parsed;parsePatterns.some(function(pattern){var bits=pattern.re.exec(from);return(bits)?(parsed=pattern.handler(bits)):false;});return parsed||new Date(nativeParse(from));},parseDay:function(day,num){return parseWord('day',day,num);},parseMonth:function(month,num){return parseWord('month',month,num);},parseUTC:function(value){var localDate=new Date(value);var utcSeconds=Date.UTC(localDate.get('year'),localDate.get('mo'),localDate.get('date'),localDate.get('hr'),localDate.get('min'),localDate.get('sec'));return new Date(utcSeconds);},orderIndex:function(unit){return Date.getMsg('dateOrder').indexOf(unit)+1;},defineFormat:function(name,format){formats[name]=format;},defineFormats:function(formats){for(var name in formats)Date.defineFormat(name,formats[name]);},parsePatterns:parsePatterns,defineParser:function(pattern){parsePatterns.push((pattern.re&&pattern.handler)?pattern:build(pattern));},defineParsers:function(){Array.flatten(arguments).each(Date.defineParser);},define2DigitYearStart:function(year){startYear=year%100;startCentury=year-startYear;}});var startCentury=1900;var startYear=70;var regexOf=function(type){return new RegExp('(?:'+Date.getMsg(type).map(function(name){return name.substr(0,3);}).join('|')+')[a-z]*');};var replacers=function(key){switch(key){case'x':return((Date.orderIndex('month')==1)?'%m[.-/]%d':'%d[.-/]%m')+'([.-/]%y)?';case'X':return'%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%T?';}
return null;};var keys={d:/[0-2]?[0-9]|3[01]/,H:/[01]?[0-9]|2[0-3]/,I:/0?[1-9]|1[0-2]/,M:/[0-5]?\d/,s:/\d+/,o:/[a-z]*/,p:/[ap]\.?m\.?/,y:/\d{2}|\d{4}/,Y:/\d{4}/,T:/Z|[+-]\d{2}(?::?\d{2})?/};keys.m=keys.I;keys.S=keys.M;var currentLanguage;var recompile=function(language){currentLanguage=language;keys.a=keys.A=regexOf('days');keys.b=keys.B=regexOf('months');parsePatterns.each(function(pattern,i){if(pattern.format)parsePatterns[i]=build(pattern.format);});};var build=function(format){if(!currentLanguage)return{format:format};var parsed=[];var re=(format.source||format).replace(/%([a-z])/gi,function($0,$1){return replacers($1)||$0;}).replace(/\((?!\?)/g,'(?:').replace(/ (?!\?|\*)/g,',? ').replace(/%([a-z%])/gi,function($0,$1){var p=keys[$1];if(!p)return $1;parsed.push($1);return'('+p.source+')';}).replace(/\[a-z\]/gi,'[a-z\\u00c0-\\uffff]');return{format:format,re:new RegExp('^'+re+'$','i'),handler:function(bits){bits=bits.slice(1).associate(parsed);var date=new Date().clearTime();if('d'in bits)handle.call(date,'d',1);if('m'in bits||'b'in bits||'B'in bits)handle.call(date,'m',1);for(var key in bits)handle.call(date,key,bits[key]);return date;}};};var handle=function(key,value){if(!value)return this;switch(key){case'a':case'A':return this.set('day',Date.parseDay(value,true));case'b':case'B':return this.set('mo',Date.parseMonth(value,true));case'd':return this.set('date',value);case'H':case'I':return this.set('hr',value);case'm':return this.set('mo',value-1);case'M':return this.set('min',value);case'p':return this.set('ampm',value.replace(/\./g,''));case'S':return this.set('sec',value);case's':return this.set('ms',('0.'+value)*1000);case'w':return this.set('day',value);case'Y':return this.set('year',value);case'y':value=+value;if(value<100)value+=startCentury+(value<startYear?100:0);return this.set('year',value);case'T':if(value=='Z')value='+00';var offset=value.match(/([+-])(\d{2}):?(\d{2})?/);offset=(offset[1]+'1')*(offset[2]*60+(+offset[3]||0))+this.getTimezoneOffset();return this.set('time',this-offset*60000);}
return this;};Date.defineParsers('%Y([-./]%m([-./]%d((T| )%X)?)?)?','%Y%m%d(T%H(%M%S?)?)?','%x( %X)?','%d%o( %b( %Y)?)?( %X)?','%b( %d%o)?( %Y)?( %X)?','%Y %b( %d%o( %X)?)?','%o %b %d %X %T %Y');MooTools.lang.addEvent('langChange',function(language){if(MooTools.lang.get('Date'))recompile(language);}).fireEvent('langChange',MooTools.lang.getCurrentLanguage());})();MooTools.lang.set('en-US','Date',{months:['January','February','March','April','May','June','July','August','September','October','November','December'],days:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dateOrder:['month','date','year'],shortDate:'%m/%d/%Y',shortTime:'%I:%M%p',AM:'AM',PM:'PM',ordinal:function(dayOfMonth){return(dayOfMonth>3&&dayOfMonth<21)?'th':['th','st','nd','rd','th'][Math.min(dayOfMonth%10,4)];}});var Color=new Native({initialize:function(color,type){if(arguments.length>=3){type='rgb';color=Array.slice(arguments,0,3);}else if(typeof color=='string'){if(color.match(/rgb/))color=color.rgbToHex().hexToRgb(true);else if(color.match(/hsb/))color=color.hsbToRgb();else color=color.hexToRgb(true);}
type=type||'rgb';switch(type){case'hsb':var old=color;color=color.hsbToRgb();color.hsb=old;break;case'hex':color=color.hexToRgb(true);break;}
color.rgb=color.slice(0,3);color.hsb=color.hsb||color.rgbToHsb();color.hex=color.rgbToHex();return $extend(color,this);}});Color.implement({mix:function(){var colors=Array.slice(arguments);var alpha=($type(colors.getLast())=='number')?colors.pop():50;var rgb=this.slice();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});var $RGB=function(r,g,b){return new Color([r,g,b],'rgb');};var $HSB=function(h,s,b){return new Color([h,s,b],'hsb');};var $HEX=function(hex){return new Color(hex,'hex');};Array.implement({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2],hue=0;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;var brightness=max/255,saturation=(max!=0)?delta/max:0;if(saturation!=0){var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;}
return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}}
return false;}});String.implement({rgbToHsb:function(){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHsb():null;},hsbToRgb:function(){var hsb=this.match(/\d{1,3}/g);return(hsb)?hsb.hsbToRgb():null;}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:'px',grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,stopPropagation:false,modifiers:{x:'left',y:'top'}},initialize:function(){var params=Array.link(arguments,{'options':Object.type,'element':$defined});this.element=document.id(params.element);this.document=this.element.getDocument();this.setOptions(params.options||{});var htype=$type(this.options.handle);this.handles=((htype=='array'||htype=='collection')?$$(this.options.handle):document.id(this.options.handle))||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.selection=(Browser.Engine.trident)?'selectstart':'mousedown';this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach();},attach:function(){this.handles.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handles.removeEvent('mousedown',this.bound.start);return this;},start:function(event){if(event.rightClick)return;if(this.options.preventDefault)event.preventDefault();if(this.options.stopPropagation)event.stopPropagation();this.mouse.start=event.page;this.fireEvent('beforeStart',this.element);var limit=this.options.limit;this.limit={x:[],y:[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;if(this.options.style)this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();else this.value.now[z]=this.element[this.options.modifiers[z]];if(this.options.invert)this.value.now[z]*=-1;this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=2;i--;i){if($chk(limit[z][i]))this.limit[z][i]=$lambda(limit[z][i])();}}}
if($type(this.options.grid)=='number')this.options.grid={x:this.options.grid,y:this.options.grid};this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop);},check:function(event){if(this.options.preventDefault)event.preventDefault();var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent('start',[this.element,event]).fireEvent('snap',this.element);}},drag:function(event){if(this.options.preventDefault)event.preventDefault();this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.options.invert)this.value.now[z]*=-1;if(this.options.limit&&this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0];}}
if(this.options.grid[z])this.value.now[z]-=((this.value.now[z]-(this.limit[z][0]||0))%this.options.grid[z]);if(this.options.style){this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);}else{this.element[this.options.modifiers[z]]=this.value.now[z];}}
this.fireEvent('drag',[this.element,event]);},cancel:function(event){this.document.removeEvent('mousemove',this.bound.check);this.document.removeEvent('mouseup',this.bound.cancel);if(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent('cancel',this.element);}},stop:function(event){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent('mousemove',this.bound.drag);this.document.removeEvent('mouseup',this.bound.stop);if(event)this.fireEvent('complete',[this.element,event]);}});Element.implement({makeResizable:function(options){var drag=new Drag(this,$merge({modifiers:{x:'width',y:'height'}},options));this.store('resizer',drag);return drag.addEvent('drag',function(){this.fireEvent('resize',drag);}.bind(this));}});Class.Mutators.Binds=function(binds){return binds;};Class.Mutators.initialize=function(initialize){return function(){$splat(this.Binds).each(function(name){var original=this[name];if(original)this[name]=original.bind(this);},this);return initialize.apply(this,arguments);};};var Slider=new Class({Implements:[Events,Options],Binds:['clickedElement','draggedKnob','scrolledElement'],options:{onTick:function(position){if(this.options.snap)position=this.toPosition(this.step);this.knob.setStyle(this.property,position);},initialStep:0,snap:false,offset:0,range:false,wheel:false,steps:100,mode:'horizontal'},initialize:function(element,knob,options){this.setOptions(options);this.element=document.id(element);this.knob=document.id(knob);this.previousChange=this.previousEnd=this.step=-1;var offset,limit={},modifiers={'x':false,'y':false};switch(this.options.mode){case'vertical':this.axis='y';this.property='top';offset='offsetHeight';break;case'horizontal':this.axis='x';this.property='left';offset='offsetWidth';}
this.full=this.element.measure(function(){this.half=this.knob[offset]/2;return this.element[offset]-this.knob[offset]+(this.options.offset*2);}.bind(this));this.min=$chk(this.options.range[0])?this.options.range[0]:0;this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle('position','relative').setStyle(this.property,this.options.initialStep?this.toPosition(this.options.initialStep):-this.options.offset);modifiers[this.axis]=this.property;limit[this.axis]=[-this.options.offset,this.full-this.options.offset];var dragOptions={snap:0,limit:limit,modifiers:modifiers,onDrag:this.draggedKnob,onStart:this.draggedKnob,onBeforeStart:(function(){this.isDragging=true;}).bind(this),onCancel:function(){this.isDragging=false;}.bind(this),onComplete:function(){this.isDragging=false;this.draggedKnob();this.end();}.bind(this)};if(this.options.snap){dragOptions.grid=Math.ceil(this.stepWidth);dragOptions.limit[this.axis][1]=this.full;}
this.drag=new Drag(this.knob,dragOptions);this.attach();},attach:function(){this.element.addEvent('mousedown',this.clickedElement);if(this.options.wheel)this.element.addEvent('mousewheel',this.scrolledElement);this.drag.attach();return this;},detach:function(){this.element.removeEvent('mousedown',this.clickedElement);this.element.removeEvent('mousewheel',this.scrolledElement);this.drag.detach();return this;},set:function(step){if(!((this.range>0)^(step<this.min)))step=this.min;if(!((this.range>0)^(step>this.max)))step=this.max;this.step=Math.round(step);this.checkStep();this.fireEvent('tick',this.toPosition(this.step));this.end();return this;},clickedElement:function(event){if(this.isDragging||event.target==this.knob)return;var dir=this.range<0?-1:1;var position=event.page[this.axis]-this.element.getPosition()[this.axis]-this.half;position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();this.fireEvent('tick',position);this.end();},scrolledElement:function(event){var mode=(this.options.mode=='horizontal')?(event.wheel<0):(event.wheel>0);this.set(mode?this.step-this.stepSize:this.step+this.stepSize);event.stop();},draggedKnob:function(){var dir=this.range<0?-1:1;var position=this.drag.value.now[this.axis];position=position.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+dir*this.toStep(position));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('change',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('complete',this.step+'');}},toStep:function(position){var step=(position+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(step-=step%this.stepSize):step;},toPosition:function(step){return(this.full*Math.abs(this.min-step))/(this.steps*this.stepSize)-this.options.offset;}});Events.Pseudos=function(pseudos,addEvent,removeEvent){var storeKey='monitorEvents:';var storageOf=function(object){return{store:object.store?function(key,value){object.store(storeKey+key,value);}:function(key,value){(object.$monitorEvents||(object.$monitorEvents={}))[key]=value;},retrieve:object.retrieve?function(key,dflt){return object.retrieve(storeKey+key,dflt);}:function(key,dflt){if(!object.$monitorEvents)return dflt;return object.$monitorEvents[key]||dflt;}};};var splitType=function(type){if(type.indexOf(':')==-1||!pseudos)return null;var parsed=Slick.parse(type).expressions[0][0],parsedPseudos=parsed.pseudos,l=parsedPseudos.length,splits=[];while(l--)if(pseudos[parsedPseudos[l].key]){splits.push({event:parsed.tag,value:parsedPseudos[l].value,pseudo:parsedPseudos[l].key,original:type});}
return splits.length?splits:null;};var mergePseudoOptions=function(split){return Object.merge.apply(this,split.map(function(item){return pseudos[item.pseudo].options||{};}));};return{addEvent:function(type,fn,internal){var split=splitType(type);if(!split)return addEvent.call(this,type,fn,internal);var storage=storageOf(this),events=storage.retrieve(type,[]),eventType=split[0].event,options=mergePseudoOptions(split),stack=fn,eventOptions=options[eventType]||{},args=Array.slice(arguments,2),self=this,monitor;if(eventOptions.args)args.append(Array.from(eventOptions.args));if(eventOptions.base)eventType=eventOptions.base;if(eventOptions.onAdd)eventOptions.onAdd(this);split.each(function(item){var stackFn=stack;stack=function(){(eventOptions.listener||pseudos[item.pseudo].listener).call(self,item,stackFn,arguments,monitor,options);};});monitor=stack.bind(this);events.include({event:fn,monitor:monitor});storage.store(type,events);addEvent.apply(this,[type,fn].concat(args));return addEvent.apply(this,[eventType,monitor].concat(args));},removeEvent:function(type,fn){var split=splitType(type);if(!split)return removeEvent.call(this,type,fn);var storage=storageOf(this),events=storage.retrieve(type);if(!events)return this;var eventType=split[0].event,options=mergePseudoOptions(split),eventOptions=options[eventType]||{},args=Array.slice(arguments,2);if(eventOptions.args)args.append(Array.from(eventOptions.args));if(eventOptions.base)eventType=eventOptions.base;if(eventOptions.onRemove)eventOptions.onRemove(this);removeEvent.apply(this,[type,fn].concat(args));events.each(function(monitor,i){if(!fn||monitor.event==fn)removeEvent.apply(this,[eventType,monitor.monitor].concat(args));delete events[i];},this);storage.store(type,events);return this;}};};(function(){var pseudos={once:{listener:function(split,fn,args,monitor){fn.apply(this,args);this.removeEvent(split.event,monitor).removeEvent(split.original,fn);}},throttle:{listener:function(split,fn,args){if(!fn._throttled){fn.apply(this,args);fn._throttled=setTimeout(function(){fn._throttled=false;},split.value||250);}}},pause:{listener:function(split,fn,args){clearTimeout(fn._pause);fn._pause=fn.delay(split.value||250,this,args);}}};Events.definePseudo=function(key,listener){pseudos[key]=Type.isFunction(listener)?{listener:listener}:listener;return this;};Events.lookupPseudo=function(key){return pseudos[key];};var proto=Events.prototype;Events.implement(Events.Pseudos(pseudos,proto.addEvent,proto.removeEvent));['Request','Fx'].each(function(klass){if(this[klass])this[klass].implement(Events.prototype);});})();(function(){var pseudos={},copyFromEvents=['once','throttle','pause'],count=copyFromEvents.length;while(count--)pseudos[copyFromEvents[count]]=Events.lookupPseudo(copyFromEvents[count]);Event.definePseudo=function(key,listener){pseudos[key]=Type.isFunction(listener)?{listener:listener}:listener;return this;};var proto=Element.prototype;[Element,Window,Document].invoke('implement',Events.Pseudos(pseudos,proto.addEvent,proto.removeEvent));})();(function(){var eventListenerSupport=!(window.attachEvent&&!window.addEventListener),nativeEvents=Element.NativeEvents;nativeEvents.focusin=2;nativeEvents.focusout=2;var check=function(split,target,event){var elementEvent=Element.Events[split.event],condition;if(elementEvent)condition=elementEvent.condition;return Slick.match(target,split.value)&&(!condition||condition.call(target,event));};var bubbleUp=function(split,event,fn){for(var target=event.target;target&&target!=this;target=document.id(target.parentNode)){if(target&&check(split,target,event))return fn.call(target,event,target);}};var formObserver=function(eventName){var $delegationKey='$delegation:';return{base:'focusin',onRemove:function(element){element.retrieve($delegationKey+'forms',[]).each(function(el){el.retrieve($delegationKey+'listeners',[]).each(function(listener){el.removeEvent(eventName,listener);});el.eliminate($delegationKey+eventName+'listeners').eliminate($delegationKey+eventName+'originalFn');});},listener:function(split,fn,args,monitor,options){var event=args[0],forms=this.retrieve($delegationKey+'forms',[]),target=event.target,form=(target.get('tag')=='form')?target:event.target.getParent('form');if(!form)return;var formEvents=form.retrieve($delegationKey+'originalFn',[]),formListeners=form.retrieve($delegationKey+'listeners',[]),self=this;forms.include(form);this.store($delegationKey+'forms',forms);if(!formEvents.contains(fn)){var formListener=function(event){bubbleUp.call(self,split,event,fn);};form.addEvent(eventName,formListener);formEvents.push(fn);formListeners.push(formListener);form.store($delegationKey+eventName+'originalFn',formEvents).store($delegationKey+eventName+'listeners',formListeners);}}};};var inputObserver=function(eventName){return{base:'focusin',listener:function(split,fn,args){var events={blur:function(){this.removeEvents(events);}},self=this;events[eventName]=function(event){bubbleUp.call(self,split,event,fn);};args[0].target.addEvents(events);}};};var eventOptions={mouseenter:{base:'mouseover'},mouseleave:{base:'mouseout'},focus:{base:'focus'+(eventListenerSupport?'':'in'),args:[true]},blur:{base:eventListenerSupport?'blur':'focusout',args:[true]}};if(!eventListenerSupport)Object.append(eventOptions,{submit:formObserver('submit'),reset:formObserver('reset'),change:inputObserver('change'),select:inputObserver('select')});Event.definePseudo('relay',{listener:function(split,fn,args){bubbleUp.call(this,split,args[0],fn);},options:eventOptions});})();Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(elements,options){this.elements=this.subject=$$(elements);this.parent(options);},compute:function(from,to,delta){var now={};for(var i in from){var iFrom=from[i],iTo=to[i],iNow=now[i]={};for(var p in iFrom)iNow[p]=this.parent(iFrom[p],iTo[p],delta);}
return now;},set:function(now){for(var i in now){if(!this.elements[i])continue;var iNow=now[i];for(var p in iNow)this.render(this.elements[i],p,iNow[p],this.options.unit);}
return this;},start:function(obj){if(!this.check(obj))return this;var from={},to={};for(var i in obj){if(!this.elements[i])continue;var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={};for(var p in iProps){var parsed=this.prepare(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;}}
return this.parent(from,to);}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{fixedHeight:false,fixedWidth:false,display:0,show:false,height:true,width:false,opacity:true,alwaysHide:false,trigger:'click',initialDisplayFx:true,returnHeightToAuto:true},initialize:function(){var params=Array.link(arguments,{'container':Element.type,'options':Object.type,'togglers':$defined,'elements':$defined});this.parent(params.elements,params.options);this.togglers=$$(params.togglers);this.previous=-1;this.internalChain=new Chain();if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('active',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);if($chk(this.options.display)||this.options.initialDisplayFx===false)this.display(this.options.display,this.options.initialDisplayFx);if(this.options.fixedHeight!==false)this.options.returnHeightToAuto=false;this.addEvent('complete',this.internalChain.callChain.bind(this.internalChain));},addSection:function(toggler,element){toggler=document.id(toggler);element=document.id(element);var test=this.togglers.contains(toggler);this.togglers.include(toggler);this.elements.include(element);var idx=this.togglers.indexOf(toggler);var displayer=this.display.bind(this,idx);toggler.store('accordion:display',displayer);toggler.addEvent(this.options.trigger,displayer);if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},removeSection:function(toggler,displayIndex){var idx=this.togglers.indexOf(toggler);var element=this.elements[idx];var remover=function(){this.togglers.erase(toggler);this.elements.erase(element);this.detach(toggler);}.bind(this);if(this.now==idx||displayIndex!=undefined)this.display($pick(displayIndex,idx-1>=0?idx-1:0)).chain(remover);else remover();return this;},detach:function(toggler){var remove=function(toggler){toggler.removeEvent(this.options.trigger,toggler.retrieve('accordion:display'));}.bind(this);if(!toggler)this.togglers.each(remove);else remove(toggler);return this;},display:function(index,useFx){if(!this.check(index,useFx))return this;useFx=$pick(useFx,true);index=($type(index)=='element')?this.elements.indexOf(index):index;if(index==this.previous&&!this.options.alwaysHide)return this;if(this.options.returnHeightToAuto){var prev=this.elements[this.previous];if(prev&&!this.selfHidden){for(var fx in this.effects){prev.setStyle(fx,prev[this.effects[fx]]);}}}
if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide;if(i!=index){hide=true;}else if(this.options.alwaysHide&&((el.offsetHeight>0&&this.options.height)||el.offsetWidth>0&&this.options.width)){hide=true;this.selfHidden=true;}
this.fireEvent(hide?'background':'active',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);this.internalChain.clearChain();this.internalChain.chain(function(){if(this.options.returnHeightToAuto&&!this.selfHidden){var el=this.elements[index];if(el)el.setStyle('height','auto');};}.bind(this));return useFx?this.start(obj):this.set(obj);}});var Accordion=new Class({Extends:Fx.Accordion,initialize:function(){this.parent.apply(this,arguments);var params=Array.link(arguments,{'container':Element.type});this.container=params.container;},addSection:function(toggler,element,pos){toggler=document.id(toggler);element=document.id(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.inject(this.togglers[pos],'before');element.inject(toggler,'after');}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
return this.parent.apply(this,arguments);}});var Asset={javascript:function(source,properties){if(!properties)properties={};var script=new Element('script',{src:source,type:'text/javascript'}),doc=properties.document||document,load=properties.onload||properties.onLoad;delete properties.onload;delete properties.onLoad;delete properties.document;if(load){if(typeof script.onreadystatechange!='undefined'){script.addEvent('readystatechange',function(){if(['loaded','complete'].contains(this.readyState))load.call(this);});}else{script.addEvent('load',load);}}
return script.set(properties).inject(doc.head);},css:function(source,properties){if(!properties)properties={};var link=new Element('link',{rel:'stylesheet',media:'screen',type:'text/css',href:source});var load=properties.onload||properties.onLoad,doc=properties.document||document;delete properties.onload;delete properties.onLoad;delete properties.document;if(load)link.addEvent('load',load);return link.set(properties).inject(doc.head);},image:function(source,properties){if(!properties)properties={};var image=new Image(),element=document.id(image)||new Element('img');['load','abort','error'].each(function(name){var type='on'+name,cap='on'+name.capitalize(),event=properties[type]||properties[cap]||function(){};delete properties[cap];delete properties[type];image[type]=function(){if(!image)return;if(!element.parentNode){element.width=image.width;element.height=image.height;}
image=image.onload=image.onabort=image.onerror=null;event.delay(1,element,element);element.fireEvent(name,element,1);};});image.src=element.src=source;if(image&&image.complete)image.onload.delay(1);return element.set(properties);},images:function(sources,options){sources=Array.from(sources);var fn=function(){},counter=0;options=Object.merge({onComplete:fn,onProgress:fn,onError:fn,properties:{}},options);return new Elements(sources.map(function(source,index){return Asset.image(source,Object.append(options.properties,{onload:function(){counter++;options.onProgress.call(this,counter,index,source);if(counter==sources.length)options.onComplete();},onerror:function(){counter++;options.onError.call(this,counter,index,source);if(counter==sources.length)options.onComplete();}}));}));}};
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORMOOMOO', bundleError);}


/* CUSCORBAS */
try{
var Hc=Hc||{};Hc.global=this;var tld=window.location.hostname.split('.').pop();if(tld==='cloud')tld='de';Hc.global.tld=tld;Hc.register=function(namespace){var parts=namespace.split('.');var cur=Hc.global;if(!(parts[0]in cur)&&cur.execScript){cur.execScript('var '+parts[0]);}
for(var part;parts.length&&(part=parts.shift());){if(cur[part]){cur=cur[part];}else{cur=cur[part]={};}}};Hc.legacy=function(data,callback){var p,y={};if(data&&(typeof data==='object')){var url='/legacy.php?key=4011da7c-4ec2-f00b-a2ba-fedcba987654';for(p in data){url+='&'+encodeURIComponent(p)+'="'+encodeURIComponent(data[p])+'"';}
jQuery.get(url,'',callback,'json');}};window.addEvent('domready',function(){var mySelect=jQuery('#selectCurrency');var myDestination=$('selectCurrencyDestination');if(mySelect&&myDestination){mySelect.addEvent('change',function(e){var jsonRequest=new Request.JSON({url:myDestination.value,onSuccess:function(response){if(response.isReloadNecessary=='true'){window.location.reload(true);}
gaTrackEvent('Waehrungswechsler','Change to '+mySelect.value);}}).post('selectCurrency='+mySelect.value);});}});Hc.registerElement=function(element){element=$(element);if(!element){return;}
if(element.hasClass('jsInputLayer')||element.hasClass('jsLayer')||element.hasClass('jsSuggestSearch')){var baseId=element.id.replace('Layer',''),closeLayerCallback=function(event){var target=$(event.target);if((element.hasClass('jsInputLayer')&&!target.getParent('#formElementLine_'+baseId))||(element.hasClass('jsLayer')&&!target.getParent('#'+baseId))||(element.hasClass('jsSuggestSearch')&&!target.getParent('.input'))){element.toggleOff();}};if(element.hasClass('jsInputLayer')){element.addEvent('toggleOff',function(){checkLayerChangingInline(baseId);});}
element.addEvent('toggleOn',function(){$(document.body).addEvent('click',closeLayerCallback);});element.addEvent('toggleOff',function(){$(document.body).removeEvent('click',closeLayerCallback);});}
if(element.hasClass('jsToggler')){handle=$(element.id+'TogglerHandleOn');if(handle){handle.addEvent('click',function(){element.toggleOn();});}
handle=$(element.id+'TogglerHandleOff');if(handle){handle.addEvent('click',function(){element.toggleOff();});}
handle=$(element.id+'TogglerHandle');if(handle){handle.addEvent('click',function(){element.toggleOnOff();});}}
if(element.hasClass('jsCharacterCounter')){new Hc.CharacterCounter(element);}};Element.implement({toggleOn:function(){var handleOn=$(this.id+'TogglerHandleOn'),handleOff;if(MooTools.version<'1.3'&&this.hasClass('jsEffectTween')){Hc.Effect.tween(this,'open','jsTogglerClosed');}else{Hc.Effect.none(this,'open','jsTogglerClosed');}
if(handleOn){var toggler=jQuery('#'+this.id+'TogglerHandle');handleOn.addClass('jsTogglerHandleClosed');toggler.addClass('close');handleOff=$(this.id+'TogglerHandleOff');if(handleOff){handleOff.removeClass('jsTogglerHandleClosed');}}
this.fireEvent('toggleOn',arguments);},toggleOff:function(){var handleOn,handleOff=$(this.id+'TogglerHandleOff');if(MooTools.version<'1.3'&&this.hasClass('jsEffectTween')){Hc.Effect.tween(this,'close','jsTogglerClosed');}else{Hc.Effect.none(this,'close','jsTogglerClosed');}
if(handleOff){var toggler=jQuery('#'+this.id+'TogglerHandle');handleOff.addClass('jsTogglerHandleClosed');handleOn=$(this.id+'TogglerHandleOn');if(handleOn){handleOn.removeClass('jsTogglerHandleClosed');toggler.removeClass('close');}}
this.fireEvent('toggleOff',arguments);},toggleOnOff:function(){if(this.hasClass('jsTogglerClosed')){this.toggleOn($A(arguments).join(','));}else{this.toggleOff($A(arguments).join(','));}}});Hc.register('Hc.Effect');Hc.Effect.none=function(element,openClose,className){if('open'==openClose){element.removeClass(className);}else if('close'==openClose){element.addClass(className);}};Hc.Effect.tween=function(element,openClose,className){if('open'==openClose){element.setStyle('display','none');element.removeClass(className);element.reveal({fps:50});}else if('close'==openClose){element.dissolve({fps:50,onComplete:function(){element.addClass(className);}});}};Element.implement({render:function(texts){this.set('html',this.get('html').substitute(texts,/\\?\{+([^{}]+)\}+/g));}});Hc.render=function(template,texts,keepId){if(!$chk(keepId)){keepId=false;}
keepId=Boolean(keepId);var clone=template.clone(true,keepId);clone.render(texts);return clone;};Hc.register('Hc.Html5test.input');Hc.Html5test.fakeInput=new Element('input');'autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ').each(function(attribute){Hc.Html5test.input[attribute]=!!(attribute in Hc.Html5test.fakeInput);});delete(Hc.Html5test.fakeInput);Element.implement({enablePlaceholder:function(){if(Hc.Html5test.input.placeholder){return;}
if('input'!=this.get('tag')){return;}
var placeholder=this.get('placeholder');if(!placeholder){return;}
if(''===this.value.trim()){this.addClass('placeholder');this.value=placeholder.trim();}
this.addEvent('focus',function(){if(placeholder.trim()==this.value.trim()){this.removeClass('placeholder');this.value='';}}.bind(this));this.addEvent('blur',function(){if(''===this.value.trim()){this.value=placeholder;this.addClass('placeholder');}}.bind(this));}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORBAS', bundleError);}


/* LIBCORSHASHA */
try{
(function(window,undefined){var S={version:"3.0.3"};Array.prototype.contains=Array.prototype.contains||function(obj){for(var i=0;i<this.length;++i){if(this[i]===obj){return true;}}
return false;};var galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i,root=document.documentElement,open=false,initialized=false,lastOptions={},slideDelay=0,slideStart,slideTimer,supportsOpacity="opacity"in root.style&&typeof root.style.opacity==="string",supportsFixed=false;(function(){var div=document.createElement("div");div.style.position="fixed";div.style.margin=0;div.style.top="20px";root.appendChild(div,root.firstChild);supportsFixed=div.offsetTop==20;root.removeChild(div);})();S.current=-1;S.dimensions=null;S.ease=function(state){return 1+Math.pow(state-1,3);}
S.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"}};S.gallery=[];S.onReady=noop;S.path=null;S.player=null;S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=function(){return S.current>-1?S.gallery[S.current]:null;}
S.hasNext=function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous);}
S.isOpen=function(){return open;}
S.isPaused=function(){return slideTimer=="pause";}
S.applyOptions=function(options){lastOptions=apply({},S.options);apply(S.options,options);}
S.revertOptions=function(){apply(S.options,lastOptions);}
S.init=function(options,callback){if(initialized)
return;initialized=true;if(S.skin.options)
apply(S.options,S.skin.options);if(options)
apply(S.options,options);if(!S.path){var path,scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){path=scriptPath.exec(scripts[i].src);if(path){S.path=path[1];break;}}}
if(callback)
S.onReady=callback;bindLoad();}
S.open=function(obj){if(open)
return;var gc=S.makeGallery(obj);S.gallery=gc[0];S.current=gc[1];obj=S.getCurrent();if(obj==null)
return;S.applyOptions(obj.options||{});filterGallery();if(S.gallery.length){obj=S.getCurrent();if(S.options.onOpen(obj)===false)
return;open=true;S.skin.onOpen(obj,load);}}
S.close=function(){if(!open)
return;open=false;if(S.player){S.player.remove();S.player=null;}
if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null;}
slideDelay=0;listenKeys(false);S.options.onClose(S.getCurrent());S.skin.onClose();S.revertOptions();}
S.play=function(){if(!S.hasNext())
return;if(!slideDelay)
slideDelay=S.options.slideshowDelay*1000;if(slideDelay){slideStart=now();slideTimer=setTimeout(function(){slideDelay=slideStart=0;S.next();},slideDelay);if(S.skin.onPlay)
S.skin.onPlay();}}
S.pause=function(){if(typeof slideTimer!="number")
return;slideDelay=Math.max(0,slideDelay-(now()-slideStart));if(slideDelay){clearTimeout(slideTimer);slideTimer="pause";if(S.skin.onPause)
S.skin.onPause();}}
S.change=function(index){if(!(index in S.gallery)){if(S.options.continuous){index=(index<0?S.gallery.length+index:0);if(!(index in S.gallery))
return;}else{return;}}
S.current=index;if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null;slideDelay=slideStart=0;}
S.options.onChange(S.getCurrent());load(true);}
S.next=function(){S.change(S.current+1);}
S.previous=function(){S.change(S.current-1);}
S.setDimensions=function(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect){var originalHeight=height,originalWidth=width;var extraHeight=2*padding+topBottom;if(height+extraHeight>maxHeight)
height=maxHeight-extraHeight;var extraWidth=2*padding+leftRight;if(width+extraWidth>maxWidth)
width=maxWidth-extraWidth;var changeHeight=(originalHeight-height)/originalHeight,changeWidth=(originalWidth-width)/originalWidth,oversized=(changeHeight>0||changeWidth>0);if(preserveAspect&&oversized){if(changeHeight>changeWidth){width=Math.round((originalWidth/originalHeight)*height);}else if(changeWidth>changeHeight){height=Math.round((originalHeight/originalWidth)*width);}}
S.dimensions={height:height+topBottom,width:width+leftRight,innerHeight:height,innerWidth:width,top:Math.floor((maxHeight-(height+extraHeight))/2+padding),left:Math.floor((maxWidth-(width+extraWidth))/2+padding),oversized:oversized};return S.dimensions;}
S.makeGallery=function(obj){var gallery=[],current=-1;if(typeof obj=="string")
obj=[obj];if(typeof obj.length=="number"){each(obj,function(i,o){if(o.content){gallery[i]=o;}else{gallery[i]={content:o};}});current=0;}else{if(obj.tagName){var cacheObj=S.getCache(obj);obj=cacheObj?cacheObj:S.makeObject(obj);}
if(obj.gallery){gallery=[];var o;for(var key in S.cache){o=S.cache[key];if(o.gallery&&o.gallery==obj.gallery){if(current==-1&&o.content==obj.content)
current=gallery.length;gallery.push(o);}}
if(current==-1){gallery.unshift(obj);current=0;}}else{gallery=[obj];current=0;}}
each(gallery,function(i,o){gallery[i]=apply({},o);});return[gallery,current];}
S.makeObject=function(link,options){var dataHref=link.getAttribute('data-href')||null;if(dataHref){link.href=dataHref;}
var obj={content:link.href,title:link.getAttribute("title")||"",link:link};if(options){options=apply({},options);each(["player","title","height","width","gallery"],function(i,o){if(typeof options[o]!="undefined"){obj[o]=options[o];delete options[o];}});obj.options=options;}else{obj.options={};}
if(!obj.player)
obj.player=S.getPlayer(obj.content);var dataRel=link.getAttribute("data-rel");var rel=link.getAttribute("rel");if(dataRel){var match=dataRel.match(galleryName);if(match)
obj.gallery=escape(match[2]);each(dataRel.split(';'),function(i,p){match=p.match(inlineParam);if(match)
obj[match[1]]=match[2];});}else if(rel){var match=rel.match(galleryName);if(match)
obj.gallery=escape(match[2]);each(rel.split(';'),function(i,p){match=p.match(inlineParam);if(match)
obj[match[1]]=match[2];});}
return obj;}
S.getPlayer=function(content){var q=content.indexOf("?");if(q>-1){content=content.substring(0,q);}
var ext,m=content.match(fileExtension);if(m){ext=m[0].toLowerCase();}
if(ext){if(S.img&&S.img.ext.contains(ext)){return"img";}
if(S.swf&&S.swf.ext.contains(ext)){return"swf";}
if(S.flv&&S.flv.ext.contains(ext)){return"flv";}
if(S.qt&&S.qt.ext.contains(ext)){return"qt";}}
return"iframe";}
function filterGallery(){var err=S.errorInfo,plugins=S.plugins,obj,remove,needed,m,flashVersion;for(var i=0;i<S.gallery.length;++i){obj=S.gallery[i]
remove=false;needed=null;switch(obj.player){case"flv":case"swf":if(!plugins.fla){needed="fla";}
break;case"qt":if(!plugins.qt){needed="qt";}
break;}
if(needed){if(S.options.handleUnsupported=="link"){obj.player="html";obj.content='<div class="sb-message">Please download <a href="'+err[needed].url+'">'+err[needed].name+'</a> in order to view this content.</div>';}else{remove=true;}}else if(obj.player=="swf"||obj.player=="flv"){flashVersion=(obj.options&&obj.options.flashVersion)||S.options.flashVersion;if(S.flash&&!S.flash.hasFlashPlayerVersion(flashVersion)){obj.width=310;obj.height=177;}}
if(remove){S.gallery.splice(i,1);if(i<S.current){--S.current;}else if(i==S.current){S.current=i>0?i-1:i;}
--i;}}}
function listenKeys(on){if(!S.options.enableKeys)
return;(on?addEvent:removeEvent)(document,"keydown",handleKey);}
function handleKey(e){if(e.metaKey||e.shiftKey||e.altKey||e.ctrlKey){return;}
var handler;switch(e.keyCode){case 81:case 88:case 27:handler=S.close;break;case 37:handler=S.previous;break;case 39:handler=S.next;break;case 32:handler=typeof slideTimer=="number"?S.pause:S.play;break;}
if(handler){e.preventDefault();handler();}}
function load(changing){listenKeys(false);var obj=S.getCurrent(),player=obj.player;if(typeof S[player]!=="function"){throw"unknown player "+player;}
if(changing){S.player.remove();S.revertOptions();S.applyOptions(obj.options||{});}
S.player=new S[player](obj,S.playerId);if(S.gallery.length>1){var next=S.gallery[S.current+1]||S.gallery[0];if(next.player==="img"){var a=new Image();a.src=next.content;}
var prev=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(prev.player==="img"){var b=new Image();b.src=prev.content;}}
S.skin.onLoad(changing,waitReady);}
function waitReady(){if(!open)
return;if(typeof S.player.ready!="undefined"){var timer=setInterval(function(){if(open){if(S.player.ready){clearInterval(timer);timer=null;S.skin.onReady(show);}}else{clearInterval(timer);timer=null;}},10);}else{S.skin.onReady(show);}}
function show(){if(!open)
return;S.player.append(S.skin.body,S.dimensions);S.skin.onShow(finish);}
function finish(){if(!open)
return;if(S.player.onLoad)
S.player.onLoad();S.options.onFinish(S.getCurrent());if(!S.isPaused())
S.play();listenKeys(true);}
function now(){return(new Date).getTime();}
function apply(original,extension){for(var property in extension)
original[property]=extension[property];return original;}
function each(obj,callback){var i=0,len=obj.length;for(var value=obj[0];i<len&&callback.call(value,i,value)!==false;value=obj[++i]){}}
function noop(){}
function get(id){return document.getElementById(id);}
function remove(el){el.parentNode.removeChild(el);}
S.getStyle=(function(){var opacity=/opacity=([^)]*)/,getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle;return function(el,style){var ret;if(!supportsOpacity&&style=="opacity"&&el.currentStyle){ret=opacity.test(el.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret;}
if(getComputedStyle){var computedStyle=getComputedStyle(el,null);if(computedStyle)
ret=computedStyle[style];if(style=="opacity"&&ret=="")
ret="1";}else{ret=el.currentStyle[style];}
return ret;}})();S.appendHTML=function(el,html){if(el.insertAdjacentHTML){el.insertAdjacentHTML("BeforeEnd",html);}else if(el.lastChild){var range=el.ownerDocument.createRange();range.setStartAfter(el.lastChild);var frag=range.createContextualFragment(html);el.appendChild(frag);}else{el.innerHTML=html;}}
S.getWindowSize=function(dimension){if(document.compatMode==="CSS1Compat")
return document.documentElement["client"+dimension];return document.body["client"+dimension];}
S.setOpacity=function(el,opacity){var style=el.style;if(supportsOpacity){style.opacity=(opacity==1?"":opacity);}else{style.zoom=1;if(opacity==1){if(typeof style.filter=="string"&&(/alpha/i).test(style.filter))
style.filter=style.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"");}else{style.filter=(style.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(opacity*100)+")";}}}
S.clearOpacity=function(el){S.setOpacity(el,1);}
function getTarget(e){var target=e.target?e.target:e.srcElement;return target.nodeType==3?target.parentNode:target;}
function getPageXY(e){var x=e.pageX||(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y=e.pageY||(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[x,y];}
function addEvent(el,type,handler){if(el.addEventListener){el.addEventListener(type,handler,false);}else{if(el.nodeType===3||el.nodeType===8)
return;if(el.setInterval&&(el!==window&&!el.frameElement))
el=window;if(!handler.__guid)
handler.__guid=addEvent.guid++;if((typeof el.events=="undefined")||!el.events)
el.events={};var handlers=el.events[type];if(!handlers){handlers=el.events[type]={};if(el["on"+type])
handlers[0]=el["on"+type];}
handlers[handler.__guid]=handler;el["on"+type]=addEvent.handleEvent;}}
addEvent.guid=1;addEvent.handleEvent=function(event){var result=true;event=event||addEvent.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var handlers=this.events[event.type];for(var i in handlers){this.__handleEvent=handlers[i];if(this.__handleEvent(event)===false){result=false;}}
return result;}
addEvent.preventDefault=function(){this.returnValue=false;}
addEvent.stopPropagation=function(){this.cancelBubble=true;}
addEvent.fixEvent=function(e){e.preventDefault=addEvent.preventDefault;e.stopPropagation=addEvent.stopPropagation;e.keyCode=e.which;return e;}
function removeEvent(el,type,handler){if(el.removeEventListener){el.removeEventListener(type,handler,false);}else{if(el.events&&el.events[type])
delete el.events[type][handler.__guid];}}
var loaded=false,DOMContentLoaded;if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);S.load();}}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);S.load();}}}
function doScrollCheck(){if(loaded)
return;try{document.documentElement.doScroll("left");}catch(e){setTimeout(doScrollCheck,1);return;}
S.load();}
function bindLoad(){if(document.readyState==="complete")
return S.load();if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",S.load,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",S.load);var topLevel=false;try{topLevel=window.frameElement===null;}catch(e){}
if(document.documentElement.doScroll&&topLevel)
doScrollCheck();}}
S.load=function(){if(loaded)
return;if(!document.body)
return setTimeout(S.load,13);loaded=true;S.onReady();if(!S.options.skipSetup)
S.setup();S.skin.init();}
S.plugins={};if(navigator.plugins&&navigator.plugins.length){var names=[];each(navigator.plugins,function(i,p){names.push(p.name);});names=names.join(',');S.plugins={fla:names.contains('Shockwave Flash'),qt:names.contains('QuickTime')};}else{var detectPlugin=function(name){var axo;try{axo=new ActiveXObject(name);}catch(e){}
return!!axo;}
S.plugins={fla:detectPlugin('ShockwaveFlash.ShockwaveFlash'),qt:detectPlugin('QuickTime.QuickTime')};}
var relAttr=/^(light|shadow)box/i,expando="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(selector){var links=[];if(!selector){var rel;var dataRel;each(document.getElementsByTagName("a"),function(i,el){rel=el.getAttribute("rel");dataRel=el.getAttribute("data-rel");if(dataRel&&relAttr.test(dataRel)){links.push(el);}else if(rel&&relAttr.test(rel)){links.push(el);}});}else{var type=typeof selector;if((type==="object"||type==="function")&&selector.length){for(var i=0;i<selector.length;++i){links[i]=selector[i];}}else{links.push(selector);}}
return links;}
S.setup=function(selector,options){each(S.select(selector),function(i,link){S.addCache(link,options);});}
S.teardown=function(selector){each(S.select(selector),function(i,link){S.removeCache(link);});}
S.addCache=function(link,options){var key=link[expando];if(key==undefined){key=cacheKey++;link[expando]=key;addEvent(link,"click",handleClick);}
S.cache[key]=S.makeObject(link,options);}
S.removeCache=function(link){removeEvent(link,"click",handleClick);delete S.cache[link[expando]];link[expando]=null;}
S.getCache=function(link){var key=link[expando];return(key in S.cache&&S.cache[key]);}
S.clearCache=function(){for(var key in S.cache)
S.removeCache(S.cache[key].link);S.cache={};}
function handleClick(e){S.open(this);if(S.gallery.length){e.preventDefault();}}

S.flash=(function(){var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7");}
catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always";}
catch(e){if(playerVersion[0]==6){fp6Crash=true;}}
if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX);}
catch(e){}}}
if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
catch(e){}}}
var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);/*@cc_on
   ie = true;
   @if (@_win32)
    windows = true;
   @elif (@_mac)
    mac = true;
   @end
  @*/return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac};}();var onDomLoad=function(){if(!ua.w3cdom){return;}
addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<scr"+"ipt id=__ie_ondomload defer=true src=//:></scr"+"ipt>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState);}}
catch(e){}}
if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions();}},10);}
if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);}
addLoadEvent(callDomLoadFunctions);}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions();}}
function callDomLoadFunctions(){if(isDomLoaded){return;}
if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t);}
catch(e){return;}}
isDomLoaded=true;if(timer){clearInterval(timer);timer=null;}
var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj);}
setVisibility(id,true);}
else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i]);}
else{displayAltContent(obj);}}}
else{setVisibility(id,true);}}}
function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue);}
else{e.setAttribute(a[i].nodeName,a[i].nodeValue);}}}
var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"));}}}
obj.parentNode.replaceChild(e,obj);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj);};addListener(win,"onload",fn);}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i.toLowerCase()!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}
else if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k]);}
else if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k]);}
else if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k]);}}}
for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l]);}}}
el.parentNode.replaceChild(e,el);r=e;}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id);}
else{win.attachEvent("onload",function(){removeObjectInIE(id);});}}
else{obj.parentNode.removeChild(obj);}}}
function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}
obj.parentNode.removeChild(obj);}}
function getElementById(id){var el=null;try{el=doc.getElementById(id);}
catch(e){}
return el;}
function createElement(el){return doc.createElement(el);}
function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}
h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl);}}}
function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s;}
var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2]);}
var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j]);}
for(var k in ua){ua[k]=null;}
ua=null;for(var l in swfobject){swfobject[l]=null;}
swfobject=null;});}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return;}
var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o;}
else if(typeof n.SetVariable!=UNDEF){r=n;}}}
return r;},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return;}
widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i];}}}
att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j];}}}
if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k];}
else{par.flashvars=k+"="+flashvarsObj[k];}}}}
addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}});}
else if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj);});}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr);}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q);}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)));}}}
return"";},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false;}}}};}();return swfobject;})();var jwControllerHeight=20;S.flv=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls)
this.height+=jwControllerHeight;this.width=obj.width?parseInt(obj.width,10):300;}
S.flv.ext=["flv","m4v"];S.flv.prototype={append:function(body,dims){var tmp=document.createElement('div');tmp.id=this.id;body.appendChild(tmp);var height=dims.innerHeight,width=dims.innerWidth,swf=S.path+"player.swf",version=S.options.flashVersion,express=S.path+"expressInstall.swf",flashvars=apply({file:this.obj.content,height:height,width:width,autostart:(S.options.autoplayMovies?"true":"false"),controlbar:(S.options.showMovieControls?"bottom":"none"),backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"},S.options.flashVars),params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,height,version,express,flashvars,params);},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id);},onWindowResize:function(){var dims=S.dimensions,el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth;}}
S.html=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):500;}
S.html.prototype={append:function(body,dims){var div=document.createElement("div");div.id=this.id;div.className="html";div.innerHTML=this.obj.content;body.appendChild(div);},remove:function(){var el=get(this.id);if(el)
remove(el);}}
S.iframe=function(obj,id){this.obj=obj;this.id=id;var overlay=get("sb-overlay");this.height=obj.height?parseInt(obj.height,10):overlay.offsetHeight;this.width=obj.width?parseInt(obj.width,10):overlay.offsetWidth;}
S.iframe.prototype={append:function(body,dims){var html='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" '+'width="100%" frameborder="0" marginwidth="0" marginheight="0" '+'style="visibility:hidden" onload="this.style.visibility=\'visible\'" '+'scrolling="auto" allowtransparency="true" src="/blank"></iframe>';body.innerHTML=html;},remove:function(){var el=get(this.id);if(el){remove(el);try{delete window.frames[this.id];}catch(err){}}},onLoad:function(){var win=window.frames[this.id];win.location.href=this.obj.content;}}
var pre,proxyId="sb-drag-proxy",dragData,dragProxy,dragTarget;function resetDrag(){dragData={x:0,y:0,startX:null,startY:null};}
function updateProxy(){var dims=S.dimensions;apply(dragProxy.style,{height:dims.innerHeight+"px",width:dims.innerWidth+"px"});}
function enableDrag(){resetDrag();var style=["position:absolute","cursor:move","background-color:"+(supportsOpacity?"transparent":"#fff;filter:alpha(opacity=0)")].join(";");S.appendHTML(S.skin.body,'<div id="'+proxyId+'" style="'+style+'"></div>');dragProxy=get(proxyId);updateProxy();addEvent(dragProxy,"mousedown",startDrag);}
function disableDrag(){if(dragProxy){removeEvent(dragProxy,"mousedown",startDrag);remove(dragProxy);dragProxy=null;}
dragTarget=null;}
function startDrag(e){e.preventDefault();var xy=getPageXY(e);dragData.startX=xy[0];dragData.startY=xy[1];dragTarget=get(S.player.id);addEvent(document,"mousemove",positionDrag);addEvent(document,"mouseup",endDrag);}
function positionDrag(e){var player=S.player,dims=S.dimensions,xy=getPageXY(e);var moveX=xy[0]-dragData.startX;dragData.startX+=moveX;dragData.x=Math.max(Math.min(0,dragData.x+moveX),dims.innerWidth-player.width);var moveY=xy[1]-dragData.startY;dragData.startY+=moveY;dragData.y=Math.max(Math.min(0,dragData.y+moveY),dims.innerHeight-player.height);apply(dragTarget.style,{left:dragData.x+"px",top:dragData.y+"px"});}
function endDrag(){removeEvent(document,"mousemove",positionDrag);removeEvent(document,"mouseup",endDrag);}
S.img=function(obj,id){this.obj=obj;this.id=id;this.ready=false;var self=this;pre=new Image();pre.onload=function(){self.height=obj.height?parseInt(obj.height,10):pre.height;self.width=obj.width?parseInt(obj.width,10):pre.width;self.ready=true;pre.onload=null;pre=null;}
pre.src=obj.content;}
S.img.ext=["bmp","gif","jpg","jpeg","png"];S.img.prototype={append:function(body,dims){var img=document.createElement("img");img.id=this.id;img.src=this.obj.content;img.style.position="absolute";var height,width;if(dims.oversized&&S.options.handleOversize=="resize"){height=dims.innerHeight;width=dims.innerWidth;}else{height=this.height;width=this.width;}
img.setAttribute("height",height);img.setAttribute("width",width);body.appendChild(img);},remove:function(){var el=get(this.id);if(el)
remove(el);disableDrag();if(pre){pre.onload=null;pre=null;}},onLoad:function(){var dims=S.dimensions;if(dims.oversized&&S.options.handleOversize=="drag")
enableDrag();},onWindowResize:function(){var dims=S.dimensions;switch(S.options.handleOversize){case"resize":var el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth;break;case"drag":if(dragTarget){var top=parseInt(S.getStyle(dragTarget,"top")),left=parseInt(S.getStyle(dragTarget,"left"));if(top+this.height<dims.innerHeight)
dragTarget.style.top=dims.innerHeight-this.height+"px";if(left+this.width<dims.innerWidth)
dragTarget.style.left=dims.innerWidth-this.width+"px";updateProxy();}
break;}}}
var qtControllerHeight=16,OBJECT=document.createElement("object");S.qt=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;if(S.options.showMovieControls)
this.height+=qtControllerHeight;this.width=obj.width?parseInt(obj.width,10):300;}
S.qt.ext=["dv","mov","moov","movie","mp4","avi","mpg","mpeg"];S.qt.prototype={append:function(body,dims){var opt=S.options,autoplay=String(opt.autoplayMovies),controls=String(opt.showMovieControls);var html="<object",movie={id:this.id,name:this.id,height:this.height,width:this.width,kioskmode:"true"};if("classid"in OBJECT&&"codeBase"in OBJECT){movie.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";movie.codeBase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";}else{movie.type="video/quicktime";movie.data=this.obj.content;}
for(var m in movie){html+=" "+m+'="'+movie[m]+'"';}
html+=">";var params={src:this.obj.content,scale:"aspect",controller:controls,autoplay:autoplay};for(var p in params){html+='<param name="'+p+'" value="'+params[p]+'">';}
html+="</object>";body.innerHTML=html;},remove:function(){try{document[this.id].Stop();}catch(e){}
var el=get(this.id);if(el){remove(el);}}}
S.swf=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):300;}
S.swf.ext=["swf"];S.swf.prototype={append:function(body,dims){var tmp=document.createElement("div");tmp.id=this.id;body.appendChild(tmp);var height=dims.innerHeight,width=dims.innerWidth,swf=this.obj.content,version=S.options.flashVersion,express=S.path+"expressInstall.swf",flashvars=S.options.flashVars,params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,height,version,express,flashvars,params);},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id);},onWindowResize:function(){var dims=S.dimensions,el=get(this.id);el.height=dims.innerHeight;el.width=dims.innerWidth;}}
var overlayOn=false,visibilityCache=[],pngIds=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],container,overlay,wrapper,doWindowResize=true;function animate(el,property,to,duration,callback){var isOpacity=(property=="opacity"),anim=isOpacity?S.setOpacity:function(el,value){el.style[property]=""+
value+"px";};if(duration==0||(!isOpacity&&!S.options.animate)||(isOpacity&&!S.options.animateFade)){anim(el,to);if(callback)
callback();return;}
var from=parseFloat(S.getStyle(el,property))||0;var delta=to-from;if(delta==0){if(callback)
callback();return;}
duration*=1000;var begin=now(),ease=S.ease,end=begin+duration,time;var interval=setInterval(function(){time=now();if(time>=end){clearInterval(interval);interval=null;anim(el,to);if(callback)
callback();}else{anim(el,from+ease((time-begin)/duration)*delta);}},10);}
function setSize(){if(typeof window.innerWidth!='undefined'){container.style.height=window.innerHeight+"px";container.style.width=window.innerWidth+"px";}else{container.style.height=S.getWindowSize("Height")+"px";container.style.width=S.getWindowSize("Width")+"px";}}
function setPosition(){container.style.top=document.documentElement.scrollTop+"px";container.style.left=document.documentElement.scrollLeft+"px";}
function toggleTroubleElements(on){if(on){each(visibilityCache,function(i,el){el[0].style.visibility=el[1]||'';});}else{visibilityCache=[];each(S.options.troubleElements,function(i,tag){each(document.getElementsByTagName(tag),function(j,el){visibilityCache.push([el,el.style.visibility]);el.style.visibility="hidden";});});}}
function toggleNav(id,on){var el=get("sb-nav-"+id);if(el)
el.style.display=on?"":"none";}
function toggleLoading(on,callback){var loading=get("sb-loading"),playerName=S.getCurrent().player,anim=(playerName=="img"||playerName=="html"||playerName=='iframe');if(on){S.setOpacity(loading,0);loading.style.display="block";var wrapped=function(){S.clearOpacity(loading);if(callback)
callback();}
if(anim){animate(loading,"opacity",1,S.options.fadeDuration,wrapped);}else{wrapped();}}else{var wrapped=function(){loading.style.display="none";S.clearOpacity(loading);if(callback)
callback();}
if(anim){animate(loading,"opacity",0,S.options.fadeDuration,wrapped);}else{wrapped();}}}
function buildBars(callback){var obj=S.getCurrent();get("sb-title-inner").innerHTML=obj.title||"";var close,next,play,pause,previous;if(S.options.displayNav){close=true;var len=S.gallery.length;if(len>1){if(S.options.continuous){next=previous=true;}else{next=(len-1)>S.current;previous=S.current>0;}}
if(S.options.slideshowDelay>0&&S.hasNext()){pause=!S.isPaused();play=!pause;}}else{close=next=play=pause=previous=false;}
toggleNav("close",close);toggleNav("next",next);toggleNav("play",play);toggleNav("pause",pause);toggleNav("previous",previous);var counter="";if(S.options.displayCounter&&S.gallery.length>1){var len=S.gallery.length;if(S.options.counterType=="skip"){var i=0,end=len,limit=parseInt(S.options.counterLimit)||0;if(limit<len&&limit>2){var h=Math.floor(limit/2);i=S.current-h;if(i<0)
i+=len;end=S.current+(limit-h);if(end>len)
end-=len;}
while(i!=end){if(i==len)
i=0;counter+='<a onclick="Shadowbox.change('+i+');"'
if(i==S.current)
counter+=' class="sb-counter-current"';counter+=">"+(++i)+"</a>";}}else{counter=[S.current+1,len].join('/');}}
get("sb-counter").innerHTML=counter;callback();}
function showBars(callback){var titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=0.35;titleInner.style.visibility=infoInner.style.visibility="";if(titleInner.innerHTML!="")
animate(titleInner,"marginTop",0,duration);animate(infoInner,"marginTop",0,duration,callback);}
function hideBars(anim,callback){var title=get("sb-title"),info=get("sb-info"),titleHeight=title.offsetHeight,infoHeight=info.offsetHeight,titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=(anim?0.35:0);animate(titleInner,"marginTop",titleHeight,duration);animate(infoInner,"marginTop",infoHeight*-1,duration,function(){titleInner.style.visibility=infoInner.style.visibility="hidden";callback();});}
function adjustHeight(height,top,anim,callback){var wrapperInner=get("sb-wrapper-inner"),duration=(anim?S.options.resizeDuration:0);animate(wrapper,"top",top,duration);animate(wrapperInner,"height",height,duration,callback);}
function adjustWidth(width,left,anim,callback){var duration=(anim?S.options.resizeDuration:0);animate(wrapper,"left",left,duration);animate(wrapper,"width",width,duration,callback);}
function setDimensions(height,width,forceMinWidth){var bodyInner=get("sb-body-inner"),height=parseInt(height),width=parseInt(width),topBottom=wrapper.offsetHeight-bodyInner.offsetHeight,leftRight=wrapper.offsetWidth-bodyInner.offsetWidth,maxHeight=overlay.offsetHeight,maxWidth=overlay.offsetWidth,padding=parseInt(S.options.viewportPadding)||20,preserveAspect=(S.player&&S.options.handleOversize!="drag");if(forceMinWidth){preserveAspect=false;}
return S.setDimensions(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect);}
var K={};K.markup=""+'<div id="sb-container">'+'<div id="sb-overlay"></div>'+'<div id="sb-wrapper">'+'<div id="sb-title">'+'<div id="sb-title-inner"></div>'+'</div>'+'<div id="sb-wrapper-inner">'+'<div id="sb-body">'+'<div id="sb-body-inner"></div>'+'<div id="sb-loading"></div>'+'</div>'+'</div>'+'<div id="sb-info">'+'<div id="sb-info-inner">'+'<div id="sb-counter"></div>'+'<div id="sb-nav">'+'<a id="sb-nav-close" onclick="Shadowbox.close()"></a>'+'<a id="sb-nav-next" onclick="Shadowbox.next()"></a>'+'<a id="sb-nav-play" onclick="Shadowbox.play()"></a>'+'<a id="sb-nav-pause" onclick="Shadowbox.pause()"></a>'+'<a id="sb-nav-previous" onclick="Shadowbox.previous()"></a>'+'</div>'+'</div>'+'</div>'+'</div>'+'</div>';K.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};K.init=function(){S.appendHTML(document.body,K.markup);K.body=get("sb-body-inner");container=get("sb-container");overlay=get("sb-overlay");wrapper=get("sb-wrapper");if(!supportsFixed)
container.style.position="absolute";if(!supportsOpacity){var el,m,re=/url\("(.*\.png)"\)/;each(pngIds,function(i,id){el=get(id);if(el){m=S.getStyle(el,"backgroundImage").match(re);if(m){el.style.backgroundImage="none";el.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+
m[1]+",sizingMethod=scale);";}}});}
var timer;addEvent(window,"resize",function(){if(timer){clearTimeout(timer);timer=null;}
if(open)
timer=setTimeout(K.onWindowResize,10);});}
K.onOpen=function(obj,callback){doWindowResize=false;container.style.display="block";setSize();var dims=setDimensions(S.options.initialHeight,S.options.initialWidth);adjustHeight(dims.innerHeight,dims.top);adjustWidth(dims.width,dims.left);if(S.options.showOverlay){overlay.style.backgroundColor=S.options.overlayColor;S.setOpacity(overlay,0);if(!S.options.modal)
addEvent(overlay,"click",S.close);overlayOn=true;}
if(!supportsFixed){setPosition();addEvent(window,"scroll",setPosition);}
toggleTroubleElements();container.style.visibility="visible";if(overlayOn){animate(overlay,"opacity",S.options.overlayOpacity,S.options.fadeDuration,callback);}else{callback();}}
K.onLoad=function(changing,callback){toggleLoading(true);while(K.body.firstChild)
remove(K.body.firstChild);hideBars(changing,function(){if(!open)
return;if(!changing)
wrapper.style.visibility="visible";buildBars(callback);});}
K.onReady=function(callback){if(!open)
return;var player=S.player,forceMinWidth=presetForceMinWidth(player),dims=setDimensions(player.height,player.width,forceMinWidth);var wrapped=function(){showBars(callback);}
switch(S.options.animSequence){case"hw":adjustHeight(dims.innerHeight,dims.top,true,function(){adjustWidth(dims.width,dims.left,true,wrapped);});break;case"wh":adjustWidth(dims.width,dims.left,true,function(){adjustHeight(dims.innerHeight,dims.top,true,wrapped);});break;default:adjustWidth(dims.width,dims.left,true);adjustHeight(dims.innerHeight,dims.top,true,wrapped);}}
K.onShow=function(callback){toggleLoading(false,callback);doWindowResize=true;}
K.onClose=function(){if(!supportsFixed)
removeEvent(window,"scroll",setPosition);removeEvent(overlay,"click",S.close);wrapper.style.visibility="hidden";var callback=function(){container.style.visibility="hidden";container.style.display="none";toggleTroubleElements(true);}
if(overlayOn){animate(overlay,"opacity",0,S.options.fadeDuration,callback);}else{callback();}}
K.onPlay=function(){toggleNav("play",false);toggleNav("pause",true);}
K.onPause=function(){toggleNav("pause",false);toggleNav("play",true);}
K.onWindowResize=function(){if(!doWindowResize)
return;setSize();var player=S.player,forceMinWidth=presetForceMinWidth(player),dims=setDimensions(player.height,player.width,forceMinWidth);adjustWidth(dims.width,dims.left);adjustHeight(dims.innerHeight,dims.top);if(player.onWindowResize)
player.onWindowResize();}
presetForceMinWidth=function(player){var forceMinWidth=undefined;if((player)&&player.hasOwnProperty('obj')&&player.obj.hasOwnProperty('forceminwidth')){if(player.obj.forceminwidth){forceMinWidth=true;}}
return forceMinWidth;}
S.skin=K;window['Shadowbox']=S;})(window);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORSHASHA', bundleError);}


/* LIBCORAUT */
try{
var Autocompleter=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:'inherit',maxChoices:10,injectChoice:null,customChoices:null,emptyChoices:null,visibleChoices:true,className:'autocompleter-choices',zIndex:42,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:', ',separatorSplit:/\s*[,;]\s*/,autoTrim:false,allowDupes:false,cache:true,relative:false},initialize:function(element,options){this.element=$(element);this.setOptions(options);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({'delay':this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter)this.filter=this.options.filter.bind(this);var mode=this.options.selectMode;this.typeAhead=(mode=='type-ahead');this.selectMode=(mode===true)?'selection':mode;this.cached=[];},build:function(){if($(this.options.customChoices)){this.choices=this.options.customChoices;}else{this.choices=new Element('ul',{'class':this.options.className,'styles':{'zIndex':this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,'after');this.relative=this.element.getOffsetParent();}
this.fix=new OverlayFix(this.choices);}
if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator;}
this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({'property':'opacity','link':'cancel','duration':200},this.options.fxOptions)).addEvent('onStart',Chain.prototype.clearChain).set(0);this.element.setProperty('autocomplete','off').addEvent('keydown',this.onCommand.bind(this)).addEvent('click',this.onCommand.bind(this,[false])).addEvent('focus',this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent('blur',this.toggleFocus.create({bind:this,arguments:false,delay:100}));},destroy:function(){if(this.fix)this.fix.destroy();this.choices=this.selected=this.choices.destroy();},toggleFocus:function(state){this.focussed=state;if(!state)this.hideChoices(true);this.fireEvent((state)?'onFocus':'onBlur',[this.element]);},onCommand:function(e){if(!e&&this.focussed)return this.prefetch();if(e&&e.key&&!e.shift){switch(e.key){case'enter':if(this.element.value!=this.opted)return true;if(this.selected&&this.visible){this.choiceSelect(this.selected);return!!(this.options.autoSubmit);}
break;case'up':case'down':if(!this.prefetch()&&this.queryValue!==null){var up=(e.key=='up');this.choiceOver((this.selected||this.choices)[(this.selected)?((up)?'getPrevious':'getNext'):((up)?'getLast':'getFirst')](this.options.choicesMatch),true);}
return false;case'esc':case'tab':this.hideChoices(true);break;}}
return true;},setSelection:function(finish){var input=this.selected.getAttribute('inputValue'),value=input;var start=this.queryValue.length,end=input.length;if(input.substr(0,start).toLowerCase()!=this.queryValue.toLowerCase())start=0;if(this.options.multiple){var split=this.options.separatorSplit;value=this.element.value;start+=this.queryIndex;end+=this.queryIndex;var old=value.substr(this.queryIndex).split(split,1)[0];value=value.substr(0,this.queryIndex)+input+value.substr(this.queryIndex+old.length);if(finish){var tokens=value.split(this.options.separatorSplit).filter(function(entry){return this.test(entry);},/[^\s,]+/);if(!this.options.allowDupes)tokens=[].combine(tokens);var sep=this.options.separator;value=tokens.join(sep)+sep;end=value.length;}}
this.observer.setValue(value);this.opted=value;if(finish||this.selectMode=='pick')start=end;this.element.selectRange(start,end);this.fireEvent('onSelection',[this.element,this.selected,value,input]);},showChoices:function(){var match=this.options.choicesMatch,first=this.choices.getFirst(match);this.selected=this.selectedValue=null;if(this.fix){var pos=this.element.getCoordinates(this.relative),width=this.options.width||'auto';this.choices.setStyles({'left':pos.left,'top':pos.bottom,'width':(width===true||width=='inherit')?pos.width:width});}
if(!first)return;if(!this.visible){this.visible=true;this.choices.setStyle('display','');if(this.fx)this.fx.start(1);this.fireEvent('onShow',[this.element,this.choices]);}
if(this.options.selectFirst||this.typeAhead||first.inputValue==this.queryValue)this.choiceOver(first,this.typeAhead);var items=this.choices.getChildren(match),max=this.options.maxChoices;var styles={'overflowY':'hidden','height':''};this.overflown=false;if(items.length>max){var item=items[max-1];styles.overflowY='scroll';styles.height=item.getCoordinates(this.choices).bottom;this.overflown=true;};this.choices.setStyles(styles);if(this.fix){this.fix.show();}
if(this.options.visibleChoices){var scroll=document.getScroll(),size=document.getSize(),coords=this.choices.getCoordinates();if(coords.right>scroll.x+size.x)scroll.x=coords.right-size.x;if(coords.bottom>scroll.y+size.y)scroll.y=coords.bottom-size.y;window.scrollTo(Math.min(scroll.x,coords.left),Math.min(scroll.y,coords.top));}},hideChoices:function(clear){if(clear){var value=this.element.value;if(this.options.forceSelect)value=this.opted;if(this.options.autoTrim){value=value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);}
this.observer.setValue(value);}
if(!this.visible)return;this.visible=false;if(this.selected)this.selected.removeClass('autocompleter-selected');this.observer.clear();var hide=function(){this.choices.setStyle('display','none');if(this.fix){this.fix.hide();}}.bind(this);if(this.fx)this.fx.start(0).chain(hide);else hide();this.fireEvent('onHide',[this.element,this.choices]);},prefetch:function(){var value=this.element.value,query=value;if(this.options.multiple){var split=this.options.separatorSplit;var values=value.split(split);var index=this.element.getSelectedRange().start;var toIndex=value.substr(0,index).split(split);var last=toIndex.length-1;index-=toIndex[last].length;query=values[last];}
if(query.length<this.options.minLength){this.hideChoices();}else{if(query===this.queryValue||(this.visible&&query==this.selectedValue)){if(this.visible)return false;this.showChoices();}else{this.queryValue=query;this.queryIndex=index;if(!this.fetchCached())this.query();}}
return true;},fetchCached:function(){return false;},update:function(tokens){this.choices.empty();this.cached=tokens;var type=tokens&&$type(tokens);if(!type||(type=='array'&&!tokens.length)||(type=='hash'&&!tokens.getLength())){(this.options.emptyChoices||this.hideChoices).call(this);}else{if(this.options.maxChoices<tokens.length&&!this.options.overflow)tokens.length=this.options.maxChoices;tokens.each(this.options.injectChoice||function(token){var choice=new Element('li',{'html':this.markQueryValue(token)});choice.inputValue=token;this.addChoiceEvents(choice).inject(this.choices);},this);this.showChoices();}},choiceOver:function(choice,selection){if(!choice||choice==this.selected)return;if(this.selected)this.selected.removeClass('autocompleter-selected');this.selected=choice.addClass('autocompleter-selected');this.fireEvent('onSelect',[this.element,this.selected,selection]);if(!this.selectMode)this.opted=this.element.value;if(!selection)return;this.selectedValue=this.selected.getAttribute('inputValue');if(this.overflown){var coords=this.selected.getCoordinates(this.choices),margin=this.options.overflowMargin,top=this.choices.scrollTop,height=this.choices.offsetHeight,bottom=top+height;if(coords.top-margin<top&&top)this.choices.scrollTop=Math.max(coords.top-margin,0);else if(coords.bottom+margin>bottom)this.choices.scrollTop=Math.min(coords.bottom-height+margin,bottom);}
if(this.selectMode)this.setSelection();},choiceSelect:function(choice){if(choice)this.choiceOver(choice);this.setSelection(true);this.queryValue=false;this.hideChoices();},filter:function(tokens){return(tokens||this.tokens).filter(function(token){return this.test(token);},new RegExp(((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp(),(this.options.filterCase)?'':'i'));},markQueryValue:function(str){return(!this.options.markQuery||!this.queryValue)?str:str.replace(new RegExp('('+((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp()+')',(this.options.filterCase)?'':'i'),'<span class="autocompleter-queried">$1</span>');},addChoiceEvents:function(el){return el.addEvents({'mouseover':this.choiceOver.bind(this,[el]),'click':this.choiceSelect.bind(this,[el])});}});var OverlayFix=new Class({initialize:function(el){this.element=$(el);this.relative=this.element.getOffsetParent();this.fix=new Element('iframe',{'frameborder':'0','scrolling':'no','src':'javascript:false;','styles':{'position':'absolute','border':'none','display':'none','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'}}).inject(this.element,'after');},show:function(){if(this.fix){var coords=this.element.getCoordinates(this.relative);delete coords.right;delete coords.bottom;this.fix.setStyles($extend(coords,{'display':'','zIndex':(this.element.getStyle('zIndex')||1)-1}));}
return this;},hide:function(){if(this.fix)this.fix.setStyle('display','none');return this;},destroy:function(){if(this.fix)this.fix=this.fix.destroy();}});Element.implement({getSelectedRange:function(){if(!Browser.Engine.trident)return{start:this.selectionStart,end:this.selectionEnd};var pos={start:0,end:0};var range=this.getDocument().selection.createRange();if(!range||range.parentElement()!=this)return pos;var dup=range.duplicate();if(this.type=='text'){pos.start=0-dup.moveStart('character',-100000);pos.end=pos.start+range.text.length;}else{var value=this.value;var offset=value.length-value.match(/[\n\r]*$/)[0].length;dup.moveToElementText(this);dup.setEndPoint('StartToEnd',range);pos.end=offset-dup.text.length;dup.setEndPoint('StartToStart',range);pos.start=offset-dup.text.length;}
return pos;},selectRange:function(start,end){if(Browser.Engine.trident){var diff=this.value.substr(start,end-start).replace(/\r/g,'').length;start=this.value.substr(0,start).replace(/\r/g,'').length;var range=this.createTextRange();range.collapse(true);range.moveEnd('character',start+diff);range.moveStart('character',start);range.select();}else{this.focus();this.setSelectionRange(start,end);}
return this;}});Autocompleter.Base=Autocompleter;
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORAUT', bundleError);}


/* LIBCORAUT */
try{
Autocompleter.Request=new Class({Extends:Autocompleter,options:{postData:{},ajaxOptions:{},postVar:'value'},query:function(){var data=$unlink(this.options.postData)||{};data[this.options.postVar]=this.queryValue;var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','');var cls=this.options.indicatorClass;if(cls)this.element.addClass(cls);this.fireEvent('onRequest',[this.element,this.request,data,this.queryValue]);this.request.send({'data':data});},queryResponse:function(){var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','none');var cls=this.options.indicatorClass;if(cls)this.element.removeClass(cls);return this.fireEvent('onComplete',[this.element,this.request]);}});Autocompleter.Request.JSON=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.JSON($merge({'url':url,'link':'cancel'},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(response){this.parent();this.update(response);}});Autocompleter.Request.HTML=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.HTML($merge({'url':url,'link':'cancel','update':this.choices},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this));},queryResponse:function(tree,elements){this.parent();if(!elements||!elements.length){this.hideChoices();}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(choice){var value=choice.innerHTML;choice.inputValue=value;this.addChoiceEvents(choice.set('html',this.markQueryValue(value)));},this);this.showChoices();}}});Autocompleter.Ajax={Base:Autocompleter.Request,Json:Autocompleter.Request.JSON,Xhtml:Autocompleter.Request.HTML};
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORAUT', bundleError);}


/* LIBCOROBS */
try{
var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(el,onFired,options){this.element=$(el)||$$(el);this.addEvent('onFired',onFired);this.setOptions(options);this.bound=this.changed.bind(this);this.resume();},changed:function(){var value=this.element.get('value');if($equals(this.value,value))return;this.clear();this.value=value;this.timeout=this.onFired.delay(this.options.delay,this);},setValue:function(value){this.value=value;this.element.set('value',value);return this.clear();},onFired:function(){this.fireEvent('onFired',[this.value,this.element]);},clear:function(){$clear(this.timeout||null);return this;},pause:function(){if(this.timer)$clear(this.timer);else this.element.removeEvent('keyup',this.bound);return this.clear();},resume:function(){this.value=this.element.get('value');if(this.options.periodical)this.timer=this.changed.periodical(this.options.periodical,this);else this.element.addEvent('keyup',this.bound);return this;}});var $equals=function(obj1,obj2){return(obj1==obj2||JSON.encode(obj1)==JSON.encode(obj2));};
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCOROBS', bundleError);}


/* LIBCORTIP */
try{
var Tips=new Class({Implements:[Events,Options],options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},title:'title',text:function(el){return el.get('rel')||el.get('href');},showDelay:100,hideDelay:100,className:null,offset:{x:16,y:16},fixed:false},initialize:function(){var params=Array.link(arguments,{options:Object.type,elements:$defined});if(params.options&&params.options.offsets)params.options.offset=params.options.offsets;this.setOptions(params.options);this.container=new Element('div',{'class':'tip'});this.tip=this.getTip();this.isHiddenObjects=false;if(params.elements)this.attach(params.elements);},getTip:function(){return new Element('div',{'class':this.options.className,styles:{visibility:'hidden',display:'none',position:'absolute',top:0,left:0}}).adopt(new Element('div',{'class':'tip-top'}),this.container,new Element('div',{'class':'tip-bottom'})).inject(document.body);},attach:function(elements){var read=function(option,element){if(option==null)return'';return $type(option)=='function'?option(element):element.get(option);};$$(elements).each(function(element){var title=read(this.options.title,element);element.erase('title').store('tip:native',title).retrieve('tip:title',title);element.retrieve('tip:text',read(this.options.text,element));var events=['enter','leave'];if(!this.options.fixed)events.push('move');events.each(function(value){element.addEvent('mouse'+value,element.retrieve('tip:'+value,this['element'+value.capitalize()].bindWithEvent(this,element)));},this);},this);return this;},detach:function(elements){$$(elements).each(function(element){['enter','leave','move'].each(function(value){element.removeEvent('mouse'+value,element.retrieve('tip:'+value)||$empty);});element.eliminate('tip:enter').eliminate('tip:leave').eliminate('tip:move');if($type(this.options.title)=='string'&&this.options.title=='title'){var original=element.retrieve('tip:native');if(original)element.set('title',original);}},this);return this;},elementEnter:function(event,element){$A(this.container.childNodes).each(Element.dispose);['title','text'].each(function(value){var content=element.retrieve('tip:'+value);if(!content)return;this[value+'Element']=new Element('div',{'class':'tip-'+value}).inject(this.container);this.fill(this[value+'Element'],content);},this);this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this,element);this.tip.setStyle('display','block');this.tip.setStyle('z-index','401');this.tip.setStyle('visibility','visible');this.position((!this.options.fixed)?event:{page:element.getPosition()});},elementLeave:function(event,element){$clear(this.timer);this.tip.setStyle('display','none');this.timer=this.hide.delay(this.options.hideDelay,this,element);},elementMove:function(event){this.position(event);},position:function(event){var size=window.getSize(),scroll=window.getScroll(),tip={x:this.tip.offsetWidth,y:this.tip.offsetHeight},props={x:'left',y:'top'},obj={};for(var z in props){var value=event.page[z]+this.options.offset[z];obj[props[z]]=value;if((value+tip[z]-scroll[z])>size[z]){value=event.page[z]-this.options.offset[z]-tip[z];if(value>=0){obj[props[z]]=value;}}}
this.tip.setStyles(obj);},hideObjects:function(){if(this.isHiddenObjects===false){$$('embed').each(function(embed){embed.set('wmode','transparent');});$$('param').each(function(param){if(param.get('name')=='wmode'){param.set('value','transparent');}});var divs=$$('#tfagAd_SKYSCRAPER div');if($empty!=divs){divs.each(function(div){div.setStyle('zIndex',-10000);});}
this.isHiddenObjects=true;}},fill:function(element,contents){if(typeof contents=='string')element.set('html',contents);else element.adopt(contents);},show:function(el){this.hideObjects();this.fireEvent('show',[this.tip,el]);},hide:function(el){this.fireEvent('hide',[this.tip,el]);}});
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORTIP', bundleError);}


/* LIBCORCAL */
try{
if(!Hc.translate){(function(){try{var src='/javascript/custom/addon/translatetool.js';var xhr=new XMLHttpRequest();xhr.open('GET',src,false);xhr.send(null);var se=document.createElement('script');se.type="text/javascript";se.text=xhr.responseText;se.setAttribute('data-creator','core/calendar');document.getElementsByTagName('head')[0].appendChild(se);}catch(e){}}());}
var Calendar=new Class({Implements:Options,options:{blocked:[],classes:[],days:['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],direction:0,draggable:true,months:['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],offset:0,pad:0,tweak:{x:0,y:0}},initialize:function(obj,options){if(!obj){return false;}
this.firstClick=true;this.setDefaultPad=false;this.pad=14;this.defaultPad=this.pad;this.highlightChanges=true;this.setOptions(options);var keys=['calendar','prev','next','month','year','today','invalid','valid','active','hover'];var values=keys.map(function(key,i){if(this.options.classes[i]){if(this.options.classes[i].length){key=this.options.classes[i];}}
return key;},this);this.classes=values.associate(keys);this.calendars=[];var id=0;var d=new Date();d.setDate(d.getDate()+this.options.direction.toInt());for(var i in obj){var button=$(i).getElementsByTagName('button')[0];var inputs=$(i).getElementsByTagName('input');var monthInput=$(i).getElement('.calendarMonthInput');var monthSelect=$(i).getElement('.calendarMonthLayer');var calendar=$(i).getElement('.calendar-pane');var calendarDays=$(i).getElement('.calendar-days');var cal={button:$(button),isContent:false,monthInput:$(monthInput),monthSelect:$(monthSelect),calendar:$(calendar),calendarDays:$(calendarDays),inputValue:inputs[1],el:inputs[0],els:[],id:id++,month:d.getMonth(),visible:false,year:d.getFullYear(),initialValue:inputs[0].value,onChange:$empty,monthDropdownInitialized:false};Hc.Calendar.setOptions(cal,this,$(i));var parent=$(monthSelect).getParent();if(parent){parent.addEvent('click',function(){Hc.Calendar.Holidayform.close();});};if($(cal.el).hasClass('changed')){this.highlightChanges=false;}
if(!this.element(inputs[0],obj[i],cal)){continue;}
cal.button.addEvent('click',function(cal){this.toggle(cal);}.pass(cal,this));cal.el.addEvent('click',function(cal){this.toggle(cal);}.pass(cal,this));cal.val=this.read(cal);for(var l=0;l<this.calendars.length;l++){var pad=Math.floor((cal.val-this.calendars[l].val)/1000/60/60/24);if(pad<this.defaultPad){this.defaultPad=pad;this.setDefaultPad=true;}}
this.calendars.push(cal);}
this.calendars.each(function(cal){$extend(cal,this.bounds(cal));$extend(cal,this.values(cal));if(2==this.options.direction){cal.monthSelect.getElements('.calendarOption').each(function(ele){var date=ele.getAttribute('value').split('/');var date=new Date(date[0],date[1]);var start=new Date(cal.start.getFullYear(),cal.start.getMonth());var end=new Date(cal.end.getFullYear(),cal.end.getMonth());if(date<start||date>end){ele.destroy();}});}
if(0.2==this.options.direction){cal.monthSelect.getElements('.calendarOption').each(function(ele){var date=ele.getAttribute('value').split('/');var date=new Date(date[0],date[1]);var start=new Date(cal.start.getFullYear(),cal.start.getMonth());var end=new Date(cal.end.getFullYear(),cal.end.getMonth());if(date<start||date>end){ele.destroy();}});}}.bind(this));},blocked:function(cal){var blocked=[];var offset=new Date(cal.year,cal.month,1).getDay();var last=new Date(cal.year,cal.month+1,0).getDate();this.options.blocked.each(function(date){var values=date.split(' ');for(var i=0;i<=3;i++){if(!values[i]){values[i]=(i==3)?'':'*';}
values[i]=values[i].contains(',')?values[i].split(','):new Array(values[i]);var count=values[i].length-1;for(var j=count;j>=0;j--){if(values[i][j].contains('-')){var val=values[i][j].split('-');for(var k=val[0];k<=val[1];k++){if(!values[i].contains(k)){values[i].push(k+'');}}
values[i].splice(j,1);}}}
if(values[2].contains(cal.year+'')||values[2].contains('*')){if(values[1].contains(cal.month+1+'')||values[1].contains('*')){values[0].each(function(val){if(val>0){blocked.push(val.toInt());}});if(values[3]){for(var i=0;i<last;i++){var day=(i+offset)%7;if(values[3].contains(day+'')){blocked.push(i+1);}}}}}},this);return blocked;},bounds:function(cal){if(2==this.options.direction){if($defined(cal.start)&&$defined(cal.end)){var arr=this.unformat(cal.start,'Y-m-d');var start=new Date(arr[0],arr[1],arr[2]);arr=this.unformat(cal.end,'Y-m-d');var end=new Date(arr[0],arr[1],arr[2]);return{'start':start,'end':end};}
var start=this.calendars[0].val;var end=this.calendars[this.calendars.length-1].val;return{'start':start,'end':end};}
var start=new Date(1000,0,1);var end=new Date(2999,11,31);var date=new Date().getDate()+this.options.direction.toInt();if(this.options.direction>0){start=new Date();start.setDate(date+this.options.pad*cal.id);}
if(this.options.direction<0){end=new Date();end.setDate(date-this.options.pad*(this.calendars.length-cal.id-1));}
if(0.2==this.options.direction){if($defined(cal.end)){var arr=this.unformat(cal.end,'Y-m-d');end=new Date(arr[0],arr[1],arr[2]);}else{end=this.calendars[this.calendars.length-1].val;}}
return{'start':start,'end':end};},caption:function(cal){cal.prev=$(cal.calendar.getElements('.prev')[0]);cal.next=$(cal.calendar.getElements('.next')[0]);cal.prev.addEvent('click',function(cal){this.navigate(cal,-1);}.pass(cal,this));cal.next.addEvent('click',function(cal){this.navigate(cal,1);}.pass(cal,this));this.fnSelect=function(e,kal){e.stop();var selectValue=e.target.getAttribute('value').split('/');kal.year=selectValue[0].toInt();kal.month=selectValue[1].toInt();this.selectDate(cal,e.target);if($empty!=cal.monthSelect){cal.monthSelect.hide();}
this.navigate(kal,0);}.create({'arguments':[cal],'bind':this,'event':true});if($empty!=cal.monthSelect){this.createMonthDropDown(cal);cal.monthSelect.getChildren().each(function(ele){ele.addEvent('click',this.fnSelect)}.bind(this));}},selectDate:function(cal,element){cal.monthInput.innerHTML=this.options.months[cal.month]+' '+cal.year;if($empty==cal.monthSelect){return;}
cal.monthSelect.getChildren().each(function(ele){ele.removeClass('calendarSelectedOption');});if($chk(element)){element.addClass('calendarSelectedOption');}else{cal.monthSelect.getChildren().each(function(ele){if(cal.year+'/'+cal.month==ele.getAttribute('value')){ele.addClass('calendarSelectedOption');}});}},changed:function(cal){cal.val=this.read(cal);$extend(cal,this.values(cal));if(!cal.val){return;}
if(cal.val.getDate()<cal.days[0]){cal.val.setDate(cal.days[0]);}
if(cal.val.getDate()>cal.days.getLast()){cal.val.setDate(cal.days.getLast());}
cal.els.each(function(el){el.value=this.format(cal.val,el.format);},this);this.check(cal);this.calendars.each(function(kal){if(kal.visible){this.display(kal);}},this);},check:function(cal){this.calendars.each(function(kal,i){if(kal.val){var change=false;if(i<cal.id){var bound=new Date(Date.parse(cal.val));bound.setDate(bound.getDate()-(this.options.pad*(cal.id-i)));if(bound<kal.val){change=true;}}
if(i>cal.id){var bound=new Date(Date.parse(cal.val));bound.setDate(bound.getDate()+(this.options.pad*(i-cal.id)));if(bound>kal.val){this.setDefaultPad=true;change=true;}}
if(change){if(kal.start>bound){bound=kal.start;}
if(kal.end<bound){bound=kal.end;}
kal.month=bound.getMonth();kal.year=bound.getFullYear();$extend(kal,this.values(kal));kal.val=kal.days.contains(bound.getDate())?bound:null;this.write(kal);if(kal.visible){this.display(kal);}}}
else{kal.month=cal.month;kal.year=cal.year;}},this);},clicked:function(td,day,cal){cal.val=new Date(cal.year,cal.month,day);this.write(cal);if($empty!=cal.onChange){cal.onChange();return;}
if(!cal.val){cal.val=this.read(cal);}
if(cal.val){this.check(cal);this.toggle(cal);}
else{td.addClass(this.classes.valid);td.removeClass(this.classes.active);}
if((this.firstClick||this.setDefaultPad)&&0==cal.id){var previousDate=cal.val;this.calendars.each(function(kal){if(0<kal.id){var d=new Date(previousDate);if(this.firstClick){var pad=this.pad;}
if(this.setDefaultPad){pad=this.defaultPad;}
kal.val=new Date(d.setDate(d.getDate()+pad));kal.month=kal.val.getMonth();kal.year=kal.val.getFullYear();this.write(kal);}}.bind(this));}
this.firstClick=false;this.setDefaultPad=false;},display:function(cal){cal.calendarDays.innerHTML='';var tr=new Element('div',{'class':'week'}).injectInside(cal.calendarDays);var d=new Date(cal.year,cal.month,1);var offset=((d.getDay()-this.options.offset)+7)%7;var last=new Date(cal.year,cal.month+1,0).getDate();var prev=new Date(cal.year,cal.month,0).getDate();var active=cal.val;var valid=cal.days;var invalid=[];this.calendars.each(function(kal,i){if(kal!=cal&&kal.val){if(cal.val){for(var day=1;day<=last;day++){d.setDate(day);if(1==this.options.direction&&i<cal.id&&d<kal.val){if(valid.contains(day)){valid.erase(day);}}}}}},this);var d=new Date();var today=new Date(d.getFullYear(),d.getMonth(),d.getDate()).getTime();for(var i=1;i<43;i++){if((i-1)%7==0){tr=new Element('div',{'class':'week'}).injectInside(cal.calendarDays);}
var td=new Element('span').injectInside(tr);var day=i-offset;var date=new Date(cal.year,cal.month,day);var cls='';if(active.getTime()==date.getTime()){cls=this.classes.active;}
else if(valid.contains(day)&&(0<=(date-today))){cls=this.classes.valid;}
else if((day>=1&&day<=last)||2==this.options.direction||0.2==this.options.direction||(0>(date-today))){invalid.push(day);cls=this.classes.invalid;if(date.getMonth()<cal.month){cls+=' invalidMonth';}}
if(date.getTime()==today){cls=cls+' '+this.classes.today;}
if(0==date.getDay()||6==date.getDay()){if(-1==cls.indexOf('invalid')){cls+=' weekend';}else{cls+=' invalidWeekend';}}
td.addClass(cls);if(!invalid.contains(day)){td.addEvent('click',function(td,day,cal){this.clicked(td,day,cal);}.pass([td,day,cal],this));}
td.addEvents({'mouseover':function(td,cls){td.addClass(cls);}.pass([td,this.classes.hover]),'mouseout':function(td,cls){td.removeClass(cls);}.pass([td,this.classes.hover])});if(day<1){day=prev+day;}
else if(day>last){day=day-last;}
td.appendText(day);}
cal.prev.setStyle('visibility','visible');cal.next.setStyle('visibility','visible');if(cal.isContent!==true&&$empty!=cal.monthSelect){var dateCurr=new Date(cal.year,cal.month,1);var selectFirst=cal.monthSelect.getFirst().getAttribute('value').split('/');var dateFirst=new Date(selectFirst[0].toInt(),selectFirst[1].toInt(),1);var selectLast=cal.monthSelect.getLast().getAttribute('value').split('/');var dateLast=new Date(selectLast[0].toInt(),selectLast[1].toInt(),1);if(dateCurr.getTime()<=dateFirst.getTime()){cal.prev.setStyle('visibility','hidden');}
if(dateCurr.getTime()>=dateLast.getTime()){cal.next.setStyle('visibility','hidden');}}},element:function(el,f,cal){if($type(f)=='object'){for(var i in f){if(!this.element(i,f[i],cal)){return false;}}
return true;}
el=$(el);if(!el){return false;}
el.format=f;el.readOnly=true;cal.els.push(el);return true;},format:function(date,format){var str='';if(date){var j=date.getDate();var w=date.getDay();var l=this.options.days[w];var n=date.getMonth()+1;var f=this.options.months[n-1];var y=date.getFullYear()+'';for(var i=0,len=format.length;i<len;i++){var cha=format.charAt(i);switch(cha){case'y':y=y.substr(2);case'Y':str+=y;break;case'm':if(n<10){n='0'+n;}
case'n':str+=n;break;case'M':f=f.substr(0,3);case'F':str+=f;break;case'd':if(j<10){j='0'+j;}
case'j':str+=j;break;case'D':if(jQuery("#hotelCalendarStyle").length>0){l=l.substr(0,3);}else{l=l.substr(0,2);}
case'l':str+=l;break;case'N':w+=1;case'w':str+=w;break;case'S':if(j%10==1&&j!='11'){str+='st';}
else if(j%10==2&&j!='12'){str+='nd';}
else if(j%10==3&&j!='13'){str+='rd';}
else{str+='th';}
break;default:str+=cha;}}}
return str;},navigate:function(cal,n){if($defined(n)){var month=cal.month+n;var year=cal.year;if(0>month){month=11;year--;}else if(12==month){month=0;year++;}
cal.month=month;cal.year=year;$extend(cal,this.values(cal));}
if($type(cal.months)=='array'){var i=cal.months.indexOf(cal.month);if(i<0){cal.month=cal.months[0];}}
this.selectDate(cal);this.display(cal);},read:function(cal){var arr=[null,null,null];cal.els.each(function(el){var values=this.unformat(cal.inputValue.value,'d.m.Y');values.each(function(val,i){if($type(val)=='number'){arr[i]=val;}});},this);if($type(arr[0])=='number'){cal.year=arr[0];}
if($type(arr[1])=='number'){cal.month=arr[1];}
var val=null;if(arr.every(function(i){return $type(i)=='number';})){var last=new Date(arr[0],arr[1]+1,0).getDate();if(arr[2]>last){arr[2]=last;}
val=new Date(arr[0],arr[1],arr[2]);}
return val;},sort:function(a,b){return a-b;},toggle:function(cal){document.removeEvent('mousedown',this.fn||$empty);cal.el.blur();Hc.Calendar.Holidayform.close();if(cal.visible){Hc.Calendar.Holidayform.doNotOpen=true;cal.visible=false;cal.button.removeClass(this.classes.active);if($empty!=cal.monthSelect){cal.monthSelect.hide();}
cal.calendar.toggle();}
else{if(!cal.monthDropdownInitialized){this.caption(cal);cal.monthDropdownInitialized=true;}
Hc.Calendar.Holidayform.doNotOpen=false;this.fn=function(e,cal){var e=new Event(e);var el=e.target;var stop=false;while(el!=document.body&&el.nodeType==1){if(el==cal.calendar){stop=true;}
if('holidaycalendar'==el.id){stop=true;}
this.calendars.each(function(kal){if(kal.button==el||kal.els.contains(el)){stop=true;}});if(stop){e.stop();return false;}
else{el=el.parentNode;}}
this.toggle(cal);}.create({'arguments':cal,'bind':this,'event':true});document.addEvent('mousedown',this.fn);this.calendars.each(function(kal,i){if(kal==cal){kal.visible=true;kal.button.addClass(this.classes.active);}else if(kal.visible){kal.visible=false;kal.button.removeClass(this.classes.active);kal.calendar.toggle();}},this);var dateSplit=cal.inputValue.value.split('.');cal.month=dateSplit[1]-1;cal.year=dateSplit[2];this.selectDate(cal);$extend(cal,this.values(cal));this.display(cal);cal.calendar.toggle();}},unformat:function(val,f){f=f.escapeRegExp();var re={d:'([0-9]{2})',j:'([0-9]{1,2})',D:'('+this.options.days.map(function(day){return day.substr(0,2);}).join('|')+')',l:'('+this.options.days.join('|')+')',S:'(st|nd|rd|th)',F:'('+this.options.months.join('|')+')',m:'([0-9]{2})',M:'('+this.options.months.map(function(month){return month.substr(0,3);}).join('|')+')',n:'([0-9]{1,2})',Y:'([0-9]{4})',y:'([0-9]{2})'}
var arr=[];var g='';for(var i=0;i<f.length;i++){var c=f.charAt(i);if(re[c]){arr.push(c);g+=re[c];}
else{g+=c;}}
var matches=val.match('^'+g+'$');var dates=new Array(3);if(matches){matches=matches.slice(1);arr.each(function(c,i){i=matches[i];switch(c){case'y':i='19'+i;case'Y':dates[0]=i.toInt();break;case'F':i=i.substr(0,3);case'M':i=this.options.months.map(function(month){return month.substr(0,3);}).indexOf(i)+1;case'm':case'n':dates[1]=i.toInt()-1;break;case'd':case'j':dates[2]=i.toInt();break;}},this);}
return dates;},value:function(cal){var day=null;if(cal.val){if(cal.year==cal.val.getFullYear()&&cal.month==cal.val.getMonth()){day=cal.val.getDate();}}
return day;},values:function(cal){var years,months,days;var first=1;var last=new Date(cal.year,cal.month+1,0).getDate();if(cal.year==cal.start.getFullYear()){if(months==null&&this.options.navigation==2){months=[];for(var i=0;i<12;i++){if(i>=cal.start.getMonth()){months.push(i);}}}
if(cal.month==cal.start.getMonth()){first=cal.start.getDate();}}
if(cal.year==cal.end.getFullYear()){if(months==null&&this.options.navigation==2){months=[];for(var i=0;i<12;i++){if(i<=cal.end.getMonth()){months.push(i);}}}
if(cal.month==cal.end.getMonth()){last=cal.end.getDate();}}
var blocked=this.blocked(cal);if($type(days)=='array'){days=days.filter(function(day){if(day>=first&&day<=last&&!blocked.contains(day)){return day;}});}
else{days=[];for(var i=first;i<=last;i++){if(!blocked.contains(i)){days.push(i);}}}
days.sort(this.sort);return{'days':days,'months':months,'years':years};},write:function(cal){cal.el.value=this.format(cal.val,cal.el.format);cal.inputValue.value=this.format(cal.val,'d.m.Y');if(this.highlightChanges){if(cal.el.value!=cal.initialValue){cal.el.addClass('changed');}else{cal.el.removeClass('changed');}}
if(jQuery("#hotelCalendarStyle").length>0){var dateValue=this.format(cal.val,cal.el.format);var dateValueSplit=dateValue.split('\.');var dateValueNew=dateValueSplit[0]+'.'+dateValueSplit[1]+'/'+dateValueSplit[2]+'/'+dateValueSplit[3];cal.el.value=dateValueNew;}
this.selectDate(cal);},createMonthDropDown:function(cal){var d=new Date();var ele=cal.monthSelect;var allMonths=this.options.months;var currentMonth=d.getMonth();var currentYear=d.getFullYear();for(var i=0;i<15;i++){if(currentMonth>11){currentMonth=0;currentYear++;}
var a=new Element('a',{'class':'calendarOption','href':'javascript:void(0)'});if(cal.inputValue.value.split('.')[1]-1==currentMonth&&cal.inputValue.value.split('.')[2]==currentYear){a.addClass('calendarSelectedOption');}
a.innerHTML=allMonths[currentMonth]+" "+currentYear;a.setAttribute('value',currentYear+"/"+currentMonth);ele.appendChild(a);currentMonth++;}}});Calendar.implement(new Events,new Options);
;}catch(bundleError){console.error('HC CLASSIC-JS LIBCORCAL', bundleError);}


/* CUSCORINI */
try{
if(Modernizr.video&&Modernizr.video.h264&&!(/MSIE/.test(navigator.userAgent))){document.documentElement.classList.add('h264');}else{document.documentElement.classList.add('no-h264');}
Modernizr.file=function(){var result=!!(window.File&&window.FileList&&window.FileReader);document.documentElement.classList.add(result?'file':'no-file');return result;};Modernizr.xhr2=function(){if(typeof XMLHttpRequest!="undefined"){var xhr=new XMLHttpRequest();var result=!!xhr.upload;}else{result=false;}
document.documentElement.classList.add(result?'xhr2':'no-xhr2');return result;};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORINI', bundleError);}


/* CUSCORINI */
try{
Shadowbox.playerId='sb-player';Shadowbox.customPlayers={};var oldGetPlayer=Shadowbox.getPlayer;Shadowbox.getPlayer=function(content){var q=content.indexOf("?");if(q>-1){content=content.substring(0,q);}
var ext,m=content.match(/[0-9a-z]+$/i);var ret=null;if(m){ext=m[0].toLowerCase();jQuery.each(Shadowbox.customPlayers,function(player,options){if(options.ext&&options.ext.contains(ext)){ret=player;return false;}});}
return ret||oldGetPlayer(content);};PopUpSkin={};PopUpSkin.init=function(){}
PopUpSkin.onLoad=function(changing,callback){callback();}
PopUpSkin.onReady=function(callback){callback();}
PopUpSkin.onShow=PopUpSkin.onReady;PopUpSkin.onOpen=PopUpSkin.onLoad;PopUpSkin.onClose=PopUpSkin.init;jQuery(document).bind('unblockElements',function(event,type){jQuery('.blockShadowElement').each(function(index){jQuery(this).addClass('displayNone');});});function initHcShadowbox(options)
{var defaultOptions={'openAsPopup':false,'closeText':'Schliessen'};var options=jQuery.extend(defaultOptions,options);jQuery(document).trigger('initShadowboxSkins',[options]);jQuery(document).trigger('initShadowboxPlayers',[options]);var oldShadowboxOpen=Shadowbox.open;var shadowboxReady=false;Shadowbox.open=function(obj){if(shadowboxReady){oldShadowboxOpen(obj);}else{jQuery(window).bind('shadowboxReady',function(){oldShadowboxOpen(obj);});}};window.addEvent('domready',function(){if(options.openAsPopup){Shadowbox.skin=PopUpSkin;Shadowbox.init();Shadowbox.open=function(obj){obj.player='popup';oldShadowboxOpen(obj);Shadowbox.close();};var shadowboxMakeObject=Shadowbox.makeObject;Shadowbox.makeObject=function(link,options){var object=shadowboxMakeObject(link,options);object.player='popup';return object;};}else{Shadowbox.init({'overlayOpacity':0.7,'animate':true,'animateFade':false},function(){setTimeout(function(){shadowboxReady=true;jQuery(window).trigger('shadowboxReady',[options]);},300);});}
jQuery(document).trigger('unblockElements');});}
var HcShadowboxFunctions={setDimensions:Shadowbox.setDimensions,hasFunction:function(funcName){if(typeof Shadowbox.player!='undefined'&&Shadowbox.player!=null&&typeof Shadowbox.player[funcName]=='function'){return true;}
return false;}};Shadowbox.setDimensions=function(height,width,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect){var obj={'height':height,'width':width,'maxHeight':maxHeight,'maxWidth':maxWidth,'topBottom':topBottom,'leftRight':leftRight,'padding':padding,'preserveAspect':preserveAspect};if(HcShadowboxFunctions.hasFunction('setDimensions')){obj=Shadowbox.player.setDimensions(obj);}
return HcShadowboxFunctions.setDimensions(obj.height,obj.width,obj.maxHeight,obj.maxWidth,obj.topBottom,obj.leftRight,obj.padding,obj.preserveAspect);};var ShadowboxLoadIframe=function(width,height,loadFunction,forceMinWidth)
{var params={player:"iframe",content:'',width:width,height:height}
if(forceMinWidth!==undefined){params['forceminwidth']=forceMinWidth;}
Shadowbox.open(params,{enableKeys:false});var existIframeCheck=function(){if(jQuery("#"+Shadowbox.playerId).length){loadFunction();}else{setTimeout(existIframeCheck,50);}};setTimeout(existIframeCheck,50);};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORINI', bundleError);}


/* CUSCORINI */
try{
jQuery(function(){jQuery('.offerPriceHint[rel*="tooltip"]').tooltip({'mouseoutDelay':0});});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORINI', bundleError);}


/* CUSCORMAI */
try{
var hasAccessibleLocalStorage=true;try{window.localStorage.setItem('hasAccessibleLocalStorage',1);}catch(e){hasAccessibleLocalStorage=false;}
Hc.GTMStore={Timeout:5000,Store:{},Event:{event:'event',eventCategory:'Store',eventAction:'StoreAction',eventLabel:'Page',nonInteraction:1},check:function(){if(Object.keys(this.Store).length>0){dataLayer.push(jQuery.extend(this.Store,this.Event));this.Store={};}}};Hc.log=function(message){};function gtmTrackEvent(category,action,label){dataLayer.push({event:"event",eventCategory:category,eventAction:action,eventLabel:label});}
var isMobile=(function(){var md;try{md=new MobileDetect(navigator.userAgent);}catch(e){md={is:function(){return false;},mobile:function(){return false;}};}
return{Android:function(){return md.is('AndroidOS');},BlackBerry:function(){return md.is('BlackBerryOS');},iOS:function(){return md.is('iOS');},Opera:function(){return md.is('Opera');},Windows:function(){return md.is('WindowsMobileOS')||md.is('WindowsPhoneOS');},any:function(){return md.mobile();}};}());function heatmapCount(url){function heatmapCountOnClick(e){r=Math.random();if(r>0.01)return true;if(!e){e=window.event;correction=1;}
else{correction=0;}
x=e.clientX+document.documentElement.scrollLeft-correction;y=e.clientY+document.documentElement.scrollTop-correction;if(x<0)x=0;if(y<0)y=0;var request=new Request({method:'get',url:url+'&x='+x+'&y='+y});request.send();return true;}
document.onclick=heatmapCountOnClick;}
function gaOnClickLinkName(link){var name='';var node=link;while(node){if(node.id){forbiddenId=node.id.match(/travelOfferList|Tooltip|blockDetails|Travel_|check_|vacancy_|offer_/);if(!forbiddenId){pagination=node.id.match(/_Pagination_/);if(pagination){linkNameParts=node.id.split('_Pagination_');name='/'+linkNameParts[0]+'_Pagination_1/A.1';break;}
list=node.id.match(/_List_/);if(list){linkNameParts=node.id.split('_List_');nummer=linkNameParts[1];if(nummer>3){nummer=3;}
name='/'+linkNameParts[0]+'_List_'+nummer+name;break;}
name='/'+node.id+name;break;}}
name='/'+getNodeIdentification(node)+name;node=node.parentNode;}
return name;}
function getNodeIdentification(node){var number=1;var sibling=node;var nodeName=node.nodeName;while(sibling.previousSibling){sibling=sibling.previousSibling;if(sibling.nodeName==nodeName){number++;}}
if(number>15){number=15;}
return nodeName+'.'+number;}
var analyticsUdn=null;var analyticsAccount=null;var analyticsOnClickUdn=null;var analyticsOnClickAccount=null;var controllerAction=null;var analyticsTrans=false;var utmOrderId=null;var utmOrderSum=null;var utmCountry=null;var utmHotelId=null;var utmHotelName=null;var utmCategory=null;var utmParticipants=null;var searchQuery=null;var analyticsCustomVars=[];function gaSetTransVars(utmOrderIdValue,utmOrderSumValue,utmCountryValue,utmHotelIdValue,utmHotelNameValue,utmCategoryValue,utmParticipantsValue)
{analyticsTrans=true;utmOrderId=utmOrderIdValue;utmOrderSum=utmOrderSumValue;utmCountry=utmCountryValue;utmHotelId=utmHotelIdValue;utmHotelName=utmHotelNameValue;utmCategory=utmCategoryValue;utmParticipants=utmParticipantsValue;}
function gaSetVars(analyticsUdnValue,analyticsAccountValue,analyticsOnClickUdnValue,analyticsOnClickAccountValue,controllerValue,actionValue,searchQueryValue,searchQueryTypeValue,testIdValue,testVariationValue,allowHashValue)
{analyticsUdn=analyticsUdnValue;analyticsAccount=analyticsAccountValue;analyticsOnClickUdn=analyticsOnClickUdnValue;analyticsOnClickAccount=analyticsOnClickAccountValue;allowHash=allowHashValue;controllerAction='/'+controllerValue+'/'+actionValue;searchQuery='';if(''!=searchQueryValue){searchQuery='?searchQuery='+searchQueryValue;searchQuery+='&searchQueryType='+searchQueryTypeValue;}
if(testIdValue&&testIdValue!=''&&testVariationValue!=''){if(searchQuery==''){searchQuery='?';}else{searchQuery+='&';}
searchQuery+='testId='+testIdValue+'&testVar='+testVariationValue;}}
function gaSetCustomVar(slot,name,value,scope){analyticsCustomVars.push({'slot':slot,'name':name,'value':value,'scope':scope});}
function _gaSetCustomVars(trackerName)
{try{analyticsCustomVars.each(function(data){_gaq.push([trackerName+'._setCustomVar',data['slot'],data['name'],data['value'],data['scope']]);});}catch(err){}}
var _gaq=_gaq||[];var gaTrackerInitiated=false;function gaInitTracker(){_gaq=_gaq||[];if(!gaTrackerInitiated){gaTrackerInitiated=true;_gaq.push(['analyticsAccount._setAccount',analyticsAccount],['analyticsOnClickAccount._setAccount',analyticsOnClickAccount],['_gat._anonymizeIp'],['analyticsAccount._setDomainName',analyticsUdn],['analyticsOnClickAccount._setDomainName',analyticsOnClickUdn],['analyticsAccount._setDetectTitle',false],['analyticsOnClickAccount._setDetectTitle',false],['analyticsAccount._setAllowHash',allowHash],['analyticsOnClickAccount._setAllowHash',allowHash]);}
var disableStr='ga-disable-'+analyticsAccount;if(document.cookie.indexOf(disableStr+'=true')>-1){window[disableStr]=true;}
return _gaq;}
function gaPageCount()
{var _gaq=gaInitTracker();if(controllerAction!=null&&controllerAction.indexOf('Bouncersurvey')>=0){return;}
try{_gaSetCustomVars('analyticsAccount');_gaq.push(['analyticsAccount._trackPageview',controllerAction+searchQuery]);_gaq.push(['analyticsAccount._trackPageLoadTime',controllerAction+searchQuery]);if(analyticsTrans){_gaq.push(['analyticsAccount._addTrans',utmOrderId,'Hc-Buchung',utmOrderSum,'0.00','0.00','','',utmCountry],['analyticsAccount._addItem',utmOrderId,utmHotelId,utmHotelName,utmCategory,utmOrderSum/utmParticipants,utmParticipants],['analyticsAccount._trackTrans']);}}catch(err){}}
function gaOnclickCountName(name)
{gaOnclickCountPage('/'+name);}
function gaOnclickCount(node)
{if(typeOf(node)=='string'){gaOnclickCountName(node)}else{try{gaOnclickCountPage(gaOnClickLinkName(node));}catch(err){}}}
function gaOnclickCountPage(page)
{var _gaq=gaInitTracker();try{_gaq.push(['analyticsOnClickAccount._trackPageview',controllerAction+page]);}catch(err){}}
function gaTrackEvent(category,action,optional_label,optional_value)
{var _gaq=gaInitTracker();try{if(!optional_label){optional_label=controllerAction;}
_gaq.push(['analyticsAccount._trackEvent',category,action,optional_label,optional_value]);}catch(err){}}
function trackGoogleConversion(conversionElementId,conversionId,conversionLanguage,conversionLabel)
{var element=document.createElement('img');element.setAttribute('height','1');element.setAttribute('width','1');element.setAttribute('border','0');element.setAttribute('src','https://www.googleadservices.com/pagead/conversion/'
+conversionId+'/?label='+conversionLabel+'&script=0');document.body.appendChild(element);}
function initSkyscraper(){try{skyfill();}catch(err){}}
jQuery(window).on("message",function(e){var iframe;if(e.data){var data=JSON.parse(e.data);if(data.id&&(iframe=jQuery("#"+data.id+" IFRAME"))){if(data.height!==undefined){iframe.css({height:data.height});}
if(data.width!==undefined){iframe.css({width:data.width});}}}});if(!window.console){window.console={log:function(){},error:function(){}};}
function reloadPage(relativeUrl)
{window.location.href=relativeUrl;}
function showPopUp(relativeUrl,name,width,height)
{var popUpParamString;switch(name){case'mhcprofile':width=680;height=600;break;case'contentlightbox':width=680;height=600;break;case'flighttimelightbox':width=800;height=650;break;case'organizerlightbox':width=800;height=250;break;case'traveltainmenthotelinfo':width=800;height=600;break;case'traveltainmentlegalterms':width=1000;height=650;break;case'gmhoteldetaillightbox':width=905;height=560;break;case'travelcontentlightbox':width=660;height=600;break;case'holidayautosagbusadistancespopup':width=1200;height=500;break;case'organizertermsian':width=980;height=520;break;case'tuevhoteldetaillightbox':width=1000;height=650;break;case'hotelinfo':width=900;height=670;break;case'offerinfott':case'offerinfobk':case'offerinfoia':case'offerinfohd':width=900;height=700;break;case'showHotelOnMap':if(!$defined(width)){width=902;}
if(!$defined(height)){height=554;}
break;}
if(!$defined(width)){width=650;}
if(!$defined(height)){height=500;}
popUpParamString='menubar=0,location=0,toolbar=0,status=0,'
+'resizable=0,dependent=1,scrollbars=yes,'
+'height='+height+',width='+width+';';var popup=window.open(relativeUrl,name,popUpParamString);popup.focus();};function reloadPopUpParent()
{if(opener){opener.location.reload();}}
function forwardPopUpParentLink(url)
{opener.location.href=url;self.close();}
function forwardPopUpParentLinkWithoutClosing(url)
{opener.location.href=url;event.returnValue=false;return false;}
function generatePageId(ajaxUrl,tempId,url)
{showLoadingAnimation();var htmlRequest=new Request.HTML({method:'post',url:ajaxUrl,data:{tempId:tempId,url:url},onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){hideLoadingAnimation();pageId=$('pageID');pageId.innerHTML=responseHTML;pageId.setStyle('backgroundImage','none');pageId.setStyle('fontWeight','bold');},onFailure:function(xhr){hideLoadingAnimation();}});htmlRequest.send();}
function addCustomParamToFormForAjax(form,paramName,paramValue)
{var elementAlreadyExists=false;form.getElements('input[name='+paramName+']').each(function(item,index){elementAlreadyExists=true;item.value=paramValue;});if(elementAlreadyExists==false){var element=document.createElement('input');element.name=paramName;element.value=paramValue;element.style.display='none';form.appendChild(element);}}
function showLoadingAnimation()
{jQuery('#globalSpinnerLayer').attr('class','displayBlock');jQuery('#globalSpinner').attr('class','displayBlock');}
function hideLoadingAnimation()
{jQuery('#globalSpinnerLayer').attr('class','displayNone');jQuery('#globalSpinner').attr('class','displayNone');}
function showLoadingAnimationForElement(elementID,info)
{var target=jQuery('#'+elementID);var width=target.width();var height=target.height();jQuery('<div class="elementSpinner" data-info="'+JSON.stringify(info||'')+'" for="'+elementID+'" style="width:'+width+'px; height:'+height+'px;"></div>').insertBefore(target);}
function hideLoadingAnimationForElement(elementID)
{jQuery('#'+elementID).attr('class','displayNone');}
function showLoadingAnimationFade(elementID)
{jQuery('#'+elementID).fadeTo("slow",0.6);}
function checkJwtSession(){if(Hc&&Hc.offline)return;var matches=document.location.host.match(/^.*\.([a-z]{2,10})(?::[0-9]*)?$/);if(document.location.host.match(/.pl/))return;if(matches&&matches[1]){var tld=matches[1];jQuery.ajax({type:'PUT',url:'https://www.holidaycheck.'+(tld||'de')+'/svc/urlauber-session-service/v1/sessions/current',cache:false,xhrFields:{withCredentials:true}});}}
jQuery(function(){jQuery(document).trigger('tryLogin',['docReady']);checkJwtSession();if(window.isMobile&&isMobile.any&&isMobile.any()){jQuery("#tfagAd_SKYSCRAPER").hide();jQuery("#tfagAd_BANNER").hide();}
setInterval('Hc.GTMStore.check()',Hc.GTMStore.Timeout);});jQuery(document).on('unload',function(){Hc.GTMStore.check();});var TreadyStorage=(function(){var PREFIX="hc_storage_";return{getItem:function(name){if(hasAccessibleLocalStorage)return window.localStorage.getItem(PREFIX+name);return Cookie.read(PREFIX+name);},setItem:function(name,value){if(hasAccessibleLocalStorage)return window.localStorage.setItem(PREFIX+name,value);Cookie.write(PREFIX+name,value,{duration:365});},erase:function(name){if(hasAccessibleLocalStorage)return window.localStorage.removeItem(PREFIX+name,value);Cookie.dispose(PREFIX+name);}};})();var globalLC=(function(){return{getItem:function(name){if(hasAccessibleLocalStorage)return window.localStorage.getItem(name);return Cookie.read(name);},setItem:function(name,value){if(hasAccessibleLocalStorage)return window.localStorage.setItem(name,value);Cookie.write(name,value,{duration:365});},erase:function(name){if(hasAccessibleLocalStorage)return window.localStorage.removeItem(name);Cookie.dispose(name);}};})();
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORMAI', bundleError);}


/* CUSCORADS */
try{
jQuery(document).bind('ready',function(){if(navigator.appName=='Microsoft Internet Explorer'){setTimeout(function(){jQuery('.tfagAd').each(function(i,temp){var slot=jQuery(temp);if(slot.height()>0){slot.css('display','block');}});},500);}
jQuery('.tfagAdTemp, .travelaudienceAdTemp').each(function(i,temp){temp=jQuery(temp);var id=temp.attr('id').replace('_temp','');var slot=jQuery('#'+id);var tempHeight=temp.height();if(slot.length==0){temp.remove();return;}
if(slot.length>1){slot=jQuery(slot[0]);}
if(id=='tfagAd_CONTENTAD'&&temp.find('.dc_headline').length==0){temp.remove();return;}
temp.find('script').remove();slot.append(temp.children());slot.removeClass('displayNone');slot.css('display','block');temp.remove();});});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORADS', bundleError);}


/* CUSCORADS */
try{
hc_adserver_backfill=function(zoneId)
{if(typeof zoneId!='number'){return false;}
var m3_u=(location.protocol=='https:'?'https://banner.holidaycheck.de/www/delivery/ajs.php':'http://banner.holidaycheck.de/www/delivery/ajs.php');var m3_r=Math.floor(Math.random()*99999999999);if(!document.MAX_used)document.MAX_used=',';document.write("<scr"+"ipt type='text/javascript' src='"+m3_u);document.write("?zoneid="+escape(zoneId));document.write('&amp;cb='+m3_r);if(document.MAX_used!=',')document.write("&amp;exclude="+document.MAX_used);document.write(document.charset?'&amp;charset='+document.charset:(document.characterSet?'&amp;charset='+document.characterSet:''));document.write("&amp;loc="+escape(window.location));if(document.referrer)document.write("&amp;referer="+escape(document.referrer));if(document.context)document.write("&context="+escape(document.context));if(document.mmm_fo)document.write("&amp;mmm_fo=1");document.write("'><\/scr"+"ipt>");};var AdServer=new Class({iterator:0,slots:[],registerSlot:function(slot){this.slots.push(slot);},render:function(){if(this.slots[this.iterator]){this.slots[this.iterator].render();}},next:function(){if(this.hasNext()){this.iterator++;return this.slots[this.iterator];}
return;},hasNext:function(){if(this.slots[this.iterator+1])return true;return false;}});var AdServerSlot=new Class({id:"",initialize:function(src,id){this.src=src;this.id=id;},render:function(){document.write("<"+"script type='text\/javascript'>"+"dw = document.write;"+"document.write = (function(einz) {"+"$('"+this.id+"').set('html',einz)"+"});"+"<\/scr"+"ipt>"+"<"+"script type='text\/javascript' src='"+this.src+"'"+">"+"<\/scr"+"ipt>"+"<"+"script type='text\/javascript'>"+"document.write = dw;"+"if(Hc.AdServer.hasNext()) Hc.AdServer.next().render();"+"<\/scr"+"ipt>");}});jQuery(document).ready(function(){"use strict";Hc.register("Hc.AdServer");Hc.AdServer=new AdServer();Hc.AdServer.render();});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORADS', bundleError);}


/* CUSCORAIE */
try{
window.automaticInlineExposureIn=function(id,subClass){jQuery('#'+id+'AIE').attr('class','automaticInlineExposure'+subClass);};window.automaticInlineExposureOut=function(id){jQuery('#'+id+'AIE').attr('class','displayNone');};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORAIE', bundleError);}


/* CUSCORCAL */
try{
Hc.register('Hc.Calendar');Hc.register('Hc.Calendar.Holidayform');Hc.Calendar.calendars=[];Hc.Calendar.minMax=new Hash();Hc.Calendar.add=function(id,minMax){if(0==Hc.Calendar.calendars.length){Hc.Calendar.calendars.push([]);}
var lastCalendar=Hc.Calendar.calendars.length-1;Hc.Calendar.calendars[lastCalendar].push(id);if(2==Hc.Calendar.calendars[lastCalendar].length){Hc.Calendar.calendars.push([]);}
Hc.Calendar.minMax.set(id,minMax);};Hc.Calendar.init=function(){Hc.Calendar.calendars.each(function(calendar){var siteId=jQuery('input[type=hidden][name=siteid]').val();if(siteId==6||siteId==7||siteId==8){if(2==calendar.length&&!calendar.isLoaded){var json='{"'+calendar[0]+'": "D. d.m.Y", "'+calendar[1]+'": "D. d.m.Y"}';var cal=new Calendar(JSON.decode(json),{offset:1,direction:1});calendar.isLoaded=true;}}else{if(2==calendar.length&&!calendar.isLoaded){var json='{"'+calendar[0]+'": "D. d.m.Y", "'+calendar[1]+'": "D. d.m.Y"}';var cal=new Calendar(JSON.decode(json),{offset:1,direction:1});calendar.isLoaded=true;}}});};Hc.Calendar.setOptions=function(calendar,calendarGroup,type){if(type.hasClass('calendarRaChannel')){}
if(type.hasClass('calendarContent')){calendar.isContent=true;calendar.monthSelect.destroy();calendar.monthSelect=$empty;calendarGroup.options.direction=0;}
if(type.hasClass('doSubmit')){calendar.onChange=function(){calendar.el.form.submit();};}
if(type.hasClass('calendarRaChannel')){calendarGroup.options.direction=.2;calendar.start=Hc.Calendar.minMax.get(type.id).min;calendar.end=Hc.Calendar.minMax.get(type.id).max;}
if(type.hasClass('calendarTravelbookingtt')){calendarGroup.options.direction=.2;calendar.onChange=function(){Hc.Rentedcar.update();calendarGroup.toggle(calendar);}
calendar.start='';calendar.end='';}};Hc.Calendar.Holidayform.loadInProgress=false;Hc.Calendar.Holidayform.doNotOpen=true;Hc.Calendar.Holidayform.parentId='';Hc.Calendar.Holidayform.link='';Hc.Calendar.Holidayform.textOpen='';Hc.Calendar.Holidayform.textClose='';Hc.Calendar.Holidayform.url='';Hc.Calendar.Holidayform.form=null;Hc.Calendar.Holidayform.load=function(url){if(Hc.Calendar.Holidayform.loadInProgress){return;}
Hc.Calendar.Holidayform.loadInProgress=true;var htmlRequest=new Request.HTML({method:'get',url:url,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){if(null!=Hc.Calendar.Holidayform.form){Hc.Calendar.Holidayform.form.destroy();Hc.Calendar.Holidayform.form=null;}
Hc.Calendar.Holidayform.form=new Element('div',{'id':'holidaycalendar','html':responseHTML});Hc.Calendar.Holidayform.loadInProgress=false;if(Hc.Calendar.Holidayform.doNotOpen){return;}
Hc.Calendar.Holidayform.open();Hc.Calendar.Holidayform.checkBoundingbox(jQuery);}});htmlRequest.send();};Hc.Calendar.Holidayform.checkBoundingbox=function($){var calendar=$('#holidaycalendar');var bounding=$('#hcContent');var calendarOffset=calendar.offset();var boundingOffset=bounding.offset();if(boundingOffset.left+bounding.outerWidth()<calendarOffset.left+calendar.outerWidth()){calendar.offset({left:boundingOffset.left+bounding.outerWidth()-calendar.outerWidth()});}
if(boundingOffset.left>calendarOffset.left){calendar.offset({left:boundingOffset.left});}};Hc.Calendar.Holidayform.loadData=function(formname,elementIds){if(Hc.Calendar.Holidayform.loadInProgress){return;}
var params='';var elements=Hc.Calendar.Holidayform.form.getElement('#'+formname).elements;if(elements){var valueArray=elementIds.split(',');for(var i=0;i<valueArray.length;i++){valueItem=trimString(valueArray[i]);if(elements[valueItem]){name=elements[valueItem].name;value=elements[valueItem].value;params+="&"+name+"="+value;}}}
Hc.Calendar.Holidayform.load(Hc.Calendar.Holidayform.url+params);};Hc.Calendar.Holidayform.toggle=function(link,parentId,textOpen,textClose){if(Hc.Calendar.Holidayform.loadInProgress){return;}
Hc.Calendar.Holidayform.parentId=parentId;Hc.Calendar.Holidayform.link=link;Hc.Calendar.Holidayform.textOpen=textOpen;Hc.Calendar.Holidayform.textClose=textClose;if(null==Hc.Calendar.Holidayform.form){Hc.Calendar.Holidayform.load(Hc.Calendar.Holidayform.url);return;}
if('none'==Hc.Calendar.Holidayform.form.getStyle('display')){Hc.Calendar.Holidayform.open();}else{Hc.Calendar.Holidayform.close();}};Hc.Calendar.Holidayform.open=function(){if(null==Hc.Calendar.Holidayform.form){return;}
Hc.Calendar.Holidayform.form.inject(Hc.Calendar.Holidayform.parentId);Hc.Calendar.Holidayform.form.setStyle('display','');$(Hc.Calendar.Holidayform.link).innerHTML=Hc.Calendar.Holidayform.textClose;setFocusLayer('holidaycalendar');};Hc.Calendar.Holidayform.close=function(){if(null==Hc.Calendar.Holidayform.form){return;}
Hc.Calendar.Holidayform.form.setStyle('display','none');$(Hc.Calendar.Holidayform.link).innerHTML=Hc.Calendar.Holidayform.textOpen;setFocusLayer(null);};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORCAL', bundleError);}


/* CUSCORCAS */
try{
cascadingDropdownOnChange=function(id,childId,childEmptyText,childDefaultText,childNoneOfThese,url)
{if(id==childId){return;}
var value=$(id).value;if(value==""){$(childId).disabled=false;cascadingDropdownUnfill(childId,childEmptyText);}else{var jsonRequest=new Request.JSON({method:'post',url:url,data:{parentId:value},onSuccess:function(responseJSON,responseText){if(responseText.length<5){responseJSON={};}
cascadingDropdownCallback(childId,childDefaultText,childNoneOfThese,responseJSON);var select=$(childId);if(value==-1){select.disabled=true;select.selectedIndex=select.length-1;if(select.onchange){select.onchange();}}else{select.disabled=false;}}});jsonRequest.send();}};cascadingDropdownCallback=function(id,defaultText,childNoneOfThese,options)
{var select=$(id);select.getElements('option').each(function(item,index){select.removeChild(item);});optionNode=new Option(defaultText,"",false,false);select.options[select.length]=optionNode;var objects=[];for(var key in options){objects.push({id:key,val:options[key]});}
objects.sort(function(a,b){if(a.val<b.val){return-1;}
if(a.val>b.val){return 1;}
return 0;});var i,len;for(i=0,len=objects.length;i<len;i++){optionNode=new Option(objects[i].val,objects[i].id,false,false);select.options[select.length]=optionNode;}
if(childNoneOfThese!=""){optionNode=new Option(childNoneOfThese,"-1",false,false);select.options[select.length]=optionNode;}
select.selectedIndex=0;if(select.onchange){select.onchange();}};cascadingDropdownUnfill=function(id,emptyText)
{var select=$(id);select.getElements('option').each(function(item,index){select.removeChild(item);});optionNode=new Option(emptyText,"",false,false);select.options[select.length]=optionNode;if(select.onchange){select.onchange();}};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORCAS', bundleError);}


/* CUSCORCHA */
try{
Hc.CharacterCounter=new Class({Implements:[Options],Binds:['onInput'],options:{ignorePatterns:[]},element:null,inputElement:null,text:'',validators:{},hideOnComplete:false,cutIfToLarge:false,initialize:function(element,options){element=$(element);this.element=element;var id=element.id;this.inputElement=$(id.replace('JsCharacterCounter',''));if(!this.inputElement){return;}
this.setOptions(options);this.inputElement.addEvent('keyup',this.onInput);var classNames=this.inputElement.className.split(' ');var validator;for(var i=0,len=classNames.length;i<len;i++){validator=classNames[i].split(':');if(2==validator.length){this.validators[validator[0]]=''+validator[1];}}
var text=this.element.get('text');if(-1<text.indexOf('{{reverse_count}}')){this.hideOnComplete=true;}
if($defined(this.validators['maxLength'])){this.cutIfToLarge=true;}
text=text.substitute({'min':this.validators['minLength'],'max':this.validators['maxLength'],'count':'{{count}}','reverse_count':'{{reverse_count}}'},/\\?\{+([^{}]+)\}+/g);this.text=text;this.updateCounter();},onInput:function(event){this.updateCounter();},updateCounter:function(){this.element.set('text',this.text);var inputText=this.inputElement.get('value');var inputTextClean=inputText;if(this.options.ignorePatterns.length){for(var i=0,len=this.options.ignorePatterns.length;i<len;i++){var pattern=new RegExp(this.options.ignorePatterns[i],'g');inputTextClean=inputTextClean.replace(pattern,'');}}
var count=inputTextClean.length;var max=this.validators['maxLength'];if(this.cutIfToLarge){if(count>=max){this.inputElement.set('value',this.inputElement.get('value').substr(0,max));this.element.addClass('jsCharacterCounterStoped');count=max;}else{this.element.removeClass('jsCharacterCounterStoped');}}
var reverseCount=this.validators['minLength']-count;this.element.render({count:count,reverse_count:reverseCount});if(this.hideOnComplete){if(0>=reverseCount){this.element.toggleOff();}else{this.element.toggleOn();}}},toElement:function(){return this.element;}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORCHA', bundleError);}


/* CUSCORCHE */
try{
var closeCheckLayer=false;var lastCheckLayer=false;var lastCheckLayerId='';var checkLayerSeparator='<br />';var checkLayerMaxLength=0;checkLayerShowing=function(id){if(lastCheckLayer){checkLayerClosing(lastCheckLayerId);lastCheckLayer=false;if(id!=lastCheckLayerId){checkLayerShowing(id);}}
else{lastCheckLayer=true;lastCheckLayerId=id;var layer=$(id+'Layer');layer.setStyle('display','block');var firstBoxChecked=false;$(id+'Layer').getElements('input[id^='+id+'_]').each(function(item,index){if(firstBoxChecked==false){item.focus();firstBoxChecked=true;}});}};checkLayerChangingInline=function(id){var values=new Array();var i=0;$(document.body).getElements('input[id^='+id+'_]').each(function(item,index){if(item.checked){values[i]=item.id.substr(item.id.lastIndexOf('_')+1);i++;}});var value='';values.each(function(key,index){if(value==''){value=key;}else{value=value+','+key;}});$(id).value=value;var display='';values.each(function(key,index){var itemName='';$(document.body).getElements('label[for='+id+'_'+key+']').each(function(item,index){itemName=item.innerHTML;});if(display==''){display=itemName;}else{display=display+checkLayerSeparator+itemName;if(checkLayerMaxLength&&display.length>checkLayerMaxLength){display=display.substr(0,checkLayerMaxLength-3)+"...";}}});if(display==''){display=$(id+'DefaultText').innerHTML;}
$(id+'Display').innerHTML=display;};checkLayerClosing=function(id){$(id+'Layer').setStyle('display','none');checkLayerChangingInline(id);};checkLayerDelayedClosing=function(id){closeCheckLayer=true;(function(){if(closeCheckLayer){checkLayerClosing(id);closeCheckLayer=false;lastCheckLayer=false;}}).delay(200);};checkLayerDelayedClosingAborting=function(){closeCheckLayer=false;};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORCHE', bundleError);}


/* CUSCORDAT */
try{
dateYearOnChange=function(id,childId,childEmptyText,childDefaultText,optionsMonth,yearsMonthMin,yearsMonthMax)
{var year=$(id).value;var select=$(childId);select.getElements('option').each(function(item,index){select.removeChild(item);});if(yearsMonthMin[year]===undefined){optionNode=new Option(childEmptyText,"",false,false);select.options[select.length]=optionNode;}else{var min=yearsMonthMin[year];var max=yearsMonthMax[year];optionNode=new Option(childDefaultText,"",false,false);select.options[select.length]=optionNode;for(var key in optionsMonth){if(key>=min&&key<=max){optionNode=new Option(optionsMonth[key],key,false,false);select.options[select.length]=optionNode;}}}
select.selectedIndex=0;};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORDAT', bundleError);}


/* CUSCORGAD */
try{
var gAdsSearch=function()
{var pageOptions;var pageOptionsDefault;var pageOptionsHotel;var pageOptionsClimate;var pageOptionsPV;var pageOptionsFullscreen;var pageOptionsCruise;var pageOptionsRegion;var pageOptionsCity;var adblockDefault;var adblock1;var adblock2;var adblock3;var adblock4;var adblock5;var keyword='';function _init(){pageOptionsDefault={'pubId':'pub-2111022521828631','query':'','channel':'8915820622','hl':'fr','linkTarget':'_blank'};adblockDefault={'container':'','number':'1','width':'652px','lines':'2','fontSizeTitle':'16px','fontSizeDomainLink':'14px','colorTitleLink':'#006FB7','colorDomainLink':'#006FB7','rolloverAdBackgroundColor':'#FAD73C','rolloverLinkBold':true,'rolloverLinkUnderline':'','rolloverLinkBackgroundColor':'','rolloverLinkColor':'','fontFamily':'arial','colorText':'#666666','colorAdBorder':'#B4B4B4','colorBackground':'#FFFFFF','titleBold':true,'siteLinks':true,'sellerRatings':true};var keyword=jQuery('#gAdsSearch-keyword').html();pageOptionsDefault.query=keyword;jQuery('.gAdsSearch').each(function(){_ads_create(this)});if(typeof adblock1!='undefined'){new google.ads.search.Ads(pageOptionsDefault,adblock1);}
if(typeof adblock2!='undefined'){new google.ads.search.Ads(pageOptionsDefault,adblock1,adblock2);}
if(typeof adblock3!='undefined'){new google.ads.search.Ads(pageOptionsDefault,adblock1,adblock2,adblock3);}
if(typeof adblock4!='undefined'){new google.ads.search.Ads(pageOptionsDefault,adblock1,adblock2,adblock3,adblock4);}
if(typeof adblock5!='undefined'){new google.ads.search.Ads(pageOptionsDefault,adblock1,adblock2,adblock3,adblock4,adblock5);}}
function _ads_create(param){idAds=jQuery(param).attr('id');if(idAds=='gAdsSearch-hotelIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;pageOptionsDefault.channel='5689025128';}
if(idAds=='gAdsSearch-hotelIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.number=3;pageOptionsDefault.channel='5689025128';}
if(idAds=='gAdsSearch-climate-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.number=3;pageOptionsDefault.channel='0365153436';}
if(idAds=='gAdsSearch-pictureFullscreen-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='988px';adblock1.number=3;pageOptionsDefault.channel='8284408501';}
if(idAds=='gAdsSearch-cruise-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.number=1;pageOptionsDefault.channel='1003185041';}
if(idAds=='gAdsSearch-cruise-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='316px';adblock2.number=3;pageOptionsDefault.channel='1003185041';}
if(idAds=='gAdsSearch-quicksearchIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='316px';adblock1.number=4;pageOptionsDefault.channel='9171812276';}
if(idAds=='gAdsSearch-city_region_countryIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='652px';adblock1.number=1;pageOptionsDefault.channel='7415877472';}
if(idAds=='gAdsSearch-city_region_countryIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='652px';adblock2.number=3;pageOptionsDefault.channel='7415877472';}
if(idAds=='gAdsSearch-hotelavisphotosIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='652px';adblock1.number=1;pageOptionsDefault.channel='5689025128';}
if(idAds=='gAdsSearch-hotelavisphotosIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='652px';adblock2.number=3;pageOptionsDefault.channel='5689025128';}
if(idAds=='gAdsSearch-hotelActivityIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='652px';adblock2.number=3;pageOptionsDefault.channel='7415877472';}
if(idAds=='gAdsSearch-cityIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='316px';adblock1.number=2;pageOptionsDefault.channel='9034257145';}
if(idAds=='gAdsSearch-cityIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='652px';adblock2.number=2;pageOptionsDefault.channel='9034257145';}
if(idAds=='gAdsSearch-regionIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='316px';adblock1.number=2;pageOptionsDefault.channel='1641581940';}
if(idAds=='gAdsSearch-regionIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='652px';adblock2.number=2;pageOptionsDefault.channel='1641581940';}
if(idAds=='gAdsSearch-countryIndex-1'){adblock1=jQuery.extend({},adblockDefault);adblock1.container=idAds;adblock1.width='652px';adblock1.number=1;pageOptionsDefault.channel='1090142277';}
if(idAds=='gAdsSearch-countryIndex-2'){adblock2=jQuery.extend({},adblockDefault);adblock2.container=idAds;adblock2.width='316px';adblock2.number=3;pageOptionsDefault.channel='1090142277';}
if(idAds=='gAdsSearch-hotelIndex-3'){adblock3=jQuery.extend({},adblockDefault);adblock3.container=idAds;adblock3.width='316px';adblock3.number=3;pageOptionsDefault.channel='5689025128';}}
return{init:function(){_init();}}}();jQuery(document).ready(function(){if(!(typeof google==="undefined")){if(!(typeof google.ads==="undefined")){gAdsSearch.init();}}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORGAD', bundleError);}


/* CUSCORGOO */
try{
var google_adnum=0;function google_ad_request_done(google_ads){var s='';var i;if(google_ads.length==0){return;}
if(google_ads[0].type=="flash"){s+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+
google_ad.image_width+'" HEIGHT="'+
google_ad.image_height+'"> <PARAM NAME="movie" VALUE="'+
google_ad.image_url+'">'+'<PARAM NAME="quality" VALUE="high">'+'<PARAM NAME="AllowScriptAccess" VALUE="never">'+'<EMBED src="'+
google_ad.image_url+'" WIDTH="'+
google_ad.image_width+'" HEIGHT="'+
google_ad.image_height+'" TYPE="application/x-shockwave-flash"'+' AllowScriptAccess="never" '+' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';}else if(google_ads[0].type=="html"){s+=google_ads[0].snippet;}else{if(google_ads.length>0){if(google_ads.length==1){classType='adSenseBlockSingle';}else if(google_ads.length==2){classType='adSenseBlockDouble';}else{classType='adSenseBlockMultiple';}
if((typeof window.google_ads_hc_positionid)=='undefined'){strId='';}else{strId=' id="'+window.google_ads_hc_positionid+'" ';}
s+='<div class="'+classType+'" '+strId+'>'+'<div class="adSenseAdsByGoogle"><a href=\"'+google_info.feedback_url+'\">Ads by Google</a></div>'+'<div class="adItems">';for(i=0;i<google_ads.length;i++){s+='<div class="adItem">';s+='<div class="adSenseHeader">'+'<a href="'+google_ads[i].url+'" onmouseout="window.status=\'\'"'+' onmouseover="window.status=\'go to '+google_ads[i].visible_url+'\';return true">'+
google_ads[i].line1+'</a>'+'</div>'+'<div class="adSenseDescription">'+'<p>'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</p>'+'</div>'+'<div class="adSenseLink">'+'<a href="'+google_ads[i].url+'" '+'onmouseout="window.status=\'\'"'+' onmouseover="window.status=\'go to '+google_ads[i].visible_url+'\';return true">'+
google_ads[i].visible_url+'</a>'+'</div>'+'</div><div class="clearFix"></div>';}
s+='</div>'+'</div><div class="clearFix"></div>';}
if(google_ads[0].bidtype=="CPC"){google_adnum=google_adnum+google_ads.length;}}
document.write(s);return;}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORGOO', bundleError);}


/* CUSCORGOO */
try{
(function(){window.GoogleMap=(function(){function GoogleMap(config,fixMarkers,mapElementId){this.fixMarkers=fixMarkers;this.mapElementId=mapElementId;this.apiKey=config.apiKey;this.signedUrl=config.signedUrl;this.language=config.language;this.channel=config.channel;this.maxLongitude=config.maxLon;this.minLongitude=config.minLon;this.maxLatitude=config.maxLat;this.minLatitude=config.minLat;this.latitude=config.lat;if(!this.latitude){this.latitude=0;}
this.longitude=config.lon;if(!this.longitude){this.longitude=0;}
this.action=config.action;this.icons=config.icons;this.iconUrl=config.iconUrl;this.regionId=config.regionId;this.cityId=config.cityId;this.display=config.display;this.zoomLevel=config.zoom;if(!this.zoomLevel){this.zoomLevel=0;}
this.hotelVisibility=false;this.poiVisibility=false;this.poiMarkers={};this.hotelMarkers={};this.hotelFixMarkers={};this.selectedItem=void 0;this.selectedItemMarker=void 0;this.infoWindow=void 0;this.infoWindowStatus=false;this.insertMarker=void 0;this.hotelRequestId=1000;this.poiRequestId=1000;this.scriptStatus=null;this.loadScript();}
GoogleMap.prototype.loadScript=function(){var _this=this;if(!window.google){return jQuery.getScript(this.signedUrl+'&language='+this.language).done(function(){_this.scriptStatus='done';return jQuery(document).trigger('googleMapsLoaded');}).fail(function(){return jQuery(document).trigger('googleMapsError');});}else{this.scriptStatus='done';return jQuery(document).trigger('googleMapsLoaded');}};GoogleMap.prototype.load=function(){var _this=this;if(this.scriptStatus==='done'){_this.initialize();}else{return jQuery(document).bind('googleMapsLoaded',function(){return _this.load();});}};GoogleMap.prototype.initialize=function(){var items,m,mapElement,mapOptions,mapTypeId,ne,sw,_this=this;this.poiSwitchElement=jQuery('#gmPoiSwitch');this.hotelSwitchElement=jQuery('#gmHotelSwitch');this.geoDataLat=jQuery('#geodataLat');this.geoDataLng=jQuery('#geodataLng');this.infoWindow=new window.google.maps.InfoWindow();if(this.mapElementId){mapElement=jQuery('#'+this.mapElementId);}else{mapElement=jQuery('#googleMap');}
if(mapElement){mapTypeId=google.maps.MapTypeId.ROADMAP;if(this.language==='de'||this.language==='pl'){mapTypeId=google.maps.MapTypeId.HYBRID;}
mapOptions={zoomControl:true,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL},mapTypeId:mapTypeId,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE,google.maps.MapTypeId.HYBRID]}};this.map=new window.google.maps.Map(mapElement.get(0),mapOptions);this.pano=this.map.getStreetView();google.maps.event.addListener(this.infoWindow,'closeclick',function(){return _this.infoWindowStatus=false;});google.maps.event.addListener(this.pano,'visible_changed',function(){if(_this.infoWindowStatus&&_this.pano.getVisible()){_this.infoWindow.close();return _this.infoWindow.open(_this.pano);}else if(_this.infoWindowStatus&&!_this.pano.getVisible()){_this.infoWindow.close();return _this.infoWindow.open(_this.map);}});switch(this.display){case"hotelWide":case"hotel":if(this.display==='hotelWide'){mapElement.css('width','615px');}
this.hotelVisibility=true;this.adjustMarkers(this.parseMarkers(this.fixMarkers),'hotel');this.setHotelFixMarkers();break;case"poi":this.poiVisibility=true;this.adjustMarkers(this.parseMarkers(this.fixMarkers),'poi');break;case"access":mapElement.css('width','622px');mapElement.css('height','420px');items=this.parseMarkers(this.fixMarkers);this.publishMarkers(items);for(m in items){if(this.geoDataLat&&this.geoDataLng){this.geoDataLat.attr('value',items[m].getPosition().lat());this.geoDataLng.attr('value',items[m].getPosition().lng());google.maps.event.addListener(items[m],'dragend',function(data){_this.geoDataLat.attr('value',data.latLng.lat());return _this.geoDataLng.attr('value',data.latLng.lng());});}
this.latitude=items[m].getPosition().lat();this.longitude=items[m].getPosition().lng();this.zoomLevel=14;}
break;case"detail":case"shadowbox":if(this.display==='detail'){mapElement.css('width','890px');mapElement.css('height','420px');}
this.selectedItem=this.fixMarkers[0];if(this.selectedItem&&this.selectedItem.type==='hotel'){if(this.poiSwitchElement){this.poiVisibility=true;}}
if(this.selectedItem&&this.action!=='insert'){this.publishSelected();}
if(this.display==='shadowbox'&&this.selectedItemMarker&&this.action!=='insert'){this.getMarkerInfo(this.selectedItemMarker);}
if(this.selectedItem){this.latitude=this.selectedItem.lat;}
if(this.selectedItem){this.longitude=this.selectedItem.lon;}
this.zoomLevel=16;google.maps.event.addListener(this.map,"idle",function(){var bounds,i,marker,_results;bounds=_this.map.getBounds();for(i in _this.hotelMarkers){marker=_this.hotelMarkers[i];if(marker){if(!bounds.contains(marker.getPosition())){_this.hotelMarkers[i]=void 0;marker.setMap(null);}}}
_results=[];for(i in _this.poiMarkers){marker=_this.poiMarkers[i];if(marker){if(!bounds.contains(marker.getPosition())){_this.poiMarkers[i]=void 0;_results.push(marker.setMap(null));}else{_results.push(void 0);}}else{_results.push(void 0);}}
return _results;});google.maps.event.addListener(this.map,"idle",function(){return _this.updateBounds();});}
if(this.action==='insert'){this.zoomLevel=14;if(this.cityId!==0){this.map.setCenter(new google.maps.LatLng(this.latitude,this.longitude));this.map.setZoom(this.zoomLevel);google.maps.event.addListenerOnce(this.map,"bounds_changed",function(){return _this.updateBounds();});google.maps.event.addListenerOnce(this.map,'bounds_changed',function(){return _this.initSwitches();});}else{sw=new google.maps.LatLng(this.minLatitude,this.minLongitude);ne=new google.maps.LatLng(this.maxLatitude,this.maxLongitude);this.map.fitBounds(new google.maps.LatLngBounds(sw,ne));}}else{if(this.zoomLevel===0){sw=new google.maps.LatLng(this.minLatitude,this.minLongitude);ne=new google.maps.LatLng(this.maxLatitude,this.maxLongitude);this.map.fitBounds(new google.maps.LatLngBounds(sw,ne));this.initSwitches();}else{this.map.setCenter(new google.maps.LatLng(this.latitude,this.longitude));this.map.setZoom(this.zoomLevel);google.maps.event.addListenerOnce(this.map,"bounds_changed",function(){return _this.updateBounds();});google.maps.event.addListenerOnce(this.map,'bounds_changed',function(){return _this.initSwitches();});}}}
return this.map;};GoogleMap.prototype.updateBounds=function(){var bounds;bounds=this.map.getBounds();this.minLongitude=bounds.getSouthWest().lng();this.minLatitude=bounds.getSouthWest().lat();this.maxLongitude=bounds.getNorthEast().lng();this.maxLatitude=bounds.getNorthEast().lat();if(this.poiSwitchElement.attr('checked')){this.updatePois(true);}
if(this.hotelSwitchElement.attr('checked')){return this.updateHotels(true);}};GoogleMap.prototype.initSwitches=function(){var _this=this;if(this.poiSwitchElement){this.poiSwitchElement.on('change',function(){return _this.updatePois(_this.poiSwitchElement.attr('checked'));});if(this.selectedItem&&this.selectedItem.type==='hotel'){this.updatePois(true);this.poiSwitchElement.attr('checked',true);}}
return this.hotelSwitchElement.on('change',function(){if(_this.hotelSwitchElement){return _this.updateHotels(_this.hotelSwitchElement.attr('checked'));}});};GoogleMap.prototype.updateHotels=function(checked){var jsonRequest,marker,relativeUrl,_this=this;if(checked){this.hotelRequestId++;relativeUrl='/map?action=updatehotel&maxLon='+this.maxLongitude+'&minLon='+this.minLongitude+'&maxLat='+this.maxLatitude+'&minLat='+this.minLatitude;if(this.regionId){relativeUrl+='&regionId='+this.regionId;}
if(this.cityId){relativeUrl+='&cityId='+this.cityId;}
relativeUrl+='&requestId='+this.hotelRequestId;return jsonRequest=jQuery.ajax({url:relativeUrl,dataType:"json",async:false,success:function(data){_this.hotelVisibility=true;_this.adjustMarkers(_this.parseMarkers(data.markers),'hotel');return _this.hotelSwitchElement.attr('checked',true);}});}else{this.hotelVisibility=false;for(marker in this.hotelMarkers){if(this.hotelMarkers[marker]){this.hotelMarkers[marker].setMap(null);}}
return this.hotelMarkers={};}};GoogleMap.prototype.updatePois=function(checked){var jsonRequest,marker,relativeUrl,_this=this;if(checked){this.poiRequestId++;relativeUrl='/map?action=updatepoi&maxLon='+this.maxLongitude+'&minLon='+this.minLongitude+'&maxLat='+this.maxLatitude+'&minLat='+this.minLatitude;if(this.regionId){relativeUrl+='&regionId='+this.regionId;}
if(this.cityId){relativeUrl+='&cityId='+this.cityId;}
relativeUrl+='&requestId='+this.poiRequestId;return jsonRequest=jQuery.ajax({url:relativeUrl,dataType:'json',async:false,success:function(data){_this.poiVisibility=true;_this.adjustMarkers(_this.parseMarkers(data.markers),'poi');return _this.poiSwitchElement.attr('checked',true);}});}else{this.poiVisibility=false;for(marker in this.poiMarkers){if(this.poiMarkers[marker]){this.poiMarkers[marker].setMap(null);}}
return this.poiMarkers={};}};GoogleMap.prototype.adjustMarkers=function(newMarkers,type){if(type==='hotel'){if(this.hotelVisibility===true){this.publishMarkers(newMarkers);}
this.hotelMarkers=jQuery.extend(this.hotelMarkers,newMarkers);}
if(type==='poi'){if(this.poiVisibility===true){this.publishMarkers(newMarkers);}
return this.poiMarkers=jQuery.extend(this.poiMarkers,newMarkers);}};GoogleMap.prototype.publishMarkers=function(markers){var i,_results;_results=[];for(i in markers){_results.push(markers[i].setMap(this.map));}
return _results;};GoogleMap.prototype.parseMarkers=function(jsonData){var data,marker,markers,_i,_len;markers={};for(_i=0,_len=jsonData.length;_i<_len;_i++){data=jsonData[_i];if((!this.selectedItem||this.selectedItem.id!==data.id)&&((data.type==='hotel'&&!this.hotelMarkers[data.id])||(data.type==='poi'&&!this.poiMarkers[data.id])||(data.type==='user'))){marker=this.createMarker(data);markers[marker.get('id')]=marker;}}
return markers;};GoogleMap.prototype.setHotelFixMarkers=function(){if(!this.hotelFixMarkers){if(this.hotelMarkers){return this.hotelFixMarkers=this.hotelMarkers;}}};GoogleMap.prototype.publishSelected=function(){var marker;marker=this.createMarker(this.selectedItem);this.selectedItemMarker=marker;return marker.setMap(this.map);};GoogleMap.prototype.createMarker=function(data){var marker,_this=this;marker=new google.maps.Marker();marker.setDraggable(data.draggable);if(data.ico===6){if(this.icons[data.ico]){marker.setIcon(new google.maps.MarkerImage(this.iconUrl+this.icons[data.ico],new google.maps.Size(42,42,'px','px')));}
marker.setZIndex(22);marker.setDraggable(false);}else if(data.type==='poi'){if(this.icons[data.ico]){marker.setIcon(new google.maps.MarkerImage(this.iconUrl+this.icons[data.ico],new google.maps.Size(22,31,'px','px')));}
if(this.icons[data.ico]){marker.setShadow(new google.maps.MarkerImage('https://media.holidaycheck.com/data/image/common/map/poi_shadow.png',null,null,new google.maps.Point(10,30)));}
marker.setZIndex(0);}else{if(this.icons[data.ico]){marker.setIcon(new google.maps.MarkerImage(this.iconUrl+this.icons[data.ico],new google.maps.Size(35,35,'px','px')));}
marker.setZIndex(1);}
marker.setTitle(data.label);marker.set('id',data.id);marker.set('type',data.type);marker.setPosition(new google.maps.LatLng(data.lat,data.lon));google.maps.event.addListener(marker,"click",function(){return _this.getMarkerInfo(marker);});return marker;};GoogleMap.prototype.getMarkerInfo=function(marker){var departureDateElement,htmlRequest,relativeUrl,returnDateElement,_this=this;relativeUrl='/map?action=gmdetail&id='+marker.get('id')+'&type='+marker.get('type')+'&view=site';if(this.display==='detail'||this.display==='shadowbox'){relativeUrl='/map?action=gmdetail&id='+marker.get('id')+'&type='+marker.get('type')+'&view=detail';}else if(marker.get('type')==='hoteluser'){departureDateElement=jQuery('#departureHidden');returnDateElement=jQuery('#returnHidden');if(departureDateElement&&returnDateElement){relativeUrl='/map?action=gmdetail&hotelId='+marker.get('id')+'&type=hoteluser&returnDate='+returnDateElement.attr('value')+'&departureDate='+departureDateElement.attr('value');}}
return htmlRequest=jQuery.ajax({url:relativeUrl,dataType:'html',success:function(data){_this.infoWindow.setContent(data);_this.infoWindow.setPosition(marker.getPosition());_this.infoWindowStatus=true;if(_this.pano.getVisible()){return _this.infoWindow.open(_this.pano);}else{return _this.infoWindow.open(_this.map);}}});};GoogleMap.prototype.addInsertMarker=function(){var marker;marker=new google.maps.Marker();marker.setDraggable(true);marker.setPosition(this.map.getCenter());marker.setMap(this.map);return this.insertMarker=marker;};GoogleMap.prototype.saveInsertMarker=function(relativeUrl,callback,successNotice){var htmlRequest,position,_this=this;if(this.insertMarker){position=this.insertMarker.getPosition();relativeUrl+='&lon='+position.lng()+'&lat='+position.lat();return htmlRequest=jQuery.ajax({url:relativeUrl,success:function(){alert(successNotice);if(callback){return callback();}}});}};return GoogleMap;})();window.addMarkerForInsert=function(){return map.addInsertMarker();};window.saveMarkerCoordinates=function(relativeUrl,successUrl,successNotice,confirmText){var callback,_this=this;callback=function(){if(successUrl){return location.href=successUrl;}};if(confirm(confirmText)){return map.saveInsertMarker(relativeUrl,callback,successNotice);}};window.resizeGoogleMap=function(){var gmContainerMap,gmControls,gmResizerSwitchEnlarge,gmResizerSwitchShrink,gmSelections,googleMap;googleMap=jQuery('#googleMap');gmContainerMap=googleMap.parent();gmSelections=jQuery('#locationMapElements');gmControls=jQuery('#gmControls');gmResizerSwitchEnlarge=jQuery('#gmResizerSwitchEnlarge');gmResizerSwitchShrink=jQuery('#gmResizerSwitchShrink');if(googleMap.css('width')==='425px'){if(gmContainerMap&&gmContainerMap.hasClass('locationMapMap')&&gmContainerMap.hasClass('floatRight')){gmContainerMap.css('width','615px');}
googleMap.css('width','615px');gmControls.css('width','615px');gmSelections.css('display','none');gmResizerSwitchShrink.css('display','block');return gmResizerSwitchEnlarge.css('display','none');}else{if(gmContainerMap&&gmContainerMap.hasClass('locationMapMap')&&gmContainerMap.hasClass('floatRight')){gmContainerMap.css('width','425px');}
googleMap.css('width','425px');gmControls.css('width','425px');gmSelections.css('display','block');gmResizerSwitchEnlarge.css('display','block');return gmResizerSwitchShrink.css('display','none');}};}).call(this);
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORGOO', bundleError);}


/* CUSCORHOT */
try{
Hc.register('Hc.Hotelinfobox');Hc.Hotelinfobox.initialize=function(id,url){this.id=id;this.url=url;};Hc.Hotelinfobox.updateCatalog=function(value,type){type=type||'long';if($chk(value)){var url=this.url+'&action=type'+type+'&code='+value;var id=this.id+'_1';showLoadingAnimation();var htmlRequest=new Request.HTML({method:'get',url:url,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){$(id).innerHTML=responseHTML;if(type==='long'){Shadowbox.clearCache();Shadowbox.init();Shadowbox.setup();var tooltipAjax=new Tips($$('.tooltipAjax'),{fixed:false,offset:{x:20,y:-20}});}else{Hc.Hotelinfobox.anchor();}
hideLoadingAnimation();},onFailure:function(xhr){hideLoadingAnimation();}});htmlRequest.send();}};Hc.Hotelinfobox.anchor=function(){window.location.href='#hotelinfos';};Hc.Hotelinfobox.toggleOn=function(){if(!(Browser.Engine.name=='trident'&&Browser.Engine.version==4)){return;}};Hc.Hotelinfobox.toggleOff=function(anchor){if(anchor){Hc.Hotelinfobox.anchor();}};Hc.Hotelinfobox.focus=function(value){function toggleOnOff(element,id,active){var elementInputLabel=$(id+'Label');element.setStyle('display','none');if(active){element.setStyle('display','block');elementInputLabel.addClass('current');}else{elementInputLabel.removeClass('current');}}
var element=$(this.id+'_1');if(null!=element){toggleOnOff(element,'hotelTravelCatalog',(value==1));};var element=$(this.id+'_2');if(null!=element){toggleOnOff(element,'hotelAmenities',(value==2));};var element=$(this.id+'_3');if(null!=element){toggleOnOff(element,'hotelProfile',(value==3));};var element=$(this.id+'_4');if(null!=element){toggleOnOff(element,'hotelNews',(value==4));};var element=$(this.id+'_5');if(null!=element){toggleOnOff(element,'hotelBenefit',(value==5));};};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORHOT', bundleError);}


/* CUSCORLAY */
try{
Hc.register('Hc.Layerform');Hc.Layerform.checked=false;Hc.Layerform.openCallback=false;Hc.Layerform.mousedown=function(event){var event=new Event(event);var element=$(event.target);var specialCase=false;if(('childs_0'==focusLayer||'childs_1'==focusLayer)){specialCase=true;}
if(!element.hasClass('productsearchInputLayerDivIcon')&&!element.hasClass('productsearchInputLayer')&&element.get('tag')!=='li'&&element.get('tag')!=='input'&&element.get('tag')!=='label'&&!element.hasClass('childOption')&&element.get('tag')!=='ul'||(element.hasClass('productsearchInputLayer')&&!element.getParent().hasClass('boxOpen')&&(element.getProperty('id').search('child')!=0))||(element.hasClass('productsearchInputLayerDivIcon')&&!element.getParent().hasClass('boxOpen'))){$$('div.boxOpen').removeClass('boxOpen');}
while(!element.hasClass('formProductsearch')&&element!=document.body&&element.nodeType==1){if(specialCase&&element.hasClass('childLayer')){event.stop();return false;}
if(element.hasClass('productsearchLayer')||element.hasClass('hotelfilterLayer')||element.hasClass('productsearchLayerSelect')){if(specialCase){element.getElements('.childLayer').each(function(child){child.hide();});}
if(element.get('id')=='target_2_layer'||element.get('id')=='target_0_layer'){return;}
event.stop();return false;}
element=$(element.parentNode);}
loopAllLayerforms("close","");};var zindexElement=null;Hc.Layerform.layers=new Hash();Hc.Layerform.open=function(id){if($chk($(id+"_layer_spinner"))&&$chk($(id+"_layer_spinner").innerHTML)){$(id+"_layer_spinner").setStyle('display','block');}
if(!Hc.Layerform.layers.has(id)){return false;}
var layer=Hc.Layerform.layers.get(id);layer.setStyle('display','block');layer.setStyle('visibility','visible');var leftX=getLayerLeftSpace(id,0);if(leftX>0){shiftLayerLeft(id,leftX);}
zindexElement=layer.getParent();var maxParent=15;var found=false;while(maxParent!=0){if(zindexElement.hasClass('productsearch')){zindexElement.setStyle('z-index','4');found=true;break;}
zindexElement=zindexElement.getParent();if(zindexElement.get('tag')=='body'){break;}
maxParent--;}
if(!found){zindexElement=null;}
if(Hc.Layerform.openCallback){Hc.Layerform.openCallback(id);}
if($chk($(id+"_layer_spinner"))&&$chk($(id+"_layer_spinner").innerHTML)){$(id+"_layer_spinner").setStyle('display','none');}
document.addEvent('mousedown',Hc.Layerform.mousedown);return true;};Hc.Layerform.close=function(id){if(!Hc.Layerform.layers.has(id)){return;}
var layer=Hc.Layerform.layers.get(id);if(zindexElement!=null){zindexElement.setStyle('z-index','3');zindexElement=null;}
submitLayer(id);if('block'==layer.getStyle('display')){layer.setStyle('display','none');layer.setStyle('visibility','hidden');}
if('termin'==id||'country'==id||'region'==id||'target_0'==id||'target_2'==id){Hc.Layerform.layers.erase(id);}};Hc.Layerform.submitOnClose=new Hash();loadLayerform=function(url,id,scrollToParams,callerObject,serviceUrlPrefix,siteId){if(callerObject){if(callerObject.getParent().hasClass('boxOpen')){callerObject.getParent().removeClass('boxOpen');return true;}
callerObject.getParent().addClass('boxOpen');}
if(Hc.Layerform.open(id)){return;}
var loadurl=url+"&value="+$(id+"_value").value;var htmlRequest=new Request.HTML({method:'get',url:loadurl,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){var layer=$(id+"_layer");layer.innerHTML='';var content=new Element('div');content.innerHTML=responseHTML;content.getElements('li').each(function(listItem){if(listItem.hasClass('layerSectionChoice')){if('trident'==Browser.Engine.name&&4==Browser.Engine.version){listItem.addEvents({'mouseenter':function(){listItem.addClass('hover');},'mouseleave':function(){listItem.removeClass('hover');}});}}});layer.appendChild(content);Hc.Layerform.layers.set(id,layer);Hc.Layerform.open(id);if(!serviceUrlPrefix||!siteId||id!='toprated'){return;}
var toprated=$(id+"_value").value;topratedAjax(toprated,serviceUrlPrefix,siteId);}});htmlRequest.send();};var focusLayer=null;var focusLayerException=0;var defaultValueLayer=null;var defaultValueNull="__null__";var defaultClassLayer=null;var changedClassLayer=null;var defaultValueLayerTemp=null;var defaultClassLayerTemp=null;var changedClassLayerTemp=null;getLayerLeftSpace=function(id,layerwidth){var leftPx=0;if(layerwidth<=0){layerwidth=0;if($chk($(id+"_layer"))){layerwidth=$(id+"_layer").offsetWidth;}}
var elementwidth=0;if($chk($(id))){elementwidth=$(id).offsetWidth;}
if(layerwidth>elementwidth){var mainwidth=0;if($chk($("mainSpecial"))){mainwidth=$("mainSpecial").offsetWidth;}else if($chk($("main"))){mainwidth=$("main").offsetWidth;}
var additionalWidth=0;if($chk($$("aside"))&&id!='durationKsi_0'){if($$("aside").length>0){var aside=$$("aside");if(aside[0]!=null){additionalWidth=aside[0].offsetWidth+10;}}}
var elementLeftPosition=0;if($chk($(id))&&id!='durationKsi_0'){elementLeftPosition=$(id).offsetLeft-10;if(elementLeftPosition<0){var obj=$(id);var curLeft=0;do{curLeft+=obj.offsetLeft;}while(obj=obj.offsetParent)
elementLeftPosition=curLeft;}
var child=$(id);var parentTagNode=child.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;var tagName=parentTagNode.tagName;if(tagName!="ASIDE"&&elementLeftPosition>10&&tagName!="BODY"){tagName=parentTagNode.parentNode.parentNode.parentNode.id;}
var idstring=new String(tagName);var result=idstring.match('custom__calendar_');if(tagName=="ASIDE"||result){elementLeftPosition=elementLeftPosition+mainwidth+additionalWidth;}}
var contentwidth=mainwidth+additionalWidth;if(contentwidth>0&&layerwidth>0&&elementLeftPosition>0){var widthleft=contentwidth-elementLeftPosition-5;if(layerwidth>=widthleft){var leftPx=layerwidth-elementwidth-23;}}}
return leftPx;};shiftLayerLeft=function(id,leftPx){if('adults_0'==id||'adults_1'==id){return;}
if(layer=$(id+"_layer")){layer.setStyle('left',"-"+leftPx+"px");}};setFocusLayer=function(id)
{if($chk(id)||id!="null"){focusLayer=id;}};setFocusLayerStyles=function(defaultValue,defaultClass,changedClass)
{defaultValueLayer=defaultValue;defaultClassLayer=defaultClass;changedClassLayer=changedClass;};setFocusLayerStylesTemp=function(defaultValue,defaultClass,changedClass)
{defaultValueLayerTemp=defaultValue;defaultClassLayerTemp=defaultClass;changedClassLayerTemp=changedClass;};setFocusLayerException=function(value)
{focusLayerException=value;};deleteAllLayerforms=function(exceptpost)
{loopAllLayerforms("delete",exceptpost);};loopAllLayerforms=function(action,exceptpost)
{loopAllLayerformsDivs(action);if(action=='close'||action=='delete'){document.removeEvent('mousedown',Hc.Layerform.mousedown);}
if(action=="delete"){loopAllLayerformsElements("input","_value",exceptpost);loopAllLayerformsElements("input","_type","");}};loopAllLayerformsElements=function(type,matchString,exceptpost)
{var forms=document.forms;var i=0;while(forms[i]){$(forms[i]).getElements(type).each(function(item,index){var idname=item.id;var idstring=new String(idname);var result=idstring.match(matchString);if(result){var element=$(idname);if($chk(element.parentNode)){if(!$chk(element.value)||matchString=="_help"){element.parentNode.removeChild(element);if(matchString=="_value"){var split=idname.split("_");if(split[0]&&split[1]){var typeid=split[0]+"_"+split[1]+"_type";if($chk($(typeid))){var typelement=$(typeid);if(typelement.parentNode){typelement.parentNode.removeChild(typelement);}}}}}}}});i++;}};loopAllLayerformsDivs=function(action){if('close'==action){Hc.Layerform.layers.each(function(layer,id){Hc.Layerform.close(id);});}else if('delete'==action){Hc.Layerform.layers.each(function(layer,id){var layer=$(id+'_layer');if($defined(layer)){layer.destroy();}});}};closeLayer=function(){if(focusLayerException==0){focusLayer=closeThisLayer(focusLayer);submitLayer(focusLayer);}};submitLayer=function(layer){var layerField=$(Hc.Layerform.submitOnClose.get(layer));if($chk(layerField)&&$chk(layerField.form)){gaTrackEvent('Suchmaske_Hotel','topratings_'+layerField.value);var location=window.location.href;var endPos=location.indexOf('?');var paginateAnchor='#paginateAnchor';location=location.replace(paginateAnchor,'');location=location.replace(/page=[0-99]*/,'');if(-1!=endPos){var firstPos=location.match(/\?toprated/gi);if(firstPos!=null){location=location.replace(/toprated=[0-9](-[0-9])*/,'');topratedElement='?&';location=location.replace(topratedElement,'?');window.location.href=location+'&'+layer+'='+layerField.value;}else{var topratedElement='';var locationSplit=location.split('&');for(var i=0;i<locationSplit.length;i++){if(locationSplit[i].match(/toprated=/gi)){var topratedElement=locationSplit[i];}}
if(topratedElement!=''){topratedElement='&'+topratedElement;location=location.replace(topratedElement,'');}
location=location+'&'+layer+'='+layerField.value;topratedElement='?&';location=location.replace(topratedElement,'?');window.location.href=location;}}else{window.location.href=location+'?'+layer+'='+layerField.value;}}};closeThisLayer=function(thisLayerId){thisLayerId=thisLayerId.replace('_layer','');if($chk(thisLayerId)&&$chk($(thisLayerId))){Hc.Layerform.close(thisLayerId);$(thisLayerId).getParent().removeClass('boxOpen');return null;}else{$(thisLayerId).hide();}
return thisLayerId;};setLayerValue=function(name,value,text,type,innerHtml,layerStyle,listenOnTemp){var layer=$(name);if(innerHtml&&$defined(layer)&&$chk(layer.get('text'))&&$chk(layer.innerHTML)){if('termin'==name||'country'==name||'region'==name){layer.set('text',text);}else{layer.innerHTML=text;}}
if($defined($(name+"_value"))){$(name+"_value").value=value;}
if($defined($(name+"_help"))){$(name+"_help").value=text;}
if($defined($(name+"_type"))&&type!=false){$(name+"_type").value=type;}
if(layerStyle==true){setLayerStyle(name,value,listenOnTemp);}
if($defined($(name+'-'+value))){var ele=$(name+'-'+value);if('radio'==ele.type){$(ele).getParent('.formBody').getElements('input[name='+ele.name+']').each(function(input){if('radio'==input.type){input.checked=false;input.getParent('.layerSectionChoice').removeClass('layerSectionChoiceSelected');}});}
ele.checked=true;ele.getParent('.layerSectionChoice').addClass('layerSectionChoiceSelected');}};setLayerHiddenTypeHelp=function(name,value,type)
{if($(name+"_help")){$(name+"_help").value=value;}
if($(name+"_type")){$(name+"_type").value=type;}};setLayerValueSelected=function(element,name,listenOnTemp)
{var value="";if($chk($(element.id+"_help_primary_value"))){value=$(element.id+"_help_primary_value").value;}
var text="";if($chk($(element.id+"_help_primary_text"))){text=$(element.id+"_help_primary_text").value;}
setLayerValue(name,value,text,false,true,true,listenOnTemp);if($chk($(element.id+"_help_secondary_text"))){var text=$(element.id+"_help_secondary_text").value;if($chk($(name))&&text!=""){$(name).innerHTML=text;}}
element=$(element);element.getParent().getElements('.productsearchLayerSelectedOption').each(function(ele){ele.removeClass('productsearchLayerSelectedOption');ele.addClass('productsearchLayerSelectOption');});element.removeClass('productsearchLayerSelectOption');element.addClass('productsearchLayerSelectedOption');};setLayerValueMerge=function(element,name,parentdefaulttext,valueSplitter,textSplitter,listenOnTemp,serviceUrlPrefix,siteId)
{element=$(element).getElement('input');if(!Hc.Layerform.checked&&!element.disabled){if(element.checked){element.checked=false;element.getParent('.layerSectionChoice').removeClass('layerSectionChoiceSelected');}else{element.checked=true;element.getParent('.layerSectionChoice').addClass('layerSectionChoiceSelected');}}else{if(!element.checked){element.getParent('.layerSectionChoice').removeClass('layerSectionChoiceSelected');}else{element.getParent('.layerSectionChoice').addClass('layerSectionChoiceSelected');}}
Hc.Layerform.checked=false;var value=element.value;var newValue=value;if($chk($(name+"_value"))){var current=$(name+"_value").value;var currentText=parentdefaulttext;if($chk($(name+"_help_primary_"+value))){currentText=$(name+"_help_primary_"+value).value;}
if($chk(current)&&current!="0"){var valueArray=current.split(valueSplitter);var i=0;newValue="";currentText="";while(valueArray[i]){var valueItem=trimString(valueArray[i]);if(i>0&&valueItem!=value&&newValue!=""){newValue=newValue+valueSplitter;}
if(valueItem!=value){newValue=newValue+valueItem;}
i++;}
if(element.checked==true){newValue=newValue+valueSplitter+value;}
var valueArray=newValue.split(valueSplitter);valueArray=valueArray.sort(sortNumber);newValue="";currentText="";i=0;while(valueArray[i]){var valueItem=trimString(valueArray[i]);if(i>0){newValue=newValue+valueSplitter;currentText=currentText+textSplitter;}
newValue=newValue+valueItem;var itemText=valueItem;if($chk($(name+"_help_primary_"+valueItem))){itemText=$(name+"_help_primary_"+valueItem).value;}
currentText=currentText+itemText;i++;}}
if(newValue==""){newValue=0;currentText=parentdefaulttext;}
$(name+"_value").value=newValue;$(name).innerHTML=currentText;}
setLayerStyle(name,newValue,listenOnTemp);if(name=='toprated'){if(!serviceUrlPrefix||!siteId){return;}
topratedAjax(newValue,serviceUrlPrefix,siteId);}else if(name=='toprated_0'||name=='specialrequest_0'){var counterArray=0;if(typeof newValue=='string'){counterArray=newValue.split(';');}
if(counterArray.length>1){var criteria='{{number}} Kriterien gewählt';if(counterArray.length>4){var criteria='{{number}} Kriterien gewählt';}
var replaceElement='{{number}}';criteria=criteria.replace(replaceElement,counterArray.length);$(name).innerHTML=criteria;}else if(counterArray.length==1){$(name).innerHTML='1 Kriterium gewählt';}
if(newValue==0){$(name).innerHTML='beliebig';}}
else if(name=='room_0'){var counterArray=0;if(typeof newValue=='string'){counterArray=newValue.split(';');}
if(counterArray.length>1){var roomtype='{{number}} Zimmertypen gewählt';var replaceElement='{{number}}';roomtype=roomtype.replace(replaceElement,counterArray.length);$(name).innerHTML=roomtype;}else if(counterArray.length==1){$(name).innerHTML='1 Zimmertyp gewählt';}
if(newValue==0){$(name).innerHTML='alle Zimmertypen';}}};function topratedAjax(toprated,hotelAttributesSearchUrlPrefix,siteId){var rid=document.getElementById('regionId').options[document.getElementById('regionId').selectedIndex].value;var oid=document.getElementById('cityId').options[document.getElementById('cityId').selectedIndex].value;var stars=document.getElementById('stars').options[document.getElementById('stars').selectedIndex].value;var traveledwith=document.getElementById('traveledwith').options[document.getElementById('traveledwith').selectedIndex].value;var offers=document.getElementById('offers').checked;var locationType='regionId';var locationId=rid;if(oid>0){var locationType='cityId';var locationId=oid;}
var url=hotelAttributesSearchUrlPrefix+'hc.hotelAttributesSearch?'+locationType+'='+locationId;var strTypes=toprated.replace(/-/g,',');if(strTypes!='0'){url=url+'&types='+strTypes;}
if(stars!='0'){url=url+'&stars='+stars;}
if(traveledwith!='0'){url=url+'&traveledwith='+traveledwith;}
if(offers==true){url=url+'&offers='+siteId;}
var htmlRequest=new Request.JSON({method:'get',url:url,onSuccess:function(responseJSON,responseText){$('topratedSumAjax').innerHTML=responseJSON.results;}});htmlRequest.send();var counterArray=strTypes.split(',');if(counterArray.length>1){var criteria='{{number}} Kriterien gewählt';if(counterArray.length>4){var criteria='{{number}} Kriterien gewählt';}
var replaceElement='{{number}}';criteria=criteria.replace(replaceElement,counterArray.length);$('toprated').innerHTML=criteria;}else if(counterArray.length==1){$('toprated').innerHTML='1 Kriterium gewählt';}
if(strTypes==0){$('toprated').innerHTML='beliebig';}}
setLayerValueFromMultiLayers=function(parentname,parentdefaulttext,valueSplitter,textSplitter,multilayers,spanStyle,kid,kids)
{var text=[];var value=[];var layersArray=multilayers.split(",");var i=0;while(layersArray[i]){layername=trimString(layersArray[i]);if($defined($(layername+"_value"))){var toSend=$(layername+"_value").value;var toShow=$(layername+"_help").value;if(0<toSend){value.push(toSend);if('childs_0'==parentname||'childs_1'==parentname){text.push(toShow.replace(/\s/g,''));}else{text.push(toShow);}}}
i++;}
if(0==value.length){value=defaultValueLayer;text=parentdefaulttext;}else{value=value.join(valueSplitter);if('recotraveller_0'==parentname||'recotraveller_1'==parentname||'recommandation_0'==parentname||'recommandation_1'==parentname){text=text.join('<br/>');}else{if(1==text.length){outputtext=kid;}
else{outputtext=kids;}
text=text.length+' '+outputtext;}}
setLayerValue(parentname,value,text,"",true,true,false);};setLayerStyle=function(name,value,listenOnTemp){var element=$(name);if(!$defined(element)||name!=element.id){return;}
if(listenOnTemp==true&&defaultValueLayerTemp!=null&&defaultClassLayerTemp!=null&&changedClassLayerTemp!=null){if(defaultValueLayerTemp!=value){element.className=changedClassLayerTemp;}
else{element.className=defaultClassLayerTemp;}}
else if(defaultValueLayer!=null&&defaultClassLayer!=null&&changedClassLayer!=null){if(defaultValueLayer!=value){element.className=changedClassLayer;}
else{element.className=defaultClassLayer;}}};setStyleInputSuggest=function(id,defaultValue,defaultText,defaultClass,changedClass)
{var idValue=id+'_value';var idInput=id+'_help';var idType=id+'_type';if($chk($(idValue))&&$chk($(idInput))){var value=$(idValue).value;var inputParent=$(idInput).parentNode;var help='';if($defined(value)){help=$(idInput).value;if(help!=''){value=help;}
else{value=defaultValue;}}
if(inputParent){if(value!=defaultValue){inputParent.className=changedClass;if(help!=''){$(idValue).value=help;$(idType).value='user';}else{if($(idType).value=='user'){$(idType).value='id';}}}else{inputParent.className=defaultClass;$(idInput).value=defaultText;$(idValue).value=defaultValue;}}}};trimString=function(s){while(s.substring(0,1)==' '){s=s.substring(1,s.length);}
while(s.substring(s.length-1,s.length)==' '){s=s.substring(0,s.length-1);}
return s;};sortNumber=function(a,b)
{return a-b;};setTextIfOneValue=function(parentname,parentsplitter,idSuffixText){if($(parentname+"_value").value&&-1!=$(parentname+"_value").value){var parentValue=$(parentname+"_value").value;var values=parentValue.split(parentsplitter);var items=0;while(values[items]){items++;}
if(items==1){var text=$(idSuffixText+values[0]).value;if(text){$(parentname).innerHTML=text;}}}};maxElementOptions=function(max,parentname,parentsplitter,elementsArray,optionBeginArray,optionSplitter,optionDefaultId){if($(parentname+"_value").value){var parentValue=$(parentname+"_value").value;var values=parentValue.split(parentsplitter);var items=0;while(values[items]){items++;}
if(items>(max-2)){var elements=elementsArray.split(",");var begins=optionBeginArray.split(",");var i=0;while(elements[i]){var name=trimString(elements[i]);if(items>=max){disableEnableUncheckElementOptions(name,optionSplitter,false,true,false);}
else{disableEnableUncheckElementOptions(name,optionSplitter,false,false,false);}
i++;}}
else if(parentValue==""||parentValue=="0"){checkElementId(optionDefaultId);}}
else{checkElementId(optionDefaultId);}};disableEnableUncheckElementOptions=function(name,optionSplitter,disableCheckedElements,disable,uncheck){$('formElementLine_'+name).getElements('input[type=checkbox]').each(function(item,index){if(disable==true){if(item.checked==false||disableCheckedElements==true){disableElement(item);}}
else{if(uncheck){uncheckElement(item);}
enableElement(item);}});};disableElement=function(element){element.disabled=true;};enableElement=function(element){element.disabled=false;};uncheckAllElementOptions=function(elementsArray,optionBeginArray,optionSplitter,enableOptions){var elements=elementsArray.split(",");var begins=optionBeginArray.split(",");var i=0;while(elements[i]){var name=trimString(elements[i]);var begin=trimString(begins[i]);disableEnableUncheckElementOptions(name,optionSplitter,false,false,enableOptions);i++;}};uncheckElementId=function(id){if($chk($(id))){var element=$(id);uncheckElement(element);}};checkElementId=function(id){if($chk($(id))){var element=$(id);checkElement(element);}};uncheckElement=function(element){element.getParent('.layerSectionChoice').removeClass('layerSectionChoiceSelected');element.checked=false;};checkElement=function(element){if(element.hasClass('layerSectionChoice')){element.addClass('layerSectionChoiceSelected');}else{element.getParent('.layerSectionChoice').addClass('layerSectionChoiceSelected');}
element.checked=true;};updateLayerValue=function(element,layerLink){if($chk(layerLink)){if(!$chk(layerLink.values)){layerLink.values=layerLink.preselectedValue;}
var values=layerLink.values;if($chk(values)){values=values.split('-');}
if(element.checked){if(values.length==1&&values[0]==0){values[0]=element.value;layerLink.values=array_implode('-',values);return;}else{var alreadyAdded=false;for(var j=0;j<values.length;j++){if(values[j]==element.value){alreadyAdded=true;}}
if(!alreadyAdded){values[values.length]=element.value;}}}else{if(values.length==1&&values[0]==element.value){values[0]=0;layerLink.values=array_implode('-',values);return;}else{layerLink.values='';var newValues=new Array();for(var k=0;k<values.length;k++){if(values[k]==element.value){}else{newValues.push(values[k]);}}
layerLink.values=array_implode('-',newValues);return;}}
layerLink.values=array_implode('-',values);}};function array_implode(value,array){return((array instanceof Array)?array.join(value):array);}
function submitOnClose(layer){var layerField=$(layer+'_value');Hc.Layerform.submitOnClose.set(layer,layerField);}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORLAY', bundleError);}


/* CUSCORLOA */
try{
loadPrintCss=function(id)
{var headID=$$('head')[0];var cssNode=document.createElement('link');cssNode.type='text/css';cssNode.rel='stylesheet';cssNode.href='/stylesheet/print/'+id+'.css';cssNode.media='print';headID.appendChild(cssNode);var printLogo=document.createElement('img');printLogo.id='pageLogoPrint';printLogo.src='https://www.holidaycheck.de/promo/holidaycheck-logo.svg?src=admin&for=print';printLogo.width=194;document.body.appendChild(printLogo);window.setTimeout(function(){window.print();},100);};window.printElement=function(element,landscape){var el=jQuery(element);if(el.length){var base=window.location.protocol+'//'+window.location.host;var css=jQuery('link').clone();css.each(function(i,link){var link=jQuery(link);link.attr('href',base+link.attr('href'));});var printWindow=window.open(null,'print');var body=jQuery(printWindow.document.body);body.html(el.html());body.find('img').each(function(i,img){img=jQuery(img);if(img.attr('src').indexOf('/')==0){img.attr('src',base+img.attr('src'));}});var head=jQuery(printWindow.document.head);head.append(css.clone());head.append('<link type="text/css" rel="stylesheet" href="'+base+'/stylesheet/print/main.css?0" media="print" />');if(landscape){head.append('<style>@page { size: landscape; }</style>');}
printWindow.print();printWindow.close();}};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORLOA', bundleError);}


/* CUSCORMED */
try{
getMediaForm=function(url,id)
{var jsonRequest=new Request.JSON({method:'get',url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'getMediaForm(\''+url+'\', \''+id+'\');',0,function(){$(id).toggleOff();});}else{$(id).toggleOn();$(id).innerHTML=responseJSON.content;}}});jsonRequest.send();};submitMediaForm=function(url,id,formName)
{var form=$(formName);var jsonRequest=new Request.JSON({url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'submitMediaForm(\''+url+'\', \''+id+'\', \''+formName+'\');',0);}else{if(Shadowbox.open&&typeof Shadowbox.player!='undefined'&&Shadowbox.player!=null&&typeof Shadowbox.player.obj!='undefined'&&typeof Shadowbox.player.obj.player!='undefined'&&Shadowbox.player.obj.player=='hcimg'){Shadowbox.player.setReportFormStatus(responseJSON.content);}else{$(id).innerHTML=responseJSON.content;}}}});jsonRequest.post(form);};function resizeShadowboxFullscreenImg(img,id,obj,withSocialBar)
{if(!img.height||!obj.height){return;}
if(withSocialBar!=null&&withSocialBar==true){var iFrameHeight=obj.dimensions.height-215;}else{var iFrameHeight=obj.dimensions.height-190;}
var iFrameWidth=obj.dimensions.width-175;var heightRatio=img.height/img.width;var widthRatio=img.width/img.height;var newImageHeight=img.height;var newImageWidth=img.width;var change=false;do{change=false;if(newImageHeight>iFrameHeight){newImageHeight=iFrameHeight;newImageWidth=newImageHeight*widthRatio;change=true;}
if(newImageWidth>iFrameWidth){newImageWidth=iFrameWidth;newImageHeight=newImageWidth*heightRatio;change=true;}}while(change);$(id).setStyle('visibility','visible');if(img.height>newImageHeight||img.width>newImageWidth){img.height=newImageHeight;img.width=newImageWidth;}};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORMED', bundleError);}


/* CUSCORMHC */
try{
mhcShowBox=function(url,width,height,reloadParentOnClose,newCallback)
{var callback=function(responseJSON,url,width,height,reloadParentOnClose){var type='html';if(responseJSON.type){type=responseJSON.type;}
if(Shadowbox.isOpen()&&type=='html'){jQuery('#'+Shadowbox.player.id).html(responseJSON.content);}else{Shadowbox.open({player:type,content:responseJSON.content,width:width,height:height,options:{onClose:function(){if(reloadParentOnClose){showLoadingAnimation();window.location.reload(true);}else{return true;}}}},{enableKeys:false});}};if(newCallback){callback=newCallback;}
url=encodeURI(url);url=url.replace(/%25/g,'%');var jsonRequest=new Request.JSON({method:'post',url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'mhcShowBox(\''+url+'\', '+width+', '+height+', '+reloadParentOnClose+', '+callback+');',2000);}else{callback(responseJSON,url,width,height,reloadParentOnClose);}}});jsonRequest.send();};logoutLightbox=function(logoutUrl){if(parent){parent.location.href=logoutUrl;}else{window.location.href=logoutUrl;}};toggleCheckBox=function(form,all){$(form).getElements('input[type=checkbox]').each(function(item,index){item.checked=all?true:!item.checked;});};acceptBuddyRequest=function(url,id)
{var jsonRequest=new Request.JSON({method:'post',url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'acceptBuddyRequest(\''+url+'\', '+id+');',2000);}else{$('mhcBuddyRequestBox').innerHTML=responseJSON.content;if(responseJSON.subject){$('messageContent'+id+'Subject').innerHTML=responseJSON.subject;}}}});jsonRequest.send();};deleteBuddy=function(url,id)
{var jsonRequest=new Request.JSON({method:'post',url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'deleteBuddy(\''+url+'\', '+id+');',2000);}else{$('mhcBuddyDelete').innerHTML=responseJSON.content;$('mhcBuddyItem'+id).innerHTML='entfernt';}}});jsonRequest.send();};helpfulRating=function(url,id)
{showLoadingAnimation();var jsonRequest=new Request.JSON({method:'get',url:url,onSuccess:function(responseJSON,responseText){if(responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'updateElementGET(\''+url+'\', \''+id+'\', \'json\', true);',0);}else{$(id).innerHTML=responseJSON.content;if(responseJSON.info&&$('reviewInfo')){$('reviewInfo').innerHTML=responseJSON.info;}}
hideLoadingAnimation();},onFailure:function(xhr){hideLoadingAnimation();}});jsonRequest.send();};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORMHC', bundleError);}


/* CUSCORMHC */
try{
Hc.register('Hc.Mhclogin');var globalOriginalFunctionCall='';var globalDelayForOriginalFunctionCall=0;handleMhcAjaxLogin=function(response,originalFunctionCall,delayForOriginalFunctionCall,shadowboxOnCloseFunction)
{globalDelayForOriginalFunctionCall=delayForOriginalFunctionCall;if(typeof shadowboxOnCloseFunction=='undefined'){shadowboxOnCloseFunction=function(){};}
switch(response.login){case'show':showMhcAjaxLogin(response.content,originalFunctionCall,shadowboxOnCloseFunction);break;case'update':updateMhcAjaxLogin(response.content);break;case'close':closeMhcAjaxLogin(response.header,shadowboxOnCloseFunction);break;}};showMhcAjaxLogin=function(content,originalFunctionCall,shadowboxOnCloseFunction)
{globalOriginalFunctionCall=originalFunctionCall;Shadowbox.open({player:'html',content:content,width:500,height:450,options:{onClose:shadowboxOnCloseFunction,enableKeys:false}});};updateMhcAjaxLogin=function(content)
{$(Shadowbox.player.id).innerHTML=content;};closeMhcAjaxLogin=function(header)
{Shadowbox.close();alternateSiteHeaderNavigationMhc(header);if(globalDelayForOriginalFunctionCall>0){showLoadingAnimation();(function(){hideLoadingAnimation();eval(globalOriginalFunctionCall);}).delay(globalDelayForOriginalFunctionCall);}else{eval(globalOriginalFunctionCall);}};alternateSiteHeaderNavigationMhc=function(content)
{var headerNavigationContainer=$('mhcarea');if(headerNavigationContainer){headerNavigationContainer.innerHTML=content;}};fullscreenLink=function(link)
{if(parent){if(parent.opener){parent.opener.location.href=link;window.close();}else{parent.location.href=link;}}
else if(opener){if(opener.parent){opener.parent.location.href=link;}else{opener.location.hef=link;}}
else{document.location.href=link;}};showTipLogin=function(element)
{$(element).className='tip tipLogin';}
hideTipLogin=function(element)
{$(element).className='displayNone';};showTipNewsletterHC=function()
{$('registerNewsletterHCPreLabel').className='tip tipNewsletter';};hideTipNewsletterHC=function()
{$('registerNewsletterHCPreLabel').className='displayNone';};Hc.Mhclogin.closeShadowbox=function(delay,reload)
{if(delay==null){delay=0;}
if(reload==null){reload=true;}
setTimeout(function(){if(opener!=null){if(reload){opener.location.reload(true);}
self.close();}
else if(parent.Shadowbox.isOpen()){if(reload){parent.location.reload(true);}
parent.Shadowbox.close();}},delay);};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORMHC', bundleError);}


/* CUSCOROFF */
try{
Hc.register('Hc.Offerlabels');var actualCampaignNr=new Array();var rank=new Array();var img_path=new Array();var detailimg_path=new Array();var iconimg_path=new Array();var teaserimg_path=new Array();var teasersmallimg_path=new Array();var descriptionShort=new Array();var descriptionMedium=new Array();var campaignListLength;var countResponses=0;var countRequests=0;Hc.Offerlabels.handleCampaigns=function(urlCampaignList,urlCampaignById,env)
{for(var i=0;i<jsonList.length;++i){var arr=jsonList[i];arr.requestNumber=i;arr.environment=env;var jsonRequest=new Request.JSON({method:'post',url:urlCampaignList,data:{json:JSON.encode(arr)},onSuccess:function(responseJSON,responseText){if(responseJSON[0]!=undefined){Hc.Offerlabels.handleCampaignList(urlCampaignById,responseJSON,responseJSON[0]['requestNumber'],responseJSON[0]['environment']);countRequests++;}}});var t=jsonRequest.send();}}
Hc.Offerlabels.handleCampaignList=function(url,campaignList,elementNumber,environment,offerId)
{actualCampaignNr[elementNumber]=0;rank[elementNumber]=100;img_path[elementNumber]='';detailimg_path[elementNumber]='';iconimg_path[elementNumber]='';teaserimg_path[elementNumber]='';teasersmallimg_path[elementNumber]='';descriptionShort[elementNumber]='';descriptionMedium[elementNumber]='';campaignListLength=campaignList.length;for(var i=0;i<campaignList.length;++i){var jsonRequest=new Request.JSON({method:'post',url:url,data:{campaignId:campaignList[i]['campaignId']},onSuccess:function(responseJSON,responseText){Hc.Offerlabels.campaignToSite(responseJSON,elementNumber,environment,offerId);countResponses++;if(countResponses==countRequests){Hc.Offerlabels.handleHeaderData(countRequests,environment);}}});jsonRequest.send();}}
Hc.Offerlabels.handleHeaderData=function(countRequests,environment)
{for(var i=0;i<countRequests;++i){switch(environment){case'hotelIndex':Hc.Offerlabels.headerHotelIndex(i);break;case'offerList':Hc.Offerlabels.headerOfferList(i);break;}}}
Hc.Offerlabels.campaignToSite=function(response,elementNumber,environment,offerId)
{actualCampaignNr[elementNumber]+=1;if(response['rank']<rank[elementNumber]){rank[elementNumber]=response['rank'];img_path[elementNumber]=response['imageListing'];detailimg_path[elementNumber]=response['imageDetail'];iconimg_path[elementNumber]=response['imageIcon'];teaserimg_path[elementNumber]=response['imageTeaser'];teasersmallimg_path[elementNumber]=response['imageTeaserSmall'];descriptionShort[elementNumber]=response['descriptionShort'];descriptionMedium[elementNumber]=response['descriptionMedium'];}
if(actualCampaignNr[elementNumber]==campaignListLength){if(environment=='hotelList'){Hc.Offerlabels.campaignToSite.hotelList(elementNumber);}else if(environment=='hotelIndex'){Hc.Offerlabels.throughOffers($$('.offer'),elementNumber);}else if(environment=='facetedSearch'){Hc.Offerlabels.campaignToSite.facettedHotelList(elementNumber);}else if(environment=='offerList'){Hc.Offerlabels.throughOffers($$('.offer'),elementNumber);}else if(environment=='vacancyCheck'){Hc.Offerlabels.campaignToSite.vacancyCheck(elementNumber,offerId);}}}
Hc.Offerlabels.campaignToSite.hotelList=function(elementNumber){var offers=$$('.listitemBox');offers.each(function(el,index){if(index==elementNumber){var pictureElements=el.getElements('.hLPicture');var newPicElement=new Element('div',{'class':'offerlabelImageListing'});newPicElement.setStyle('background','url("/data/offerlabel/'+img_path[elementNumber]+'") top right no-repeat');newPicElement.inject(pictureElements[0]);var children=el.getElements('.offerLabelTeaser');children.each(function(element){var newElement=new Element('div',{'class':'offerLabelsDescriptionShort',html:descriptionShort[elementNumber]});newElement.inject(element);Hc.Offerlabels.createDescriptionToggler(newElement,elementNumber);});}});}
Hc.Offerlabels.campaignToSite.vacancyCheck=function(elementNumber,offerId){var oldPictureElement=$('offerLabelsExpandIcon-'+elementNumber);if(oldPictureElement!=null){oldPictureElement.dispose();}
if($('offerLabelsTeaserSmall-'+elementNumber)==undefined){var element=$('offerlabelVacany_'+offerId);var tooltiplink=new Element('a',{id:'',href:'#','class':'tooltipSmall',text:''});tooltiplink.inject(element);var newPicElement=new Element('img',{id:'offerLabelsTeaserSmall-'+elementNumber,src:'/data/offerlabel/'+teasersmallimg_path[elementNumber],'class':'offerLabelsTeaserSmall nHl'});newPicElement.inject(tooltiplink);var tooltipcontent=new Element('span',{id:'','class':'tooltipcontent',html:descriptionShort[elementNumber]+'<br />'+descriptionMedium[elementNumber]});tooltipcontent.inject(tooltiplink);}}
Hc.Offerlabels.headerHotelIndex=function(elementNumber){if($('offerlabelHotelPicture')==undefined){var pictureElements=$('offerLabelDescription');var newElement=new Element('div',{'class':'offerLabelsDescriptionShort',html:descriptionShort[elementNumber]});newElement.inject(pictureElements);var descriptionMediumElement=new Element('div',{id:'offerLabelsDescriptionMedium-'+elementNumber,'class':'offerLabelsDescriptionMedium',html:descriptionMedium[elementNumber]});descriptionMediumElement.inject(pictureElements);var expanderElement=new Element('a',{id:'offerLabelsExpanderLink-'+elementNumber,href:'#','class':'offerLabelsDescriptionExpander',title:'pokaż',text:'pokaż',events:{'click':function(e){e.preventDefault();Hc.Offerlabels.expandOfferLabel(elementNumber);}}});expanderElement.inject(newElement);var expanderImgElement=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'https://media.holidaycheck.com/data/image/common/toggle_min_plus.png'});expanderImgElement.inject(expanderElement,'top');var pictureElements=$$('.reviewsHotelSumPicture');pictureElements.each(function(element){var newPicElement=new Element('div',{id:'offerlabelHotelPicture',title:'','class':'offerlabelHotelPicture'});newPicElement.setStyle('background','url("/data/offerlabel/'+detailimg_path[elementNumber]+'") top right no-repeat');newPicElement.inject(element);});}}
Hc.Offerlabels.campaignToSite.facettedHotelList=function(elementNumber){var offers=$$('#hotellistList .listitemBox');offers.each(function(el,index){if(index==elementNumber){var pictureElements=el.getElements('.thumbnail');var pictureElement=pictureElements[0];pictureElement.style.position='relative';var newPicElement=new Element('div',{'class':'offerlabelImageListing'});newPicElement.setStyle('background','url("/data/offerlabel/'+img_path[elementNumber]+'") top right no-repeat');newPicElement.inject(pictureElement);var newElement=new Element('div',{'class':'offerLabelsDescriptionShort',html:descriptionShort[elementNumber]});newElement.inject(el);Hc.Offerlabels.createDescriptionToggler(newElement,elementNumber);}});}
Hc.Offerlabels.headerOfferList=function(elementNumber){if($('offerlabelHotelPicture')==undefined){var pictureElements=$$('.travelOfferHotelHeaderImage');var newPicElement=new Element('div',{id:'offerlabelHotelPicture',title:'','class':'offerlabelHotelPicture'});newPicElement.setStyle('background','url("/data/offerlabel/'+detailimg_path[elementNumber]+'") top right no-repeat');newPicElement.inject(pictureElements[0]);var pictureElements=$$('.offerLabelContainerHeader');pictureElements.each(function(element){var newElement=new Element('div',{'class':'offerLabelsDescriptionShort',html:descriptionShort[elementNumber]});newElement.inject(element);var descriptionMediumElement=new Element('div',{id:'offerLabelsDescriptionMedium-'+elementNumber,'class':'offerLabelsDescriptionMedium active',html:descriptionMedium[elementNumber]});descriptionMediumElement.inject(element);});}}
Hc.Offerlabels.vacancyCheck=function(elementNumber,offerId){var arr=jsonList[elementNumber];arr.requestNumber=elementNumber;arr.environment='vacancyCheck';var jsonRequest=new Request.JSON({method:'post',url:urlCampaignList,data:{json:JSON.encode(arr)},onSuccess:function(responseJSON,responseText){if(responseJSON[0]===undefined){return false;}
Hc.Offerlabels.handleCampaignList(urlCampaignById,responseJSON,responseJSON[0]['requestNumber'],responseJSON[0]['environment'],offerId);}});var t=jsonRequest.send();}
Hc.Offerlabels.throughOffers=function(offers,elementNumber){offers.each(function(el,index){if(index==elementNumber){var pictureElements=el.getElements('.offerLabelContainer');pictureElements.each(function(element){var newPicElement=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'/data/offerlabel/'+iconimg_path[elementNumber],'class':'offerLabelsExpandIcon tooltip nHl',rel:'<div>'+descriptionShort[elementNumber]+'<br />'+descriptionMedium[elementNumber]+'</div>'});newPicElement.inject(element);var tooltip=new Tips($$('.offerLabelsExpandIcon'),{fixed:true,offset:{x:50,y:0}});});var children=el.getElements('.offerLabelTeaser');children.each(function(element){var newElement=new Element('div',{'class':'offerLabelsDescriptionShort',html:descriptionShort[elementNumber]});newElement.inject(element);var descriptionMediumElement=new Element('div',{id:'offerLabelsDescriptionMedium-'+elementNumber,'class':'offerLabelsDescriptionMedium',html:descriptionMedium[elementNumber]});descriptionMediumElement.inject(element);var expanderElement=new Element('a',{id:'offerLabelsExpanderLink-'+elementNumber,href:'#','class':'offerLabelsDescriptionExpander',title:'pokaż',text:'pokaż',events:{'click':function(e){e.preventDefault();Hc.Offerlabels.expandOfferLabel(elementNumber);}}});expanderElement.inject(newElement);var expanderImgElement=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'https://media.holidaycheck.com/data/image/common/toggle_min_plus.png'});expanderImgElement.inject(expanderElement,'top');});}});}
Hc.Offerlabels.expandOfferLabel=function(elementNumber){var expandLink=$('offerLabelsExpanderLink-'+elementNumber);expandLink.set({title:'ukryj',text:'ukryj',events:{'click':function(e){e.preventDefault();Hc.Offerlabels.toggleOfferLabel(elementNumber);}}});var switcher=$('offerLabelsExpandIcon-'+elementNumber);var switcherToggle=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'https://media.holidaycheck.com/data/image/common/toggle_min_minus.png'});switcherToggle.inject(expandLink,'top');var toExpand=$('offerLabelsDescriptionMedium-'+elementNumber);toExpand.addClass('active',true);}
Hc.Offerlabels.toggleOfferLabel=function(elementNumber){var expandLink=$('offerLabelsExpanderLink-'+elementNumber);expandLink.set({title:'pokaż',text:'pokaż',events:{'click':function(e){e.preventDefault();Hc.Offerlabels.expandOfferLabel(elementNumber);}}});var switcher=$('offerLabelsExpandIcon-'+elementNumber);var switcherToggle=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'https://media.holidaycheck.com/data/image/common/toggle_min_plus.png'});switcherToggle.inject(expandLink,'top');var toExpand=$('offerLabelsDescriptionMedium-'+elementNumber);toExpand.removeClass('active',true);}
Hc.Offerlabels.createTooltip=function(){var tooltipTop=new Tips($$('.tooltipTop'),{fixed:true,offset:{x:-15,y:-65}});}
Hc.Offerlabels.createDescriptionToggler=function(element,elementNumber){var expanderElement=new Element('a',{id:'offerLabelsExpanderLink-'+elementNumber,href:'#','class':'offerLabelsDescriptionExpander',title:'pokaż',text:'pokaż',events:{'click':function(e){e.preventDefault();Hc.Offerlabels.expandOfferLabel(elementNumber);}}});expanderElement.inject(element);var descriptionMediumElement=new Element('div',{id:'offerLabelsDescriptionMedium-'+elementNumber,'class':'offerLabelsDescriptionMedium',html:descriptionMedium[elementNumber]});descriptionMediumElement.inject(element);var expanderImgElement=new Element('img',{id:'offerLabelsExpandIcon-'+elementNumber,src:'https://media.holidaycheck.com/data/image/common/toggle_min_plus.png'});expanderImgElement.inject(expanderElement,'top');}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCOROFF', bundleError);}


/* CUSCOROFF */
try{
loadOfferTeaser=function(url,id){var htmlRequest=new Request.HTML({method:'get',noCache:true,url:url,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){$(document.body).getElements('div.offerTeaserSmallActive').each(function(item,index){item.removeClass('offerTeaserSmallActive');item.addClass('offerTeaserSmallInactive');});$('offerTeaser_'+id).removeClass('offerTeaserSmallInactive');$('offerTeaser_'+id).addClass('offerTeaserSmallActive');$('offerTeaserCurrent').innerHTML=responseHTML;}});htmlRequest.send();}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCOROFF', bundleError);}


/* CUSCORPAG */
try{
Hc.addPaginationLayer=function(){$$(".paginationContainer .additionalLinks").each(function(it){it.addEvent("mouseenter",function(ev){it.store("cancelHide",true);it.addClass("visible");});it.addEvent("mouseleave",function(ev){it.store("cancelHide",false);(function(){if(!it.retrieve("cancelHide")){it.removeClass("visible");}}).delay(1000);});});};window.addEvent('domready',function(ev){Hc.addPaginationLayer();$$('.ajaxLoadReviewPagination').each(function(el){el.addEvent('click',function(){return Hc.sendAjaxRequestForHotelReview(this.get('href'));});});});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORPAG', bundleError);}


/* CUSCORPRI */
try{
(function(){"use strict";jQuery.widget('hc.prismic',{options:{endpoint:'https://holiday.cdn.prismic.io/api',token:'MC5VX1h2RENZQUFDY0FSTmw0.77-977-9Ggd377-977-977-977-9EWTvv73vv73vv71477-977-977-9PO-_vRUqN--_ve-_ve-_ve-_vW1HYO-_ve-_vQ'},filters:null,_create:function(){var self=this,element=this.element;self.filters=element.attr('prismic-filter').split(',');if(element.attr('prismic-type')||element.attr('prismic-tags')){this.run();}},getPredicate:function(name,value,operator,type){if(!value){return'';}
var tmp=value.split(',');value=JSON.stringify((tmp.length>1?tmp:value));operator=operator||(tmp.length>1?'any':'at');type=type||'d';if(value!=''&&tmp.length==1&&operator=='any'){value='['+value+']';}
return'[:'+type+' = '+operator+'('+name+', '+value+')]';},run:function(query){this._call(query);this.element.attr('prismic-slot','run');},filter:function(tags){var filters=this.filters,tags=tags||[];if(tags&&tags.length==1){return true;}
for(var i=0;i<tags.length;i++){if(filters.indexOf(tags[i])>=0){return true;}}
return false;},success:function(response){var self=this,element=self.element,show=false,type=element.attr('prismic-type'),results=response.results;if(response.total_results_size>=1){for(var i=0;i<results.length;i++){var doc=results[i];if(Hc.verbose){console.log("HC Prismic Filter: %o",self.filter(doc.tags));}
if(self.filter(doc.tags)){var content,title=doc.get(type+'.title').asText(),url=doc.get(type+'.url').asText();if(title&&url){content='<a href="'+url+'" target="_blank">'+title+'</a>';}else{content=doc.asHtml();}
if(Hc.verbose){console.log("HC Prismic Content: "+content);}
show=true;element.append(content);}}
if(show){element.css('display','block');}}},error:function(error){if(error){if(Hc.offline){console.error("HC Prismic Error: %o",error);}}},_call:function(query){var self=this,options=self.options,Prismic=window.Prismic,query=query||this._getDefaultQuery();if(Hc.offline){if(Hc.verbose){console.log("HC Prismic Query: "+query);}}
Prismic.Api(options.endpoint,function(err,Api){self._error(err);Api.form('everything').ref(Api.master()).query(query).submit(function(err,response){if(err){self._error(err);}else{self._success(response);}});},options.token);},_success:function(response){if(Hc.offline){if(Hc.verbose){console.log("HC Prismic: %o",response);}}
this.success(response);this.element.attr('prismic-slot','ready');},_error:function(error){this.error(error);this.element.attr('prismic-slot','error');},_getDefaultQuery:function(){var self=this;return'['
+self.getPredicate('document.type',self.element.attr('prismic-type'))
+self.getPredicate('document.tags',self.element.attr('prismic-tags'),'any')
+']';}});})();
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORPRI', bundleError);}


/* CUSCORPRO */
try{
Hc.register('Hc.Productsearch');Hc.Productsearch.submitAndOpenPopup=function(form,popupUrl,popupName){form.set('send',{onSuccess:function(responseText,responseXML){showPopUp(popupUrl,popupName);}});form.send();};Hc.Productsearch.submitAndToggle=function(form,popupUrl,containerId){var child_0_layer=jQuery('childs_0_layer');var child_0_layer_content=child_0_layer[0].html();child_0_layer[0].html('');var child_2_layer=jQuery('childs_2_layer');var child_2_layer_content=child_2_layer[0].html();child_2_layer[0].html('');if(Hc.Layerform.layers.has('child1_0')){Hc.Layerform.layers.erase('child1_0');}
if(Hc.Layerform.layers.has('child2_0')){Hc.Layerform.layers.erase('child2_0');}
if(Hc.Layerform.layers.has('child3_0')){Hc.Layerform.layers.erase('child3_0');}
if(Hc.Layerform.layers.has('child4_0')){Hc.Layerform.layers.erase('child4_0');}
if(Hc.Layerform.layers.has('child1_2')){Hc.Layerform.layers.erase('child1_2');}
if(Hc.Layerform.layers.has('child2_2')){Hc.Layerform.layers.erase('child2_2');}
if(Hc.Layerform.layers.has('child3_2')){Hc.Layerform.layers.erase('child3_2');}
if(Hc.Layerform.layers.has('child4_2')){Hc.Layerform.layers.erase('child4_2');}
form.set('send',{onSuccess:function(responseText,responseXML){var iframe='<iframe frameborder="0" scrolling="no" style="margin: 0px; padding: 0px; width: 652px; height: 570px;" src="'+popupUrl+'"></iframe>';var container=document.getElementById(containerId);if(container.hasChild('placereserve')){container.toggle();}
container.set('html',iframe);scrollSmooth('AnkerTravelcontactHotel');}});form.send();child_0_layer.html(child_0_layer_content);child_2_layer.html(child_2_layer_content);};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORPRO', bundleError);}


/* CUSCORRAT */
try{
rateSliderUpdate=function(id,hoverValue,mouseDown,valueDisplayTexts){if($(id+'ValueDisplay').className=='displayNone'){return;}
var value=$(id).value;var valueDisplay=$(id+'ValueDisplay');if(hoverValue>0){valueDisplay.innerHTML=valueDisplayTexts[hoverValue];valueDisplay.className='valueDisplay';}else if(value==0){valueDisplay.className='valueDisplayInvitation inactivetext';}
for(var i=1;i<=6;i++){var valueStep=$(id+'ValueStep'+i);if(value>=i){if(hoverValue>=i){if(mouseDown){valueStep.className='valueActiveMousedown';}else{valueStep.className='valueActiveHover';}}else{valueStep.className='valueActive';}}else{if(hoverValue>=i){if(mouseDown){valueStep.className='valueInactiveMousedown';}else{valueStep.className='valueInactiveHover';}}else{valueStep.className='valueInactive';}}}}
rateSliderReset=function(id,valueDisplayTexts,siteId){var value=$(id).value;var valueDisplay=$(id+'ValueDisplay');valueDisplay.innerHTML=valueDisplayTexts[value];if(value==0&&valueDisplay.className!='displayNone'){valueDisplay.className='valueDisplayInvitation inactivetext';}
for(var i=1;i<=6;i++){var valueStep=$(id+'ValueStep'+i);if(value>=i){valueStep.className='valueActive';}else{valueStep.className='valueInactive';}}
if(siteId==6||siteId==7||siteId==8){ContributionReviewHotel.updateArrow();}}
rateSliderValueUpdate=function(id,value,siteId){if($(id+'ValueDisplay').className=='displayNone'){return;}
if(siteId==6||siteId==7||siteId==8){jQuery('input[id='+id+'RatingDenial]').attr('checked',false);jQuery('input[id='+id+'RatingDenialCheck]').attr('checked',false);jQuery('input[id='+id+'RatingDenialSpec-notUsed]').attr('checked',false);jQuery('input[id='+id+'RatingDenialSpec-notAvailable]').attr('checked',false);jQuery('#'+id+'RatingDenialSpecContainer').removeClass('displayInline');jQuery('#'+id+'RatingDenialSpecContainer').addClass('displayNone');ContributionReviewHotel.updateArrow();}
$(id).value=value;}
ratingDenialCheckUpdate=function(id,siteId){var checkValue=$(document.body).getElement('input[id='+id+'RatingDenial]').checked;var valueDisplay=$(id+'ValueDisplay');if(checkValue){$(id).value=0;rateSliderUpdate(id,0,false,{});if(siteId!=6&&siteId!=7&&siteId!=8){valueDisplay.className='displayNone';}else{jQuery('#'+id+'ValueDisplay').html('');}}else{valueDisplay.innerHTML='';valueDisplay.className='valueDisplayInvitation inactivetext';jQuery('#'+id+'ValueDisplay').html(noRatetext);}
if(siteId==6||siteId==7||siteId==8){ContributionReviewHotel.updateArrow();}}
ratingDenialSpecifiedCheckUpdate=function(id,siteId){var checkValue=$(document.body).getElement('input[id='+id+'RatingDenialCheck]').checked;var valueDisplay=$(id+'ValueDisplay');if(checkValue){$(id).value=0;rateSliderUpdate(id,0,false,{});if(siteId!=6&&siteId!=7&&siteId!=8){valueDisplay.className='displayNone';}else{jQuery('#'+id+'ValueDisplay').html('');}
$(id+'RatingDenialSpecContainer').className='displayInline';$(id+'RatingDenial').value='denied';}else{valueDisplay.innerHTML='';valueDisplay.className='valueDisplayInvitation inactivetext';$(id+'RatingDenialSpecContainer').className='displayNone';var radios=$(document.body).getElements('input[name='+id+'RatingDenialSpec]');for(var i=0;i<radios.length;i++){radios[i].checked=false;}
$(id+'RatingDenial').value='notDenied';}
if(siteId==6||siteId==7||siteId==8){ContributionReviewHotel.updateArrow();}}
ratingDenialSpecifiedSpecUpdate=function(id){var radios=$(document.body).getElements('input[name='+id+'RatingDenialSpec]');for(var i=0;i<radios.length;i++){if(radios[i].checked){$(id+'RatingDenial').value=radios[i].value;break;}}}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORRAT', bundleError);}


/* CUSCORRAT */
try{
jQuery(function($){var $reviewFormContainer=$('#reviewFormContainer,#more-criterion');var slidersDisplayMessages={};$.fn.changeVal=function(v){return $(this).val(v).trigger("changeDisplayText");};var selectRating=function(suns,sunVal,sliderPrefix){handleSunsTillPos(suns,markSunAsUnSelected);handleSunsTillPos(suns,markSunAsSelected,sunVal);$getSliderHiddenField(sliderPrefix).changeVal(sunVal);};var denyRating=function(suns,sliderPrefix){handleSunsTillPos(suns,markSunAsUnSelected);$getSliderHiddenField(sliderPrefix).changeVal(0);};var handleSunsTillPos=function(suns,func,sunVal){sunVal=!sunVal?6:sunVal;for(var i=0;i<sunVal;i++){func(suns[i]);}};var setDisplayText=function(sliderPrefix,sunVal){var displayMesssages=slidersDisplayMessages[sliderPrefix];$reviewFormContainer.find('#'+sliderPrefix+'ValueDisplay').html(displayMesssages[sunVal]);};var markSunAsSelected=function($sun){$sun.removeClass('valueInactive').addClass('valueActive');};var markSunAsUnSelected=function($sun){$sun.removeClass('valueActive').addClass('valueInactive');};var getCurrentSunValue=function($sun){return $sun.attr('id').slice(-1)};var $getSliderHiddenField=function(sliderPrefix){return $reviewFormContainer.find('#'+sliderPrefix);};var $getSliderDenialField=function(sliderPrefix){return $reviewFormContainer.find('#'+sliderPrefix+'RatingDenial');};var getSunElementIdPrefix=function(elId){return elId.replace('Slider','');};$reviewFormContainer.find('.sunsSlider').each(function(){var $slider=$(this),suns=$(this).children('.sunsSliderSun');if(suns.length<1){return;}
var sliderPrefix=getSunElementIdPrefix($slider.attr('id'));$getSliderDenialField(sliderPrefix).changeVal(1);slidersDisplayMessages[sliderPrefix]=$(suns[0]).data('displaytext');$getSliderHiddenField(sliderPrefix).on('changeDisplayText',function(){var sliderVal=$(this).val();setDisplayText(sliderPrefix,sliderVal);$getSliderDenialField(sliderPrefix).changeVal((sliderVal>0?0:1));});$slider.mouseleave(function(){selectRating(suns,$getSliderHiddenField(sliderPrefix).val(),sliderPrefix);});suns.each(function(){var $sun=$(this),sunVal=getCurrentSunValue($sun);$sun.on({click:function(){var sliderVal=$getSliderHiddenField(sliderPrefix).val();if(sliderVal>0&&sliderVal==sunVal){denyRating(suns,sliderPrefix);}else{selectRating(suns,sunVal,sliderPrefix);}},hover:function(ev){handleSunsTillPos(suns,markSunAsUnSelected);if(ev.type=='mouseenter'){handleSunsTillPos(suns,markSunAsSelected,sunVal);setDisplayText(sliderPrefix,sunVal);}}});});});});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORRAT', bundleError);}


/* CUSCORSAV */
try{
;(function($){"use strict";function isFormForTravelkindOnPage(travelkind){return!!document.getElementById(travelkind+'-departureDate');}
function getElementValueBySelector(selector){var value=$(selector).val();return value||null;}
function getDuration(){var duration=getElementValueBySelector('#package-durationSelect');var durationMap={25:'exactly',4:'1',5:'2',6:'3',7:'4',8:'5',9:'6',1:'7',11:'8',27:'9',28:'10',29:'11',30:'12',31:'13',2:'14',3:'21',16:'28',10:'5_8',12:'9_12',13:'13_15',14:'16_22',15:'23_99'};return durationMap[duration]||'0';}
function getMealTypes(){var value=$('#package-catering').val();var mealTypes={"1":"GT06-AO","2":"GT06-BR","3":"GT06-HB","4":"GT06-FB","5":"GT06-AI"};if(value!="0"){return mealTypes[value];}
return null;}
function getSpecialJourneyAttribute(){var specialJourneyAttributes=null;var transferValue=$('#package-transfer').val();var transferTypes={"1":"GT14-TR","2":"GT14-WT","3":"GT14-HC"};if(transferValue!==undefined&&transferValue!="0"){specialJourneyAttributes=transferTypes[transferValue];}
return specialJourneyAttributes;}
function getSeaView(){if($('#package-roomType-15').is(':checked')||$('#package-specialRequest-5').is(':checked')){return['6eff2a65-128c-4d73-9a1e-8529bd784f10'];}
return null;}
function getMaxP(){var value=$('#package-priceSelect').val();var maxpTypes={"1":"300","2":"500","3":"750","4":"1000"};if(-1===["0","5"].indexOf(value)){return maxpTypes[value];}
return null;}
function getRoomTypes(){var roomTypesMap={"0":"GT04-RO|ST04-SI","1":"GT04-RO|ST04-DO","2":"GT04-RO|ST04-FA","3":"GT04-RO|ST04-3B","4":"GT04-RO|ST04-SH","5":"GT04-RO|ST04|AT04-DPSU","6":"GT04-RO|ST04|AT04-DPSU","7":"GT04-RO|ST04-ST","8":"GT04-FH|ST04-AP","9":"GT04-RO|ST04|AT04-DUPL","10":"GT04-FH|ST04-BU","11":"GT04-RO|ST04-SU","12":"GT04-FH|ST04-VI","13":"GT04-FH|ST04-HF","14":"GT04-FH|ST04-HO"};var roomTypes=[];$('#package-roomType').find('input[name]:checked').each(function(index,element){var value=$(element).val();if(value!=='15'){roomTypes.push(roomTypesMap[value]);}});return roomTypes;}
function getAirports(){function isAirportsSelectionAvailable(){return $('#hcairport-package-airport').length===1;}
if(!isAirportsSelectionAvailable()){return null;}
var airports=[];$('#hcairport-package-airport').find('input[name]:checked').each(function(index,element){airports.push($(element).data('code'));});return airports;}
function getDate(travelkind,direction){var classicDateFormat='D. dd.mm.yy';var selector='#'+travelkind+'-'+direction+'Date';return $.datepicker.parseDate(classicDateFormat,getElementValueBySelector(selector));}
function getAdults(travelkind){return getElementValueBySelector('#'+travelkind+'-adults');}
function getChildren(travelkind){function isChildrenSelectionAvailable(){return $('#children-'+travelkind+'-adultschildFirstchildSecondchildThirdchildFourth').length===1}
if(!isChildrenSelectionAvailable()){return null;}
var children=[];var fields=['First','Second','Third','Fourth'];for(var i=0;i<fields.length;i++){var selector='#'+travelkind+'-child'+fields[i];var result=getElementValueBySelector(selector)
if(result!==null&&result!=='0'){children.push(result);}}
return children;}
function getDataFromLocalStorage(travelkind){var defaults={'hotel':{'adults':'2','children':[]},'package':{'adults':'2','children':[],'airport':[]}};var storedData=JSON.parse(TreadyStorage.getItem('offers'))||{};storedData[travelkind]=$.extend({},defaults[travelkind],storedData[travelkind]);return storedData;}
function getSelectedTouroperator(){var tourOperators=[];$('input[name="package[organizer][]"]:checked').each(function(){if(!!$(this).attr('data-uuid')){tourOperators.push($(this).data('uuid'));}});return tourOperators;}
function removeNullValues(object){for(var key in object){if(object[key]===null){delete object[key];}}}
function getSelectedParams(travelkind){var selectedParams={departureDate:getDate(travelkind,'departure'),returnDate:getDate(travelkind,'return'),children:getChildren(travelkind),adults:getAdults(travelkind)};if(travelkind==='package'){selectedParams.airport=getAirports();selectedParams.duration=getDuration();selectedParams.boardType=getMealTypes();selectedParams.specialJourneyAttribute=getSpecialJourneyAttribute();selectedParams.maxP=getMaxP();selectedParams.roomType=getRoomTypes();selectedParams.seaView=getSeaView();selectedParams.tourOperator=getSelectedTouroperator();}
removeNullValues(selectedParams);return selectedParams;}
function setLocalstorageByKey(globalKey,key,value){var dataByKey=JSON.parse(globalLC.getItem(globalKey));if(!dataByKey){dataByKey={};}
if(value){dataByKey[key]=value;}else{delete dataByKey[key];}
globalLC.setItem(globalKey,JSON.stringify(dataByKey));}
function setDirectBeachAccess(){setLocalstorageByKey('hotelFilters','directBeachAccess',($('#package-specialRequest-2').is(':checked'))?['DIRECT_BEACH_ACCESS']:false);}
function setStarsNo(){var starsNo=parseInt($('#package-categorySelect').val());setLocalstorageByKey('hotelFilters','stars',(starsNo)?[starsNo]:false);}
function setRecommendedAspects(){var recomendedAspectsMap={"package-toprated-1":"EXCELLENT_CLEANNESS","package-toprated-2":"FRIENDLINESS_AND_SERVICE","package-toprated-3":"NICE_ROOM_INTERIOR","package-toprated-4":"BIG_ROOM_SIZE","package-toprated-5":"FAMILY_FRIENDLINESS","package-toprated-6":"HANDICAPPED_ACCESSIBILITY","package-toprated-7":"GOOD_FOOD","package-toprated-8":"NICE_POOL","package-toprated-9":"SPORT_AND_SPARETIME","package-toprated-10":"CHILDCARE_AND_PLAYGROUND","package-toprated-11":"BEACH"};setChecklistValues('hotelFilters','recommendedAspects',recomendedAspectsMap);}
function setSurroundingFacilities(){var surroundingFacilitiesMap={"package-toprated-12":"EXCURSION_POSSIBILITIES","package-toprated-13":"SHOPPING","package-toprated-14":"BARS_AND_RESTAURANTS","package-toprated-15":"LEISURE_ACTIVITIES","package-toprated-16":"SKI_LIFT"};setChecklistValues('hotelFilters','surroundingFacilities',surroundingFacilitiesMap);}
function setChecklistValues(globalKey,key,valuesMap){var selectedChecklists=[];$.each(valuesMap,function(key,value){if($('#'+key).is(':checked')){selectedChecklists.push(value);}});setLocalstorageByKey(globalKey,key,(selectedChecklists.length)?selectedChecklists:false);}
function setHotelFilters(){setDirectBeachAccess();setStarsNo();setRecommendedAspects();setSurroundingFacilities();}
function save(storedData,selectedParams,travelkind){storedData.travelkind=travelkind;storedData[travelkind]=selectedParams;TreadyStorage.setItem('offers',JSON.stringify(storedData));}
function syncToLocalStorage(travelkind){if(!isFormForTravelkindOnPage(travelkind)){return;}
var storedData=getDataFromLocalStorage(travelkind);var selectedParams=getSelectedParams(travelkind);save(storedData,selectedParams,travelkind);setHotelFilters();}
$(document).on('click','#package-submit',function(){syncToLocalStorage('package');});$(document).on('click','#hotel-submit',function(){syncToLocalStorage('hotel');});})(jQuery);
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSAV', bundleError);}


/* CUSCORSCR */
try{
var scrollNative=window.scroll;window.scroll=function(elementOrAnchorNameOrSelector,durationTime,offsetTop){if(arguments.length==2&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){return scrollNative(arguments[0],arguments[1]);}
var anchor='';durationTime=durationTime!==undefined?durationTime:500;offsetTop=offsetTop!==undefined?offsetTop:0;if(typeof elementOrAnchorNameOrSelector!=='object'){if(jQuery.inArray(elementOrAnchorNameOrSelector.charAt(0),['#','.'])>-1){anchor=jQuery(elementOrAnchorNameOrSelector);}else{anchor=jQuery('#'+elementOrAnchorNameOrSelector+', a[name='+elementOrAnchorNameOrSelector+']');}}else{anchor=elementOrAnchorNameOrSelector;}
if(anchor.length){var offset=anchor.offset();jQuery('html,body').animate({scrollTop:offset.top+offsetTop},durationTime);}};window.scrollSmooth=window.scroll;
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSCR', bundleError);}


/* CUSCORSCR */
try{
var moverInstanceForContentScrolling=null;startContentScrolling=function(containerId,scrollToTail)
{interruptContentScrolling();var container=$(containerId);var frame=container.getElement('.sliderFrame');var content=frame.getElement('.sliderContent');var containerWidth=frame.getStyle('width').replace('px','');var contentWidth=parseInt(content.getStyle('width').replace('px',''));var contentOffset=parseInt(content.getStyle('left').replace('px',''));if((containerWidth>=contentWidth)||(scrollToTail&&contentOffset<=(containerWidth-contentWidth))||(!scrollToTail&&contentOffset>=0)){return;}
if(scrollToTail){var edgePosition='upperRight';var moveOffset=containerWidth;var duration=4*(contentWidth+contentOffset-containerWidth+1);}else{var edgePosition='upperLeft';var moveOffset=0;var duration=4*(Math.abs(contentOffset)+1);}
moverInstanceForContentScrolling=new Fx.Move(content,{relativeTo:frame,position:'upperLeft',edge:edgePosition,offset:{x:moveOffset,y:0},duration:duration,onStart:function(){updateScrollButtonsVisibility(containerId,scrollToTail,false);},onComplete:function(){updateScrollButtonsVisibility(containerId,scrollToTail,true);}});moverInstanceForContentScrolling.start();}
interruptContentScrolling=function()
{if($defined(moverInstanceForContentScrolling)){moverInstanceForContentScrolling.cancel();moverInstanceForContentScrolling=null;}}
updateScrollButtonsVisibility=function(containerId,scrollToTail,scrollingFinished)
{var container=$(containerId);var leftButton=container.getElement('.sliderButtonLeft');var rightButton=container.getElement('.sliderButtonRight');if(scrollToTail){fadeInScrollButton(leftButton);if(scrollingFinished){fadeOutScrollButton(rightButton);}}else{if(scrollingFinished){fadeOutScrollButton(leftButton);}
fadeInScrollButton(rightButton);}}
fadeInScrollButton=function(button)
{if(button.getStyle('display')=='none'){var buttonMorph=new Fx.Morph(button,{onStart:function(){button.setStyle('display','block')},duration:300});buttonMorph.start({'opacity':[0,1]});}}
fadeOutScrollButton=function(button)
{if(button.getStyle('display')=='block'){var buttonMorph=new Fx.Morph(button,{onComplete:function(){button.setStyle('display','none')},duration:300});buttonMorph.start({'opacity':[1,0]});}}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSCR', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){Shadowbox.ajax=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):jQuery(window).innerHeight();this.width=obj.width?parseInt(obj.width,10):jQuery(window).innerWidth();}
Shadowbox.ajax.prototype={remove:function(){},append:function(body,dims){var url=this.obj.content;var width=Shadowbox.dimensions.innerWidth;var height=Shadowbox.dimensions.innerHeight;jQuery.ajax({headers:{"JavaScriptClient":"jQueryShadowbox"},url:url,success:function(data){body.innerHTML='<div id="sb-body-ajax" style="height: '+height+'px; overflow-y: auto; width: '+width+'px">'+data+'</div>';jQuery(document).trigger('hcAsyncModuleLoaded');},dataFilter:function(data,type){try{var appendStyleSheet=function(key,element){if(document.createStyleSheet){document.createStyleSheet(element.href);}else{jQuery('<link/>',{'rel':'stylesheet','type':'text/css','href':element.href}).appendTo('head');}};var object=jQuery.parseJSON(data);if(object.hasOwnProperty('content')){if(object.hasOwnProperty('stylesheet')){jQuery(object['stylesheet']).each(appendStyleSheet);}
data=object['content'];this.success(data);}}catch(err){}
return data;}});},onWindowResize:function(){var body=jQuery('#sb-body-ajax');body.height(Shadowbox.dimensions.innerHeight);body.width(Shadowbox.dimensions.innerWidth);}}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){Shadowbox.googlemap=function(obj,id){this.obj=obj;this.id=id;this.type=obj.type;if(this.type!='poi'&&this.type!='hotel'){alert('type is nich jesetzt');}
this.height=jQuery(window).innerHeight();this.width=jQuery(window).innerWidth();this.itemId=obj.item;this.insert=obj.insert;this.wasInsert=false;var _this=this;this.resizeMap=function(){if(_this.insert){var height=Shadowbox.dimensions.innerHeight-jQuery('#googleMapInsertText').height()-5;}else{var height=Shadowbox.dimensions.innerHeight-16-50;}
jQuery('#googleMapShadowbox').height(height);}}
Shadowbox.googlemap.prototype={remove:function(){},append:function(body,dims){var _this=this;jQuery.ajax({data:{action:'shadowbox',type:_this.type,item:_this.itemId},url:'/map',dataType:'json',success:function(data){body.innerHTML='';if(!_this.insert){body.innerHTML+='<div id="googleMapControls">'+'<strong>'+options.translates.googlemapPlayer.mapShowOnMapLabel+':</strong>'+'<input type="checkbox" id="gmHotelSwitch" />'+options.translates.googlemapPlayer.mapShowOnMapHotelSwitchLabel+'<input type="checkbox" id="gmPoiSwitch" />'+options.translates.googlemapPlayer.mapShowOnMapPoiSwitchLabel+'</div>';}
body.innerHTML+='<div id="googleMapShadowbox"></div>';_this.map=new GoogleMap(data.config,data.data,'googleMapShadowbox');if(!_this.insert){var landscape=false;if(Shadowbox.dimensions.innerWidth>Shadowbox.dimensions.innerHeight){landscape=true;}
body.innerHTML+='<div id="googleMapFooter">'+'<span>'+options.translates.googlemapPlayer.mapFooterText+'</span>'+'<span class="floatRight"><a href="#" onclick="gaOnclickCount(this); javascript:printElement(\'#sb-body-inner\', '+landscape+'); event.returnValue = false; return false;">'+options.translates.googlemapPlayer.mapPrintText+'</a></span>'+'</div>';}else{if(_this.type=='poi'){var transArray=options.translates.googlemapPlayer.mapInsertPoi;}else if(_this.type=='hotel'){var transArray=options.translates.googlemapPlayer.mapInsertHotel;}
var text='<div id="googleMapInsertText" class="gmSubinfoLightbox">'+'<div class="floatRight">'+'<div id="addMarkerButtonContainer">'+'<div class="formButton">'+'<button name="clickForInsertButton" id="clickForInsertButtonAddMarker" type="button" value="'+transArray.mapInsertAddMarkerText+'" class="buttonMiddle buttonMiddleContent mpt[replay:click]" onfocus="this.blur();">'+'<span>'+transArray.mapInsertAddMarkerText+'</span>'+'</button>'+'<div class="clearFix">&nbsp;</div>'+'</div>'+'</div>'+'<div id="saveMarkerButtonContainer" class="displayNone">'+'<div class="formButton">'+'<button name="clickForInsertButton" id="clickForInsertButtonSaveMarker" type="button" value="'+transArray.mapInsertSaveMarkerText+'" class="buttonMiddle buttonMiddleContent mpt[replay:click]" onfocus="this.blur();">'+'<span>'+transArray.mapInsertSaveMarkerText+'</span>'+'</button>'+'<div class="clearFix">&nbsp;</div>'+'</div>'+'</div>'+'</div>'+'<div class="floatLeft gmInsertInfo">'+'<strong>'+transArray.mapInsertClaim+'</strong>'+'<p></p>'+'<strong>'+transArray.mapInsertDescriptionHeadline+'</strong>'+'<ol class="defaultList secondary">';jQuery(transArray.mapInsertDescriptionList).each(function(i,item){text+='<li>'+item+'</li>';});text+='</ol>'+'</div>'+'<div class="clearFix"></div>'+'</div>';body.innerHTML+=text;jQuery('#clickForInsertButtonAddMarker').bind('click',function(){_this.map.addInsertMarker();$('addMarkerButtonContainer').setStyle('display','none');$('saveMarkerButtonContainer').setStyle('display','block');})
if(_this.type=='poi'){var saveMarkerUrl='/map?action=insertgmpoidetaillightbox&poiId='+_this.itemId;}else if(_this.type=='hotel'){var saveMarkerUrl='/map?action=insertgmhoteldetaillightbox&hotelId='+_this.itemId;}
jQuery('#clickForInsertButtonSaveMarker').bind('click',function(){if(confirm(transArray.mapInsertSaveMarkerConfirm)){_this.map.saveInsertMarker(saveMarkerUrl,function(){_this.insert=false;_this.wasInsert=true;_this.append(body,dims);},transArray.mapInsertSaveMarkerSuccess);}})}
_this.resizeMap();_this.map.load();}});},onWindowResize:function(){this.resizeMap();},onClose:function(){if(this.wasInsert){showLoadingAnimation();window.location.reload(true);}}}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){var S=Shadowbox;var $=jQuery;var HcImageData={'params':{},'async':false,'loadPrev':true,'loadNext':true,'gallery':[],'initialPosition':0,'lastGallery':'','ajaxHeaders':{"JavaScriptClient":"jQueryShadowboxHcImg"}};var Templates={'reportFormContent':''
+'<img id="close" src="https://media.holidaycheck.com/data/image/content/upload/icn_close.png" />'
+'<div class="sb-reportform-content">'
+'<div class="transparency"></div>'
+'{{content}}'
+'</div>','reportForm':'<div id="sb-reportform"></div>','socialContent':''
+'<div id="reportPicture">'
+'<a href="{{reportUrl}}">{{reportText}}</a>'
+'</div>'
+'<div class="fb-like" data-width="370" data-send="false"'
+' data-layout="button_count" data-action="like"'
+' data-show-faces="false" data-href="{{siteUrl}}">'
+'</div>'
+'<div class="tweeterSocialButton"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a></div>'
+'<div id="sb-plusone" class="g-plusone" data-href="{{siteUrl}}"></div>'
+'<div id="sb-pinit">'
+'<a href="http://pinterest.com/pin/create/button/?url={{siteUrl}}%2F&media={{imgUrl}}&description={{description}}"'
+'class="pin-it-button" count-layout="none">'
+'<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />'
+'</a>'
+'</div>','social':'<div id="sb-social-helper"><div id="sb-social"></div><div class="sb-social-bg"></div></div>','additional':'<div id="sb-additional"></div>',getTemplate:function(template,data){var tmp=Templates[template];$.each(data,function(key,value){var replace=new RegExp("{{"+key+"}}","g");tmp=tmp.replace(replace,value);});return tmp;}};var imageLoader=null;S.hcimg=function(obj,id){this.init(obj);imageLoader.parseObject(obj);this.obj=S.getCurrent();this.loadPictureInfo();imageLoader.preloadImage(function(image){this.ready=true;this.width=image.width;this.height=image.height;this.obj.path=image.src;}.bind(this),S.current);}
S.hcimg.prototype=$.extend({},S.img.prototype);S.hcimg.prototype.init=function(obj){S.options.enableKeys=false;if(imageLoader==null){imageLoader=new HcImageLoader();}
if(typeof obj.gallery!='undefined'&&HcImageData.lastGallery!=obj.gallery){HcImageData.lastGallery=obj.gallery;imageLoader.resetParams();}
this.additional=$('#sb-body #sb-additional');if(this.additional.length==0){this.additional=$(Templates.getTemplate('additional',{})).appendTo('#sb-body');}
this.social=$('#sb-wrapper #sb-social');if(this.social.length==0){$(Templates.getTemplate('social',{})).appendTo('#sb-wrapper');this.social=$('#sb-wrapper #sb-social');}
this.reportForm=$('#sb-wrapper #sb-reportform');if(this.reportForm.length==0){this.reportForm=$(Templates.getTemplate('reportForm',{})).appendTo('#sb-wrapper');}
this.reportForm.html('').addClass('displayNone').removeClass('contentLoaded');this.social.html('');this.additional.html('');$('#sb-wrapper').addClass('loading');gaOnclickCountName("Mediafullscreen/Shadowbox");this.ready=false;};S.hcimg.prototype.setDimensions=function(obj){if(typeof S.player.obj!='undefined'&&typeof S.player.obj.infoUrl!='undefined'&&S.player.obj.infoUrl!=''){obj.leftRight=320;}
return obj;};S.hcimg.prototype.append=function(body,dims){var img=document.createElement("img");img.id=this.id;img.src=this.obj.path;img.style.position="absolute";var height,width;if(dims.oversized&&S.options.handleOversize=="resize"){height=dims.innerHeight;width=dims.innerWidth;}else{height=this.height;width=this.width;}
img.setAttribute("height",height);img.setAttribute("width",width);body.appendChild(img);this.social.html(Templates.getTemplate('socialContent',{'reportUrl':this.obj.reportUrl,'reportText':this.obj.reportTranslate,'siteUrl':this.obj.url,'imgUrl':this.obj.path,'description':this.obj.title}));jQuery(document).on('click','#reportPicture a',function(){this.loadReportForm();return false;}.bind(this));if(typeof gapi!="undefined"){gapi.plusone.render('sb-plusone',{"size":"medium","annotation":"none"});}
$.getScript('http://assets.pinterest.com/js/pinit.js');$.getScript('http://platform.twitter.com/widgets.js');$('#sb-wrapper').removeClass('loading');setTimeout(function(){this.setElementsWidth(width);}.bind(this),100);};S.hcimg.prototype.onWindowResize=function(){S.img.prototype.onWindowResize();var dims=S.dimensions;var width=S.options.handleOversize?dims.innerWidth:this.width;this.setElementsWidth(width);}
S.hcimg.prototype.remove=function(){this.additional.remove();$('#sb-social-helper').remove();this.reportForm.remove();$('#sb-nav, #sb-title').removeAttr('style');S.options.enableKeys=true;S.img.prototype.remove();};S.hcimg.prototype.setElementsWidth=function(width){$('#sb-nav, #sb-title').width(width+40);this.social.parent(1).width(width);var wrapper=$('#sb-wrapper-inner');if(wrapper.height()<this.additional.height()){wrapper.height(this.additional.height());}}
S.hcimg.prototype.loadReportForm=function(){$('#reportPicture').addClass('loading');if(this.reportForm.hasClass('contentLoaded')){$('#reportPicture').removeClass('loading');this.reportForm.removeClass('displayNone');}else{$.ajax({url:$('#reportPicture a').attr('href'),headers:HcImageData.ajaxHeaders,success:function(data){this.reportForm.html(Templates.getTemplate('reportFormContent',{'content':data.content})).removeClass('displayNone').addClass('contentLoaded');this.reportForm.find('#close').bind('click',function(){this.reportForm.addClass('displayNone');}.bind(this));this.reportForm.find('.buttonMiddleContent').bind('click',function(){$('#reportPicture').addClass('loading');}.bind(this));$('#reportPicture').removeClass('loading');}.bind(this),async:true});}};S.hcimg.prototype.setReportFormStatus=function(content){$('#reportPicture').removeClass('loading');this.reportForm.html(Templates.getTemplate('reportFormContent',{'content':content})).removeClass('contentLoaded');this.reportForm.find('#close').bind('click',function(){this.reportForm.addClass('displayNone');}.bind(this));this.reportForm.find('.buttonMiddleContent').bind('click',function(){$('#reportPicture').addClass('loading');}.bind(this));};S.hcimg.prototype.loadPictureInfo=function(){if(typeof this.obj.infoUrl!='undefined'&&this.obj.infoUrl!=''){this.additional.css('height','100px');showLoadingAnimationForElement('sb-additional');$.ajax({url:this.obj.infoUrl,headers:HcImageData.ajaxHeaders,success:function(data){this.additional.removeAttr('style');hideLoadingAnimationForElement('sb-additional');this.additional.html(data);var category=this.additional.find('#category');category.bind('change',function(event,k){$('#sb-loading').css('display','block');$('#sb-body-inner img').css('display','none');var categoryType=parseInt(this.additional.find('#categoryType').val());if(typeof HcImageData.params.mediaCategoryMainId!='undefined')
delete HcImageData.params.mediaCategoryMainId;if(typeof HcImageData.params.mediaCategorySubId!='undefined')
delete HcImageData.params.mediaCategorySubId;if(category.val()>0&&categoryType==0)
HcImageData.params.mediaCategorySubId=category.val();if(category.val()>0&&categoryType==1)
HcImageData.params.mediaCategoryMainId=category.val();imageLoader.loadImageData(this.obj.url,{'params':{'changecategory':1}},true);S.current++;S.previous();}.bind(this));}.bind(this),error:function(){hideLoadingAnimationForElement('sb-additional');this.additional.html('');}.bind(this),async:true});}}
var HcImageLoader=function(){};HcImageLoader.prototype={parseObject:function(obj){if(typeof obj.content!='undefined'){HcImageData.galleryName=obj.gallery;if(HcImageData.gallery.length==0){obj.params=obj.params.replace('&quot;','"');$.extend(true,HcImageData.params,$.parseJSON(obj.params));this.loadImageData(obj.content,{},true);}else{S.gallery=HcImageData.gallery;S.current=HcImageData.initialPosition;}}else{var prevIndex=(S.current-3)>=0?(S.current-3):0;if(this.getObject(prevIndex)==null&&HcImageData.params.loadPrev){this.loadImageData(this.getObject(S.current-2).url,{'async':true,'params':{'loadNext':-1,'loadPrev':6}});}else if(S.current>(HcImageData.gallery.length-3)&&HcImageData.params.loadNext){this.loadImageData(this.getLast().url,{'async':true,'params':{'loadPrev':-1,'loadNext':6}});}}},resetParams:function(){HcImageData.params.loadPrev=3;HcImageData.params.loadNext=3;HcImageData.gallery=[];HcImageData.initialPosition=0;},loadImageData:function(url,params,initial){if(initial){this.resetParams();}
var params=$.extend(true,{},HcImageData,params);$.ajax({url:url,headers:HcImageData.ajaxHeaders,data:params.params,success:function(json){$.each(json,function(key,val){val.number--;var object=this.getObject(val.number);if(object==null||object.dummy==true){val.player='hcimg';val.dummy=false;HcImageData.gallery[val.number]=val;}
if(val.current==true&&initial==true){HcImageData.initialPosition=S.current=val.number;var dummy={'player':'hcimg','dummy':true};$.each(HcImageData.gallery,function(key){if(this.getObject(key)==null){HcImageData.gallery[key]=dummy;}}.bind(this));}}.bind(this));S.gallery=HcImageData.gallery;}.bind(this),async:params.async});},preloadImage:function(callback,index,autoloading){if((object=this.getObject(index))){var pre=new Image();pre.onload=function(){callback(pre);pre.onload=null;pre=null;}.bind(this);pre.src=object.path;if(!autoloading){this.preloadImage(function(){},index-1,true);this.preloadImage(function(){},index+1,true);}}},getObject:function(index){if(typeof HcImageData.gallery[index]!='undefined'&&HcImageData.gallery[index].dummy==false){return HcImageData.gallery[index];}
return null;},getLast:function(){return this.getObject(HcImageData.gallery.length-1);}};});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){var S=Shadowbox;var $=jQuery;S.picturesgallerypl=function(obj,id){this.obj=obj;this.id=id;this.wrapper=$('#sb-wrapper');this.wrapper.addClass('pictures-lightbox-pl');this.container=jQuery('body',jQuery('iframe#sb-player').contents());var overlay=document.getElementById("sb-overlay");this.height=obj.height?parseInt(obj.height,10):overlay.offsetHeight;this.width=obj.width?parseInt(obj.width,10):overlay.offsetWidth;};S.picturesgallerypl.prototype=$.extend({},S.iframe.prototype);S.picturesgallerypl.prototype.remove=function(){var el=document.getElementById(this.id);if(el){el.parentNode.removeChild(el);try{delete window.frames[this.id];}catch(err){}}
this.wrapper.removeClass('pictures-lightbox-pl big-lightbox');};S.picturesgallerypl.prototype.onWindowResize=function(){if(window.innerWidth>1050){if(window.innerHeight>=755){$('#sb-wrapper').addClass('big-lightbox');jQuery('body',jQuery('iframe#sb-player').contents()).addClass('big-lightbox');}else{$('#sb-wrapper').removeClass('big-lightbox');jQuery('body',jQuery('iframe#sb-player').contents()).removeClass('big-lightbox');}}}
S.picturesgallerypl.prototype.setDimensions=function(obj){if(window.innerWidth>=1050&&window.innerHeight>=755&&obj.width==1010&&obj.height==600){obj.height=665;$('#sb-wrapper').addClass('big-lightbox');}
return obj;};});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){Shadowbox.popup=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):800;this.popup=null;}
Shadowbox.popup.prototype={remove:function(){},append:function(body,dims){var popupName=this.obj.title;if($defined(this.obj.popupname)){popupName=this.obj.popupname;}
var resizable='no';if(typeof this.obj.resizable=='undefined'){resizable=(this.obj.resizable==true||this.obj.resizable=='yes'?'yes':'no');}
var scrollbars='yes';if(typeof this.obj.scrollbars=='undefined'){switch(this.obj.scrollbars){case false:scrollbars='no';case'yes':case'auto':scrollbars=this.obj.scrollbars;break;}}
var popUpOptions='width='+this.width
+',height='+this.height
+',scrollbars='+scrollbars
+',resizable='+resizable
+',dependent=1'
+',menubar=0'
+',location=0'
+',status=no';if(typeof popupName!=="undefined"&&navigator.appName=='Microsoft Internet Explorer'){popupName=popupName.replace(/[^a-z0-9]/gi,'_');}
this.popup=window.open(this.obj.content,popupName,popUpOptions);}}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHAPLA */
try{
jQuery(document).bind('initShadowboxPlayers',function(event,options){Shadowbox.customPlayers.video={'ext':["mp4"]};Shadowbox.video=function(obj,id){this.obj=obj;this.id=id;this.height=obj.height?parseInt(obj.height,10):300;this.width=obj.width?parseInt(obj.width,10):800;}
Shadowbox.video.prototype={remove:function(){},append:function(body,dims){var url=this.obj.content;body.innerHTML='<video width="'+dims.innerWidth+'" height="'+dims.innerHeight+'" autoplay="autoplay" controls="controls">'+'<source type="video/mp4" src="'+url+'" />'+'</video>';}}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHAPLA', bundleError);}


/* CUSCORSHASKI */
try{
jQuery(document).bind('initShadowboxSkins',function(event,options){Shadowbox.skin.infourl='';Shadowbox.skin.markup=""+'<div id="sb-container">'+'<div id="sb-overlay"></div>'+'<div id="sb-wrapper">'+'<div id="sb-hcHeader"><div id="sb-hcLogo"></div><a id="sb-hcClose" onclick="Shadowbox.close()">'+options.translates.closeText+'</a></div>'+'<div id="sb-title">'+'<div id="sb-title-inner"></div>'+'</div>'+'<div id="sb-nav">'+'<div class="nextPage">'+'<a id="sb-nav-next" class="nHl mediaNavigation" onclick="Shadowbox.next()"><div><span></span></div></a>'+'</div>'+'<div class="previousPage">'+'<a id="sb-nav-previous" class="nHl mediaNavigation"  onclick="Shadowbox.previous()"><div><span></span></div></a>'+'</div>'+'</div>'+'<div id="sb-wrapper-inner">'+'<div id="sb-body">'+'<div id="sb-body-inner"></div>'+'<div id="sb-loading"></div>'+'</div>'+'</div>'+'<div id="sb-info">'+'<div id="sb-info-inner">'+'<div id="sb-counter"></div>'+'</div>'+'</div>'+'</div>'+'</div>';var oldSkinOnReady=Shadowbox.skin.onReady;Shadowbox.skin.onReady=function(callback){oldSkinOnReady(function(){callback();var currentPlayer=Shadowbox.player.obj.player;var player='player'
+currentPlayer.charAt(0).toUpperCase()
+currentPlayer.slice(1);jQuery('#sb-container').attr('class',player);var displayNavigation=function(){var hover=jQuery('.playerVideo #sb-wrapper, .playerImg #sb-wrapper, .playerHcimg #sb-body-inner img, .playerHcimg #sb-nav, #sb-social-helper, #sb-reportform');var wrapper=jQuery('#sb-wrapper');hover.on('mouseenter',function(){wrapper.removeClass('disableControlles');});hover.on('mouseleave',function(){wrapper.addClass('disableControlles');});};switch(currentPlayer){case'iframe':jQuery('iframe#sb-player').height('95%');break;case'img':case'hcimg':jQuery('#sb-nav a, #sb-nav').height(jQuery('#sb-body').height());displayNavigation();break;case'video':jQuery('#sb-nav a').height('auto');jQuery('#sb-nav').height('auto');displayNavigation();break}});};});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSHASKI', bundleError);}


/* CUSCORSUG */
try{
if(Hc.register){Hc.register('Hc.Autocompleter');Hc.Autocompleter.MooTools=new Class({Extends:Autocompleter.Request.JSON,adapter:null,doPagination:false,hintTextForEmptiness:'',doSubmit:true,doMarkFirstItem:true,itemChannel:'',currentRequestType:'',additionalOffsetTop:0,additionalOffsetLeft:0,initialize:function(el,url,options,focus,hintTextForEmptiness,doSubmit,doMarkFirstItem){this.parent(el,url,options);if($defined(focus)&&true==focus){this.element.focus();}
if($defined(hintTextForEmptiness)){this.hintTextForEmptiness=hintTextForEmptiness;}
if($defined(doSubmit)){this.doSubmit=doSubmit;}
if($defined(doMarkFirstItem)){this.doMarkFirstItem=doMarkFirstItem;}},query:function(){this.options.postData=this.adapter.getParams();this.parent();},queryResponse:function(response){this.currentRequestType='';var result=new Array();this.itemChannel=response.target;response.items.each(function(token){var label=token.label;result.push(token);});this.update(result);},update:function(tokens){this.choices.empty();this.cached=tokens;var type=tokens&&$type(tokens);var sL=this.adapter.specialLink||null;if((!type||(type=='array'&&!tokens.length)||(type=='hash'&&!tokens.getLength()))&&(!$chk(sL)||(!$chk(sL.options.printEvenIfResultIsEmpty)||!sL.options.printEvenIfResultIsEmpty))){this.handleNonAvailabilityOfChoices();}else{if(this.options.maxChoices<tokens.length&&!this.options.overflow)tokens.length=this.options.maxChoices;this.printSpecialLinkIfRequested('top');if(this.adapter.page>1){this.createPaginationElement('back');}
var odd=true;var tokenCounter=0;var hintToken=false;var first='';tokens.each(this.options.injectChoice||function(token){tokenCounter++;if(this.doMarkFirstItem&&tokenCounter==0){first=' autocompleter-selected';}
if(tokenCounter<=this.adapter.offset){var oddClass='line-odd'+first;if(odd){odd=false;}else{oddClass='line-even';odd=true;}
token.label=token.label.trim();var choice=new Element('li',{'html':this.markQueryValue(token.label)});choice.addClass(oddClass);choice.setAttribute('inputValue',token.label);choice.setAttribute('itemId',token.id);choice.setAttribute('itemType',token.typ);if(token.typ=='hint'){this.addHintEvents(choice).inject(this.choices);hintToken=true;}else{this.addChoiceEvents(choice).inject(this.choices);}}},this);var numberTokens=tokens.length;if(hintToken==true){numberTokens-=1;}
if(numberTokens>this.adapter.offset){this.createPaginationElement('next');}
this.printSpecialLinkIfRequested('bottom');this.showChoices();jQuery(this.choices).offset({top:jQuery(this.element).offset().top+jQuery(this.element).outerHeight()+this.additionalOffsetTop});jQuery(this.choices).offset({left:jQuery(this.element).offset().left+this.additionalOffsetLeft});if(this.doMarkFirstItem){var choice=(this.selected||this.choices)[(this.selected)?'getNext':'getFirst'](this.options.choicesMatch);this.choiceOver(choice,false);}}},handleNonAvailabilityOfChoices:function(){if($chk(this.hintTextForEmptiness)){var choice=new Element('li',{'html':this.markQueryValue(this.hintTextForEmptiness)});choice.setAttribute('inputValue',this.hintTextForEmptiness);this.addHintEvents(choice).inject(this.choices);}else{(this.options.emptyChoices||this.hideChoices).call(this);}},hideChoices:function(clear){this.parent(clear);},addHintEvents:function(el){el.addClass('suggestHint');return el;},onCommand:function(e){if(!e&&this.focussed)return this.prefetch();if(e&&e.key&&!e.shift){switch(e.key){case'enter':case'tab':if(null!=this.selected){if(this.selected.hasClass('autocompleter-pagination-next')){this.nextPage(e);return false;}
if(this.selected.hasClass('autocompleter-pagination-back')){this.previousPage(e);return false;}
if(this.selected.hasClass('suggestHint')){return false;}
if($chk(this.adapter.specialLink)){if(this.selected.hasClass('specialLink')){this.adapter.specialLink.options.onclick();return false;}}}
if(this.selected&&this.visible){this.choiceSelect(this.selected);return!!(this.options.autoSubmit);}
if(!this.doSubmit){if(this.doMarkFirstItem){this.choiceSelect(this.selected);return!!(this.options.autoSubmit);}else{if('enter'==e.key||'tab'==e.key){return false;}}}
break;case'up':case'down':if(!this.prefetch()&&this.queryValue!==null){var up=(e.key=='up');var choice=(this.selected||this.choices)[(this.selected)?((up)?'getPrevious':'getNext'):((up)?'getLast':'getFirst')](this.options.choicesMatch);if(null!=choice&&null!=this.selected){if('down'==e.key&&(this.selected.hasClass('autocompleter-pagination-next')||choice.hasClass('autocompleter-pagination-next'))){this.nextPage(e);return false;}
if('up'==e.key&&(this.selected.hasClass('autocompleter-pagination-back')||choice.hasClass('autocompleter-pagination-back'))){this.previousPage(e);return false;}}
this.choiceOver(choice,false);if(this.selected.getElements('hr').length){var choice=this.selected[((up)?'getPrevious':'getNext')](this.options.choicesMatch);this.choiceOver(choice,false);}}
return false;case'esc':this.hideChoices(true);break;case'left':case'right':return true;}
this.adapter.page=1;return true;}
this.adapter.page=1;this.options.postData=this.adapter.getParams();if(0<this.element.value.length&&2>=this.element.value.length){this.query();}
return true;},createPaginationElement:function(type){if('next'!=type&&'back'!=type)return;var paginationElement=new Element('li',{'html':type==='back'?'Zurück':'Weiter','class':'autocompleter-pagination autocompleter-pagination-'+type});paginationElement.addEvents({'mouseover':this.onPaginationElementMouseOver.bind(this,[paginationElement]),'mouseout':this.onPaginationElementMouseOut.bind(this,[paginationElement])});if('next'==type){paginationElement.addEvents({'click':this.nextPage.bind(this,[paginationElement])});}else if('back'==type){paginationElement.addEvents({'click':this.previousPage.bind(this,[paginationElement])});}
paginationElement.inject(this.choices);},printSpecialLinkIfRequested:function(position){if($chk(this.adapter.specialLink)){var sL=this.adapter.specialLink;if($chk(sL.options.position)&&sL.options.position==position){var separator=new Element('li',{'html':'<hr class="separatorLight">'});if($chk(sL.options.withSeparator)&&sL.options.withSeparator&&position=="bottom"){separator.inject(this.choices);}
var choice=new Element('li',{'html':sL.text});choice.addClass('specialLink');choice.addEvents({'mouseover':this.onPaginationElementMouseOver.bind(this,[choice]),'mouseout':this.onPaginationElementMouseOut.bind(this,[choice])});if($chk(sL.options.onclick)&&typeof sL.options.onclick=='function'){choice.addEvents({'click':sL.options.onclick.bind(this,[choice])});}
choice.inject(this.choices);if($chk(sL.options.withSeparator)&&sL.options.withSeparator&&position=="top"){separator.inject(this.choices);}}}},onPaginationElementMouseOver:function(element){this.doPagination=true;this.choiceOver(element,false);},onPaginationElementMouseOut:function(element){this.doPagination=false;},toggleFocus:function(state){if(this.doPagination){this.element.focus();state=true;this.doPagination=false;}
this.focussed=state;if(!state)this.hideChoices(true);this.fireEvent((state)?'onFocus':'onBlur',[this.element]);},nextPage:function(event){if(this.currentRequestType==''){this.adapter.page++;this.currentRequestType='next';this.query();}},previousPage:function(event){if(this.adapter.page>1&&this.currentRequestType==''){this.adapter.page--;this.currentRequestType='back';this.query();}}});Hc.Autocompleter.MooTools.prototype.fix=false;Hc.SuggestSearch=function(type,input,output,url,defaultText,setFocus){Hc.SuggestSearch.searchFields[type]=this;this.type=type;this.url=url;this.input=input;this.output=output;this.defaultText=defaultText;this.setFocus=setFocus;this.autocompleter=null;this.suggestSelectHandler=null;this.id=type;this.specialLink=null;};Hc.SuggestSearch.searchFields=[];Hc.SuggestSearch.prototype.url='';Hc.SuggestSearch.prototype.page=1;Hc.SuggestSearch.prototype.offset=7;Hc.SuggestSearch.prototype.requestParams=[];Hc.SuggestSearch.prototype.getMin=function(){var min=1+((this.page-1)*this.offset);return min;};Hc.SuggestSearch.prototype.getMax=function(){var max=this.page*this.offset;return max;};Hc.SuggestSearch.prototype.getParams=function(){var params={};params['von']=this.getMin();params['bis']=this.getMax()+1;if(this.type=='hotelsearch'||this.type=='hotelName'){if($defined(Hc.SuggestSearch.searchFields['targetsearch'])){var targetsearch=Hc.SuggestSearch.searchFields['targetsearch'];var targetType=this.getTargetType($(targetsearch.id+'_type').value);var targetId=$(targetsearch.id+'_value').value;if(''!=targetType&&''!=targetId&&'0'!=targetId){params['ziel']=targetType;params['zielid']=targetId;}}else if($defined(Hc.SuggestSearch.searchFields['locationName'])){var targetsearch=Hc.SuggestSearch.searchFields['locationName'];var targetType=this.getTargetType($(targetsearch.id+'_type').value);var targetId=$(targetsearch.id+'_value').value;if(''!=targetType&&''!=targetId&&'0'!=targetId){params['ziel']=targetType;params['zielid']=targetId;}}else{if($('target_0_help')!=null&&$('target_0_help').value!=''){var value=$('target_0_help').value;if(value=='3333'){params['distanz']='nah';}else if(value=='6666'){params['distanz']='mittel';}else if(value=='9999'){params['distanz']='fern';}else if(value==10035||value==10034||value==11||value==10033||value==10032){}else{params['ttids']=value;}}}}else if(this.type=='suggestQuickSearch'){params['tags']=true;}else if(this.type=='suggestForceInput'&&this.input.id=='userSearch'){params['spellchecker']=false;}
return params;};Hc.SuggestSearch.prototype.getRequestUrl=function(){var url='';var slashPos=this.url.indexOf('/');if(slashPos>0||slashPos==-1){url+='/';}
url+=this.url;for(var i=0;i<this.requestParams.length;i++){var param=this.requestParams[i];if(-1==url.indexOf('?')){url+='?'+param['key']+'='+param['value'];}else{url+='&'+param['key']+'='+param['value'];}}
return url;};Hc.SuggestSearch.prototype.create=function(){var params=this.getParams();var options={ajaxOptions:{method:'get'},postVar:'anfrage',customChoices:$(this.output),postData:params,filterSubset:true,delay:200};this.inFocus=false;var hintTextForEmptiness='';var doSubmit=true;var doMarkFirstItem=false;switch(this.type){case'suggestQuickSearch':options['onSelect']=function(element,selected,selection){element.setAttribute('data-entered',element.value);}.bind(this);options['onSelection']=function(element,selected,value,input){var eventLabel=value;if(element.getAttribute('data-entered')){eventLabel=element.getAttribute('data-entered')+'|'+eventLabel;}
dataLayer.push({event:'event',eventCategory:'Quicksearch',eventAction:'Auto_Complete',eventLabel:eventLabel});var itemId=selected.getAttribute('itemId'),itemType=selected.getAttribute('itemType');element.blur();if(this.autocompleter.itemChannel!=''){this.suggestSelectHandler.setItemChannel(this.autocompleter.itemChannel);}
if(parent){this.suggestSelectHandler.setHrefObject(parent);}else{this.suggestSelectHandler.setHrefObject(window);}
this.suggestSelectHandler.handle(itemId,itemType,value);}.bind(this);var inputField=$(this.input);if(''==inputField.value.trim()){inputField.value=this.defaultText;inputField.addClass('inactivetext');}
inputField.addEvent('focus',function(event){if(!this.inFocus){inputField.value='';inputField.removeClass('inactivetext');}
this.inFocus=true;}.bind(this));inputField.addEvent('blur',function(){if(''==inputField.value.trim()){inputField.value=this.defaultText;inputField.addClass('inactivetext');this.inFocus=false;}}.bind(this));break;case'suggestForce':case'suggestForceInput':case'suggestForceInputSubmit':options['forceSelect']=true;options['onSelection']=function(element,selected,value,input){var itemId=selected.getAttribute('itemId'),itemType=selected.getAttribute('itemType');var suggestForceItemType=null;if($chk(itemType)){suggestForceItemType=itemType;}else if($chk($(element.get('id')+'_itemType').value)){suggestForceItemType=$(element.get('id')+'_itemType').value;}
if(this.type=='suggestForce'){element.blur();if(instanceOf(this.suggestSelectHandler,Hc.SuggestSelectFunctionHandler)){this.suggestSelectHandler.handle(itemId,suggestForceItemType,element.value);}else{this.suggestSelectHandler.setHrefObject(window);this.suggestSelectHandler.handle(itemId,suggestForceItemType);}}else{$(element.get('id')+'_itemId').value=itemId;$(element.get('id')+'_itemType').value=suggestForceItemType;element.blur();if(this.type=='suggestForceInputSubmit'){var formNode=element;while(!formNode.match('form')){formNode=formNode.getParent();}
formNode.submit();}}}.bind(this);if('suggestForceInputSubmit'==this.type&&''!=$(this.input).value.trim()){$(this.input).addEvent('blur',function(){if(''==$(this.input).value.trim()){$(this.input.id+'_itemId').value='';$(this.input.id+'_itemType').value='';this.input.form.submit();}}.bind(this));}
if(this.type=='suggestForceInput'||this.type=='suggestForceInputSubmit'){options['onFocus']=function(element){element.value='';}.bind(this);}
hintTextForEmptiness='Wir konnten leider keinen Treffer zu Ihrer Eingabe finden.';if(this.type=='suggestForceInput'){doSubmit=false;}
var inputField=$(this.input);if(''==inputField.value.trim()){inputField.value=this.defaultText;inputField.addClass('inactivetext');}
inputField.addEvent('focus',function(event){if(!this.inFocus){inputField.value='';inputField.removeClass('inactivetext');}
this.inFocus=true;}.bind(this));break;case'targetsearch':case'locationName':doMarkFirstItem=true;case'hotelsearch':var inputField=$(this.input);var inputValue=$(this.id+'_value');var inputType=$(this.id+'_type');if(''==inputField.value.trim()){inputField.value=this.defaultText;}
this.offset=10;doSubmit=false;inputField.addEvent('focus',function(event){if(!this.inFocus){inputField.value='';inputValue.value='0';}
this.inFocus=true;}.bind(this));inputField.addEvent('blur',function(){if(''==inputField.value.trim()){inputField.value=this.defaultText;inputField.removeClass('selected');this.inFocus=false;}else{if(''==inputValue.value){inputValue.value=inputField.value;inputType.value='user';}
inputField.addClass('selected');}}.bind(this));if(''!=inputValue.value){inputField.addClass("selected");}
if('targetsearch'==this.type||'locationName'==this.type){options['onSelection']=function(element,selected,value,input){window.setTimeout(function(){this.inFocus=false}.bind(this),10);inputValue.value=selected.getAttribute('itemId');inputType.value=selected.getAttribute('itemType');inputField.addClass("selected");inputField.blur();}.bind(this);}else if('hotelsearch'==this.type){options['onSelection']=function(element,selected,value,input){window.setTimeout(function(){this.inFocus=false}.bind(this),10);inputValue.value=selected.getAttribute('itemId');inputType.value='id';inputField.addClass("selected");inputField.blur();}.bind(this);}
break;case'hotelName':var inputField=$(this.input);if(''==inputField.value.trim()){inputField.value=this.defaultText;}
this.offset=10;doSubmit=false;inputField.addEvent('focus',Hc.SuggestSearch.HotelName.onFocus.bind(this));inputField.addEvent('blur',Hc.SuggestSearch.HotelName.onBlur.bind(this));options['onSelection']=Hc.SuggestSearch.HotelName.onSelection.bind(this);break;}
options['maxChoices']=this.offset+4;this.autocompleter=new Hc.Autocompleter.MooTools(this.input,this.getRequestUrl(),options,this.setFocus,hintTextForEmptiness,doSubmit,doMarkFirstItem);this.autocompleter.adapter=this;this.input=$(this.input);this.output=$(this.output);};Hc.SuggestSearch.prototype.setSuggestSelectUrl=function(url){var handler=new Hc.SuggestSelectUrlHandler(url);this.setSuggestSelectHandler(handler);};Hc.SuggestSearch.prototype.setSuggestSelectFunction=function(jsFunction){var handler=new Hc.SuggestSelectFunctionHandler(jsFunction);this.setSuggestSelectHandler(handler);};Hc.SuggestSearch.prototype.setSpecialLink=function(text,options){this.specialLink={"text":text,"options":options}};Hc.SuggestSearch.prototype.setSuggestSelectHandler=function(handler){this.suggestSelectHandler=handler;};Hc.SuggestSearch.prototype.setFieldIdPrefix=function(prefix){this.id=prefix;};Hc.SuggestSearch.prototype.getTargetType=function(target){switch(target){case'kid':return'kontinent';case'did':return'destination';case'lid':return'land';case'rid':return'region';case'oid':return'ort';}
return'';};Hc.SuggestSearch.HotelName={onSelection:function(element,selected,value,input){var itemId=selected.getAttribute('itemId'),itemType=selected.getAttribute('itemType');if($chk(itemType)){this.suggestSelectHandler.setHrefObject(window);this.suggestSelectHandler.handle(itemId,itemType);}},onBlur:function(event){var inputField=event.target;if(''==inputField.value.trim()){inputField.value=this.defaultText;inputField.removeClass('selected');this.inFocus=false;}else{inputField.addClass('selected');}},onFocus:function(event){var inputField=event.target;if(!this.inFocus){inputField.value='';}
this.inFocus=true;}};Hc.SuggestSelectHandler=new Class({setHrefObject:function(hrefObject){this.hrefObject=hrefObject;}});Hc.SuggestSelectUrlHandler=new Class({Extends:Hc.SuggestSelectHandler,urlPrefix:'',hrefObject:null,itemChannel:'',initialize:function(urlPrefix){this.urlPrefix=urlPrefix;},setItemChannel:function(itemChannel){this.itemChannel=itemChannel;},handle:function(itemId,itemType,searchQuery){var url=this.urlPrefix;if(-1==url.indexOf('?')){url=url+'?itemId='+itemId;}else{url=url+'&itemId='+itemId;}
url=url+'&itemType='+itemType;if(this.itemChannel!=''){url=url+'&itemChannel='+this.itemChannel;}
this.hrefObject.location.href=url+"&"+jQuery.param({q:searchQuery});}});Hc.SuggestSelectFunctionHandler=new Class({Extends:Hc.SuggestSelectHandler,jsFunction:function jsFunction(){},initialize:function(jsFunctionOrFunctionString){if(typeof jsFunctionOrFunctionString=="function"){this.jsFunction=jsFunctionOrFunctionString;}else{this.jsFunction=eval('this.jsFunction = '+jsFunctionOrFunctionString+';');}},handle:function(itemId,itemType,itemText){this.jsFunction.attempt([itemId,itemType,itemText]);}});function validateForm(defaultUrl){var x=document.forms["quickSearchForm"]["query"].value;dataLayer.push({event:'event',eventCategory:'Quicksearch',eventAction:'Lupe',eventLabel:x});if(!x||x==="Hotel oder Reiseziel eingeben"){window.location.href=defaultUrl;return false;}
var query_choices=document.getElementById('query_choices');if(1==query_choices.childNodes.length){var one_choise=query_choices.childNodes.item(0);var url=query_choices.getAttribute('suggestsearchurl'),itemId=one_choise.getAttribute('itemId'),itemType=one_choise.getAttribute('itemType');if(-1==url.indexOf('?')){url=url+'?itemId='+itemId;}else{url=url+'&itemId='+itemId;}
url=url+'&itemType='+itemType+"&"+jQuery.param({q:x});window.location.href=url;return false;}
var form=jQuery("#quickSearchForm"),action=form.attr("action");form.attr({action:action+"?"+jQuery.param({q:x})});}
function validateMediasliderForm(defaultUrl){var x=document.forms["quickSearchMediasliderForm"]["querymediaslider"].value;if(x==null||x==""||x=="Hotel oder Reiseziel eingeben"||x=="... název hotelu nebo cíl ..."||x=="Hotel or travel destination..."||x=="Hotel o destino..."||x=="Nom d'hôtel, ville, région, pays..."||x=="Hotel o destinazione..."||x=="Hotel of vakantiebestemming.."||x=="Wpisz nazwę hotelu lub kierunku"||x=="Отель или место отдыха..."||x=="酒店或旅游目的地（请输入英语或者拼音）..."){window.location.href=defaultUrl;return false;}
var query_choices=document.getElementById('querymediaslider_choices');if(1==query_choices.childNodes.length){var one_choise=query_choices.childNodes.item(0);var url=query_choices.getAttribute('suggestsearchurl'),itemId=one_choise.getAttribute('itemId'),itemType=one_choise.getAttribute('itemType');if(-1==url.indexOf('?')){url=url+'?itemId='+itemId;}else{url=url+'&itemId='+itemId;}
url=url+'&itemType='+itemType;window.location.href=url;return false;}}}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORSUG', bundleError);}


/* CUSCORTAB */
try{
switchTabPane=function(containerId,tabIndex,paneId){var container=jQuery('#'+containerId),tabSwitchesContainer=container.find('#'+containerId+'_tablist'),panesContainer=container.find('div[class^=hcwidgetTabPaneWrapper]');panesContainer.children().each(function(){var item=jQuery(this);if(item.attr('id')==paneId){item.show();}else{item.hide();}});tabSwitchesContainer.children().each(function(){var item=jQuery(this),radio=item.find('input[type=radio]');if(item.attr('id')==containerId+'MetaTabSwitch_'+tabIndex){item.addClass('hcwidgetTabChecked');item.addClass('hcwidgetChecked');radio.attr('checked','checked');}else{item.removeClass('hcwidgetTabChecked');item.removeClass('hcwidgetChecked');radio.removeAttr('checked');}});tabSwitchesContainer.find('a').each(function(){var link=jQuery(this);if(link.hasClass('current')){link.removeClass('current');}
jQuery('#'+containerId+'MetaTabSwitch_'+tabIndex).addClass('current');return;});};switchMetaTabPane=function(containerId,tabIndex,paneId){var container=jQuery('#'+containerId),tabSwitchesContainer=container.find('#'+containerId+'_tablist'),panesContainer=container.find('div[class^=hcwidgetTabPaneWrapper]');panesContainer.children().each(function(){var item=jQuery(this);if(item.attr('id')==paneId){item.show();}else{item.hide();}});if(jQuery('.liTab0 input').is(':checked')){jQuery('.liTab0 span').addClass('sel');jQuery('.liTab1 span').removeClass('sel');}
if(jQuery('.liTab1 input').is(':checked')){jQuery('.liTab1 span').addClass('sel');jQuery('.liTab0 span').removeClass('sel');}
tabSwitchesContainer.find('a').each(function(){var link=jQuery(this);if(link.hasClass('current')){link.removeClass('current');}
jQuery(containerId+'MetaTabSwitch_'+tabIndex).addClass('current');});};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORTAB', bundleError);}


/* CUSCORTEM */
try{
var temptation=function(){function _init(){jQuery('.home #temptation .choice ul li a').click(function(){return _tabChange(jQuery(this));});jQuery('#destinationWidgetMetaTabSwitch_x').hover(function(){jQuery('.home #temptation .level2 ul li').show();},function(){_manageLevel2Bar();});jQuery('.home #temptation .level2 ul').hover(function(){jQuery('.home #temptation .level2 ul li').show();jQuery('#destinationWidgetMetaTabSwitch_x').parent().addClass('selected');},function(){_manageLevel2Bar();});}
function _tabChange(param){tabId=((param.attr('id')).split('_'))[1];if(tabId!='x'){jQuery('.home #temptation .result').hide();jQuery('.home #temptation .continent-'+tabId).show();jQuery('.home #temptation .illustration div').hide();jQuery('.home #temptation .illustration div.photo-'+tabId).show();if(jQuery(param).parents("div.level2").hasClass('level2')){jQuery('.home #temptation .level2 ul li').show();jQuery('#destinationWidgetMetaTabSwitch_x').parent().addClass('selected');}else{jQuery('.home #temptation .level2 ul li').hide();}
jQuery('.home #temptation .choice ul li').removeClass('selected');jQuery(param).parent().addClass('selected');}
return false;}
function _manageLevel2Bar(){isSelected=0;jQuery('.home #temptation .choice .level2 ul li').each(function(){if(jQuery(this).hasClass('selected')){isSelected=1;}});if(!isSelected){jQuery('.home #temptation .level2 ul li').hide();jQuery('#destinationWidgetMetaTabSwitch_x').parent().removeClass('selected');}}
return{init:function(){_init();}}}();jQuery(document).ready(function(){temptation.init();});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORTEM', bundleError);}


/* CUSCORTOG */
try{
var toggleRunning=false;toggling=function(idElement,idActivator,toggleActivatorsDisplay){var elementToToggle=$(idElement);if(!$defined(elementToToggle)){return;}
if(idActivator!=null)
{var fxReveal=new Fx.Reveal(elementToToggle,{duration:250,onShow:function(){toggleOnShow(idElement,idActivator,toggleActivatorsDisplay);toggleRunning=false;},onHide:function(){toggleOnHide(idElement,idActivator,toggleActivatorsDisplay);toggleRunning=false;}});if(!toggleRunning){toggleRunning=true;fxReveal.toggle();}}
else{var fxReveal=new Fx.Reveal(elementToToggle,{duration:250});fxReveal.toggle();}
return true;};togglingOwnTime=function(idElement,idActivator,toggleActivatorsDisplay,time){var elementToToggle=$(idElement);if(!$defined(elementToToggle)){return;}
milliseconds=parseInt(time);var fxReveal=new Fx.Reveal(elementToToggle,{duration:milliseconds,onShow:function(){toggleOnShow(idElement,idActivator,toggleActivatorsDisplay);},onHide:function(){toggleOnHide(idElement,idActivator,toggleActivatorsDisplay);}});fxReveal.toggle();return true;};toggleOnShow=function(idElement,idActivator,toggleActivatorsDisplay)
{var activatorOn=idActivator+'On';activatorOn=$(activatorOn);var activatorOff=idActivator+'Off';activatorOff=$(activatorOff);if(toggleActivatorsDisplay){activatorOff.setStyle('display','none');activatorOn.setStyle('display','block');}else{tmpHtml=activatorOn.innerHTML;activatorOn.innerHTML=activatorOff.innerHTML;activatorOff.innerHTML=tmpHtml;tmpOnClick=activatorOn.onClick;}
var toggleTextElement=$(idElement+'ToggleText');if(toggleTextElement){toggleTextElement.removeClass('defaultToggleTextOff').addClass('defaultToggleTextOn');}};toggleOnHide=function(idElement,idActivator,toggleActivatorsDisplay)
{var activatorOn=idActivator+'On';activatorOn=$(activatorOn);var activatorOff=idActivator+'Off';activatorOff=$(activatorOff);if(toggleActivatorsDisplay){activatorOn.setStyle('display','none');activatorOff.setStyle('display','block');}else{tmpHtml=activatorOff.innerHTML;activatorOff.innerHTML=activatorOn.innerHTML;activatorOn.innerHTML=tmpHtml;}
var toggleTextElement=$(idElement+'ToggleText');if(toggleTextElement){toggleTextElement.removeClass('defaultToggleTextOn').addClass('defaultToggleTextOff');}};
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORTOG', bundleError);}


/* CUSCORUPD */
try{
function updateElementGET(url,id,handleType,checkLogin,redirect,showGlobalSpinner,showSpinnerForElementID,updateShadowboxGallary)
{if(typeof handleType=='undefined')handleType='text';if(typeof showGlobalSpinner=='undefined')showGlobalSpinner=true;if(typeof showSpinnerForElementID=='undefined')showSpinnerForElementID=false;if(showGlobalSpinner)showLoadingAnimation();else if(showSpinnerForElementID)showLoadingAnimationForElement(showSpinnerForElementID,url);if(handleType=='text'){var htmlRequest=new Request.HTML({method:'get',url:url,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){$(id).innerHTML=responseHTML;if(showGlobalSpinner==true){hideLoadingAnimation();}},onFailure:function(xhr){if(showGlobalSpinner==true){hideLoadingAnimation();}}});htmlRequest.send();}else if(handleType=='json'){var jsonRequest=new Request.JSON({method:'get',url:url,onSuccess:function(responseJSON,responseText){if(checkLogin&&responseJSON.login!='logged_in'){if(redirect){window.location.reload();}
else{handleMhcAjaxLogin(responseJSON,'updateElementGET(\''+url+'\', \''
+id+'\', \''
+handleType+'\', '
+checkLogin+');',0);}}else{$(id).innerHTML=responseJSON.content;if(responseJSON.info&&$(id+'Info')){$(id+'Info').innerHTML=responseJSON.info;}}
if(showGlobalSpinner==true){hideLoadingAnimation();}},onFailure:function(xhr){if(showGlobalSpinner==true){hideLoadingAnimation();}}});jsonRequest.send();}}
function updateElementPOST(url,id,formId,handleType,checkLogin,showGlobalSpinner,showSpinnerForElementID)
{var form=$(formId);if(typeof handleType=='undefined')handleType='text';if(typeof showGlobalSpinner=='undefined')showGlobalSpinner=true;if(typeof showSpinnerForElementID=='undefined')showSpinnerForElementID=false;if(showGlobalSpinner==true){showLoadingAnimation();}
if(showSpinnerForElementID!=false){showLoadingAnimationForElement(showSpinnerForElementID);}
if(handleType=='text'){var htmlRequest=new Request.HTML({url:url,onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){$(id).empty();var newdiv=new Element('div',{id:'tempContainer'});newdiv.innerHTML=responseHTML;var container=$(id);newdiv.inject(container,'top');if(showGlobalSpinner==true){hideLoadingAnimation();}
if(showSpinnerForElementID!=false){hideLoadingAnimationForElement(showSpinnerForElementID);}},onFailure:function(xhr){if(showGlobalSpinner==true){hideLoadingAnimation();}
if(showSpinnerForElementID!=false){hideLoadingAnimationForElement(showSpinnerForElementID);}}});htmlRequest.post(form);}else if(handleType=='json'){var jsonRequest=new Request.JSON({url:url,onSuccess:function(responseJSON,responseText){if(checkLogin&&responseJSON.login!='logged_in'){handleMhcAjaxLogin(responseJSON,'updateElementPOST(\''+url+'\', \''
+id+'\', \''
+formId+'\', \''
+handleType+'\', '
+checkLogin+');',0);}else{$(id).innerHTML=responseJSON.content;if(responseJSON.info&&$(id+'Info')){$(id+'Info').innerHTML=responseJSON.info;}}
if(showGlobalSpinner==true){hideLoadingAnimation();}
if(showSpinnerForElementID!=false){hideLoadingAnimationForElement(showSpinnerForElementID);}},onFailure:function(xhr){if(showGlobalSpinner==true){hideLoadingAnimation();}
if(showSpinnerForElementID!=false){hideLoadingAnimationForElement(showSpinnerForElementID);}}});jsonRequest.post(form);}}
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORUPD', bundleError);}


/* CUSCORWEA */
try{
jQuery(document).ready(function(){var weatherForecastLink=jQuery('#weatherForecastData a');if(weatherForecastLink.length){var href=weatherForecastLink.attr('href');weatherForecastLink.attr('href',href+'?action=lightbox');}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSCORWEA', bundleError);}


/* CUSADDTRA */
try{
Hc.register('Hc.TranslateTool');Hc.TranslateTool=new Class({Implements:Options,options:{'attributeList':['title','alt','content','value'],'translateAttribute':'hctranslate','regExpTranslation':'\\[TR_([\\w]+)\\]','regExpPlaceholder':'\\{\\{([\\w]+)\\}\\}','removeProperty':['onclick','onmouseover','onfocus','href'],'translateLinkHost':'admin.hc.ag','translateLink':'/index.php?modulID=245&datei=detail&tab=edit&translateKey=%1','onClickFunction':null,'onMouseOverFuntion':null,'dispLayerOnMouseOver':false,'ignoreElements':['script','meta','html']},placeholder:null,translations:null,initialize:function(options){this.setOptions(options);this.options.translateLink='http://'
+this.options.translateLinkHost
+this.options.translateLink;this.regExpTranslation=new RegExp(this.options.regExpTranslation);this.regExpTranslationGroup=new RegExp(this.options.regExpTranslation,'g');this.regExpPlaceholder=new RegExp(this.options.regExpPlaceholder);this.regExpPlaceholderGroup=new RegExp(this.options.regExpPlaceholder,'g');this.elementIds={};layerFunction=function(id){showDebugPanel('<h1>Translate</h1><br />'+$(id).innerHTML,840);return false;}.bind(this);if(typeOf(this.options.onClickFunction)!='function'){this.options.onClickFunction=layerFunction;}
if(this.options.dispLayerOnMouseOver&&typeOf(this.options.onMouseOverFuntion)!='function'){this.options.onMouseOverFuntion=layerFunction;}},startProcess:function(translations,placeholder){this.translations=translations;this.placeholder=placeholder;this.processTranslations($$('*'));this.processTranslations($$('*'));this.processElements();},processElements:function(){Object.each(this.elementIds,function(object,index){if(!object||Object.getLength(object)==0){return false;}
var div=this.createBodyInformationLayer(index,object);if(div){div.inject($$('body')[0],'top');var el=$$('*['+this.options.translateAttribute+'='+index+']');el=this.cleanElement(el);el.addEvents({click:function(e){this.options.onClickFunction(index)}.bind(this)});}}.bind(this));},createBodyInformationLayer:function(id,object){var div=new Element('div',{'id':id,'class':'infoLayer'});if(Object.getLength(object)==0)
return null;Object.each(object,function(obj,index){if(index=='content'){(new Element('h2',{'html':'Content:'})).inject(div,'bottom');var table=new Element('table',{'width':'800px','style':'border: 1px solid var(--primary-color-light);'});var tr=new Element('tr',{'style':'background-color: #F4F7FC;'});(new Element('td',{'html':'<strong>Text</strong>','width':'700px','style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':'<strong>Übersetzen</strong>','width':'100px','style':'padding: 5px;'})).inject(tr,'bottom');tr.inject(table,'bottom');Object.each(obj,function(attr){var tr=new Element('tr',{'style':'padding: 10px;'});(new Element('td',{'html':this.translations[attr],'style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':'ID: <a target="_blank" href="'+this.options.translateLink.replace('%1',attr)+'">'+attr+'</a>','valign':'top','style':'padding: 5px;'})).inject(tr,'bottom');tr.inject(table,'bottom');}.bind(this));table.inject(div,'bottom');}else{(new Element('br')).inject(div,'bottom');(new Element('br')).inject(div,'bottom');(new Element('h2',{'html':'Attribute:'})).inject(div,'bottom');var table=new Element('table',{'width':'800px','style':'border: 1px solid var(--primary-color-light);'});var tr=new Element('tr',{'style':'background-color: #F4F7FC;'});(new Element('td',{'html':'<strong>Attribut</strong>','width':'100px','style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':'<strong>Text</strong>','width':'600px','style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':'<strong>Übersetzen</strong>','width':'100px','style':'padding: 5px;'})).inject(tr,'bottom');tr.inject(table,'bottom');Object.each(obj,function(objs,attribute){Object.each(objs,function(attr){var tr=new Element('tr');(new Element('td',{'html':attribute,'valign':'top','style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':this.translations[attr],'style':'padding: 5px;'})).inject(tr,'bottom');(new Element('td',{'html':'ID: <a target="_blank" href="'+this.options.translateLink.replace('%1',attr)+'">'+attr+'</a>','valign':'top','style':'padding: 5px;'})).inject(tr,'bottom');tr.inject(table,'bottom');}.bind(this));}.bind(this));table.inject(div,'bottom');}}.bind(this));return div;},processTranslations:function(rootElement){rootElement.each(function(element){Array.from(element.childNodes).each(function(node){if(this.options.ignoreElements.contains(node.nodeName.toLowerCase())){return;}
uId=String.uniqueID();if(typeOf(node)=='textnode'){if(element.getParents('button').length>0){newText='<span class="translateElementNoClick">'+node.textContent.replace(']','').replace('[TR_','')+'</span>';}else{var newText=this.translateText(node.textContent,false,uId);}
if(newText!=node.textContent){var parent=node.parentNode;var el=new Element('span',{'html':newText,'class':'helperNode'});parent.replaceChild(el,node);var elements=el.childNodes;parent.removeChild(el);$$(elements).inject(parent,'bottom');if(parent.parentNode&&parent.get('tag')!='a'&&parent.parentNode.get('tag')=='a')
{parent=parent.parentNode;}
if(parent.get('tag')=='a'){newParent=this.cleanElement(parent);var obj=this.elementIds[parent.get(this.options.translateAttribute)];this.elementIds[parent.get(this.options.translateAttribute)]=null;this.elementIds[uId]=Object.merge(this.elementIds[uId],obj);parent.parentNode.replaceChild(newParent,parent);}}}else{node=$$(node);this.options.attributeList.each(function(attribute){var value=node.get(attribute);if(value.length>0&&typeOf(value[0])=='string'){var newText=this.translateText(value[0],attribute,uId);if(newText!=value[0]){node.set(attribute,newText);node.setProperty(this.options.translateAttribute,uId);}}}.bind(this));}}.bind(this));}.bind(this));},getTranslations:function(text){result=text.match(this.regExpTranslationGroup);var _return=[];if(result){result.each(function(tr){translatekey=tr.match(this.regExpTranslation);if(translatekey&&(value=this.translations[translatekey[1]])){_return.push([tr,value,translatekey[1]]);}}.bind(this));return _return;}
return null;},translateText:function(text,attribute,uId){if(!this.elementIds[uId]){this.elementIds[uId]={};}
var translations=this.getTranslations(text);if(translations){translations.each(function(value){text=text.replace(value[0],value[1]);if(!attribute){if(!this.elementIds[uId].content){this.elementIds[uId].content=[];}
this.elementIds[uId].content.push(value[2]);text='<span class="translateElement"'+this.options.translateAttribute+'="'+uId+'">'+text+'</span>';}else{if(!this.elementIds[uId]['attributes']){this.elementIds[uId]['attributes']={};}
if(!this.elementIds[uId]['attributes'][attribute]){this.elementIds[uId]['attributes'][attribute]=[];}
this.elementIds[uId]['attributes'][attribute].push(value[2]);}}.bind(this));}
text=this.replacePlaceholder(text,attribute);return text;},replacePlaceholder:function(text,attribute){result=text.match(this.regExpPlaceholderGroup);if(result){result.each(function(tr){translatekey=tr.match(this.regExpPlaceholder);if(translatekey&&(value=this.placeholder[translatekey[1]])){text=text.replace(translatekey[0],value);}}.bind(this));}
return text;},cleanElement:function(el){if(el){el.removeEvents();this.options.removeProperty.each(function(property){el.removeProperty(property);}.bind(this));}
return el;}});
;}catch(bundleError){console.error('HC CLASSIC-JS CUSADDTRA', bundleError);}
