$(document).ready(function(){});;function TopNavi(){this.state='closed';this.activeObject=null;this.currentTimeout=null;this.setState=function(state){this.state=state;return this;}
this.getState=function(){return this.state;}
this.setActiveObject=function(activeObject){this.activeObject=activeObject;return this;}
this.getActiveObject=function(){return this.activeObject;}
this.getTeaserContentObject=function(naviTeaser){if(naviTeaser==null){return jQuery('');}
var contentClass=naviTeaser.attr('rev');if(contentClass!=''){return jQuery('#naviTeaser .body .'+contentClass);}else{return null;}}
this.action=function(naviTeaser){var that=this;if(this.getState()=='closed'){this.open(naviTeaser);}else if(this.getState()=='open'&&naviTeaser.attr('rev')!==this.getActiveObject().attr('rev')){this.close();this.currentTimeout=setTimeout(function(){that.open(naviTeaser)},750);this.open(naviTeaser);}else{if(this.getState()=='opening'){this.close(true);clearTimeout(this.currentTimeout);setTimeout(function(){that.open(naviTeaser)},750);}}}
this.beforeOpen=function(){return true;}
this.open=function(navObject){this.beforeOpen();if(this.getState()!='closed'){return false;}
this.getTeaserContentObject(navObject).show();this.setState('opening');this.setActiveObject(navObject);var that=this;jQuery('#naviTeaser').slideDown('slow',function(){that.setState('open');});this.afterOpen();return true;}
this.afterOpen=function(){return true;}
this.beforeClose=function(){return true;}
this.close=function(force){this.beforeClose();if(this.getState()!='open'&&!force)return;if(this.getState()=='opening')jQuery('#naviTeaser').stop();this.getTeaserContentObject(this.getActiveObject()).hide();this.setState('closing');this.setActiveObject(null);var that=this;jQuery('#naviTeaser').slideUp('fast',function(){that.setState('closed');});this.afterClose();}
this.afterClose=function(){return true;}
this.log=function(value){if(typeof(console)=='object'){console.log(value);}}};BavarianAlpsTopNavi=function(){this.beforeOpen=function(){$("#secnavi").fadeOut('slow');return true;}
this.afterClose=function(){if(jQuery('#layerMap').is(':visible')){$("#secnavi").fadeIn('slow');}
return true;}}
BavarianAlpsTopNavi.prototype=new TopNavi();var topNavi=new BavarianAlpsTopNavi();$(document).ready(function(){var navLatency=null;$("#naviTop li").children("a[rel='hasTeaser']").bind({mouseenter:function(){window.clearTimeout(navLatency);var that=this;navLatency=window.setTimeout(function(){topNavi.action(jQuery(that))},350);},mouseleave:function(){if(navLatency!=null){window.clearTimeout(navLatency);navLatency=window.setTimeout(function(){topNavi.close()},350);}}});jQuery('#naviTeaser div.body div.teaser').bind({mouseenter:function(){window.clearTimeout(navLatency);}});jQuery('#naviFix, #keyvisual').bind({mouseover:function(){navLatency=window.setTimeout(function(){topNavi.close()},500);}});$("a#showMap").click(function(){if($("#globalSearch").is(":visible")){$('#globalSearch').hide();$('#client_ID').hide();$('#logo').hide();$('#keyvisual img').fadeOut('slow');$('#layerMap').fadeOut('slow');$('#keyvisual').addClass('lower');$('#secnavi').animate({top:"-20px"},500);$("ul#main").slideUp();$("div.toggler a").hide();$("div.mapToggler").show();$('div#secnavi').addClass('naviHover');$("div.logoMap").show();$('div#secnavi').hide();$('div#client_Contest').hide();$('div#header-video').hide();if(typeof(ET_Event)=='object')ET_Event.eventStart('Map/'+language.toUpperCase(),'','show_map','');}else{$('#globalSearch').show();$('#logo').show('fast');$('#layerMap').fadeIn('slow');$('#keyvisual img').fadeIn('slow');$('#keyvisual').removeClass('lower');$('#secnavi').animate({top:"40px"},500);$("ul#main").slideDown();$("div.toggler a").show();$("div.mapToggler").hide();$('div#secnavi').removeClass('naviHover');$('#client_ID').show();$('div#secnavi').show();$('div#client_Contest').show();$('div#header-video').show();if(typeof(ET_Event)=='object')ET_Event.eventStart('Map/'+language.toUpperCase(),'','close_map','');}});$(function(){$("div.teaser_Img div.hover").css("opacity","0");$("div.teaser_Img").hover(function(){$('div:last-child',this).stop().animate({opacity:0.8},'normal');},function(){$('div:last-child',this).stop().animate({opacity:0},'slow');});});$('div.toggler a').click(function(){if($("ul#main").is(":visible")){$("ul#main").slideUp();$("div.toggler a").addClass('closed');$("div.toggler a").attr({title:"Navigation öffnen"});}else{$("ul#main").slideDown();$("div.toggler a").removeClass('closed');$("div.toggler a").attr({title:"Navigation schließen"});}});$('div.naviHover').live('mouseenter',function(){if($("ul#main").is(":hidden")){$("ul#main").slideDown('slow');$('div.mapToggler').animate({height:"15px"},300);$('div.mapToggler a').hide();$('#legend').hide();}});$('div.naviHover').live('mouseleave',function(){if($("ul#main").is(":visible")){$("ul#main").slideUp();$('div.mapToggler').animate({height:"70px"},300);$('div.mapToggler a').show();$('#legend').show();}});$("a#hideMap").click(function(){$('#globalSearch').show();$('#client_ID').show();$('#logo').show();$('#layerMap').fadeIn('slow');$('#keyvisual img').fadeIn('slow');$('#keyvisual').removeClass('lower');$('#secnavi').animate({top:"40px"},500);$("ul#main").slideDown();$("div.toggler a").show();$("div.mapToggler").hide();$('div#secnavi').removeClass('naviHover');$('div#secnavi').show();$('div#client_Contest').show();$('div#header-video').show();if(typeof(ET_Event)=='object')ET_Event.eventStart('Map/'+language.toUpperCase(),'','close_map','');});$(".legendToggler").click(function(){if($("#legend ul").is(":visible")){$("#legend ul").hide();$("#legend").animate({width:"150px"},500);$(this).animate({width:"106px"},500);$(".legendToggler div").animate({width:"80%"},500);$(".legendToggler div").html("Legende").css({'cursor':'pointer'});$('.legendToggler a').css({"background-position":"0 -41px"}).attr({title:"Legende öffnen"});}else{$("#legend ul").show(300);$("#legend").animate({width:"265px"},300);$(this).animate({width:"221px"},300);$(".legendToggler div").animate({width:"80%"},300);$(".legendToggler div").html("Auf Karte zeigen:").css({'cursor':'text'});$('.legendToggler a').css({'background-position':'0 2px'}).attr({title:"Legende schließen"});}});$('#map_container').mouseenter(function(){if($("div.logoMap").is(":visible")){$("div.logoMap").fadeOut('slow');}});$('#map_container').mouseleave(function(){if($("div.logoMap").is(":hidden")){$("div.logoMap").fadeIn('slow');}});$('#get_infos a.slider').click(function(){if($("div.infosSlide").is(":hidden")){$("div.infosSlide").slideDown("slow");$("#get_infos fieldset:first").removeClass("noLine").addClass("first");$(this).hide();}});$('#news').click(function(){if($("div.newsletter").is(":hidden")){$("div.newsletter").slideDown("slow");}else{$("div.newsletter").slideUp("slow");}});$('#infos').click(function(){if($("fieldset.contact").is(":hidden")){$("fieldset.contact").slideDown("slow");$("#get_infos fieldset.more").removeClass("last");}else{$("fieldset.contact").slideUp("slow");$("#get_infos fieldset.more").addClass("last");}});$('ul.listStyle a.compact').live('click',function(){if($(this).hasClass("inactive")){$(this).removeClass("inactive");$(this).addClass("active");$("ul.listStyle a.detail").removeClass("active");$("ul.listStyle a.detail").addClass("inactive");$("div.list div.listItem").removeClass("detail");$("div.list div.listItem").addClass("compact");$("div.list div.listItem a.buttonstyle span").html("");}});$('ul.listStyle a.detail').live('click',function(){if($(this).hasClass("inactive")){$(this).removeClass("inactive");$(this).addClass("active");$("ul.listStyle a.compact").removeClass("active");$("ul.listStyle a.compact").addClass("inactive");$("div.list div.listItem").removeClass("compact");$("div.list div.listItem").addClass("detail");$("div.list div.listItem a.buttonstyle span").html("Merken");}});$("#contentArea div.paginator ul.listStyle li a").css({'-moz-border-radius':'3px','-khtml-border-radius':'3px'});$("div.listItem a.listMarker, div#teaserMap a.zoom").live('click',function(){if($("#globalSearch").is(":visible")){$('#globalSearch').hide();$('#client_ID').hide();$('#logo').hide();$('#keyvisual img').fadeOut('slow');$('#layerMap').fadeOut('slow');$('#keyvisual').addClass('lower');$('#secnavi').animate({top:"-20px"},500);$("ul#main").slideUp();$("div.toggler a").hide();$("div.mapToggler").show();$('div#secnavi').addClass('naviHover');}});$("div.fliesstext a[href$='pdf']").addClass("pdf").attr({title:'PDF öffnet in neuem Fenster',target:'_blank'});$("a[rel='imgGallery']").colorbox({current:imageLabel+' {current} '+imageOf+' {total}'});$("a.video").colorbox({iframe:true,innerWidth:680,innerHeight:510});$("a.catalog").colorbox();$("a[class='scribd']").colorbox({transition:"elastic",iframe:true,width:'985px',height:'85%'});$("a.zoomMainImage").click(function(){$("#mainImage a.zoom").click();});$('a.snowreport').colorbox({iframe:true,innerWidth:700,height:'90%'});$("#client_ID a.clientMap").click(function(){if($("#globalSearch").is(":visible")){$('#globalSearch').hide();$('#client_ID').hide();$('#logo').hide();$('#keyvisual img').fadeOut('slow');$('#layerMap').fadeOut('slow');$('#keyvisual').addClass('lower');$('#secnavi').animate({top:"-20px"},500);$("ul#main").slideUp();$("div.toggler a").hide();$("div.mapToggler").show();$('div#secnavi').addClass('naviHover');}});$('#client_ID a.contact_traeger').click(function(){$('#galleryContent').triggerTab(6);return false;});$('#client_ID a.contact_partner').click(function(event){var numberOfTab=parseInt($('#naviContent li a[href="#content_contact"]').parents('li').index())+1;$('#galleryContent').triggerTab(numberOfTab);event.preventDefault();});$('a[href*=#]').bind("click",function(event){event.preventDefault();var ziel=$(this).attr("href");$('html,body').animate({scrollTop:$(ziel).offset().top},300,function(){location.hash=ziel;});});$("#offerSearch div.buttonSearchForm a.buttonstyle span.search").live('click',function(){$('#offerSearch div.buttonSearchForm').fadeOut('slow');$('#form_offerSearch').fadeIn('fast');$('#form_offerSearch .body').slideDown('normal');});$("#form_offerSearch a.formClose").live('click',function(){$('#form_offerSearch .body').slideUp();$('#form_offerSearch').fadeOut('slow');$("#offerSearch div.buttonSearchForm").fadeIn();});$("#offerSearch .searchResult a.buttonstyle span.search").click(function(){if($("#form_offerSearch").is(":hidden")){$('#offerSearch .searchResult a.buttonstyle').fadeOut('slow');$('#form_offerSearch').fadeIn('fast');$('#form_offerSearch .body').slideDown('normal');}});$("a#openForm_Catalog").click(function(){if($("div#catalogform").is(":hidden")){$('div#catalogform').slideDown();$(this).hide();}});jQuery('.jsShowHotelsOnMap').click(function(){jQuery(this).attr('href','javascript://');topNavi.close(true);if($("#globalSearch").is(":visible"))jQuery('a#showMap').click();jQuery('div#mapLarge').ready(function(){if(!jQuery('input#gMapP_163').is(':checked')){jQuery('input#gMapP_163').click();jQuery('input#gMapP_163').change();}});return false;});});
