function makeUrl(a){var b=SGL_JS_WEBROOT+"/"+SGL_JS_FRONT_CONTROLLER;var c=a.module?a.module:"";var d=a.manager?a.manager:c;switch(SGL_JS_URL_STRATEGY){case"SGL_UrlParser_ClassicStrategy":if(b.charAt(b.length-1)!="?"){b+="?"}b+="moduleName="+escape(c)+"&managerName="+escape(d)+"&";for(x in a){if(x=="module"||x=="manager"){continue}b+=escape(x)+"="+escape(a[x])+"&"}break;default:if(SGL_JS_FRONT_CONTROLLER!="")b+="/";b+=escape(c)+"/"+escape(d)+"/";for(x in a){if(x=="module"||x=="manager"){continue}b+=escape(x)+"/"+escape(a[x])+"/"}break}return b}function switchRowColorOnHover(){}function deleteReiseziel(a){if(a!=false&&jQuery.fn.objectMgrDelete(a)){$('a[objectid="'+a+'"]').parent("div").parent("div").parent("div").remove()}if($(".hotel").length==1){$(".hotel > div .hdel").html(" ")}}function deleteHotel(a){$("#deleteHotelBox > strong").html($(a).parent("div").prev("div").html());$("#deleteHotelBox").attr("objectid",$(a).attr("objectid"));showDialog("#deleteHotelBox")}function showDialog(a){if($(a).length>0){parent.$.colorbox({inline:true,href:a,width:"400px",title:$(a).attr("title")})}}function showVideo(a){var b=flowplayer("player",SGL_JS_WEBROOT+"/stream/flowplayer-3.0.3.swf",{wmode:"transparent",clip:{url:$(a).attr("videofile"),provider:"h264streaming"},plugins:{h264streaming:{url:SGL_JS_WEBROOT+"/stream/flowplayer.h264streaming-3.0.5.swf"},controls:{url:SGL_JS_WEBROOT+"/stream/flowplayer.controls-3.0.3.swf",play:false,fullscreen:true,scrubber:true}}});parent.$.colorbox({inline:true,height:600,innerWidth:640,innerHeight:480,href:"#boxFlowPlayer",title:$(a).attr("title"),close:"Schließen",onComplete:function(){b.load()},onClosed:function(){b.unload()}})}function GroupDelegate(a){$("#"+a).click()}function updateRequired(a,b){if($(a).attr("svalue")!="per Email"){$("#"+b+" > span").html("*")}else{$("#"+b+" > span").html(" ")}}function updateHiddenInput(a,b){$("#"+$(a).attr("fieldname")).val($(a).attr("svalue"));$("#"+b).prev("div").html($(a).html());$("#"+b).slideToggle("slow")}function slideUpDown(a){$("#"+a).slideToggle("slow");$(document).bind($.browser.opera?"keypress":"keydown",function(b){if(b.keyCode==27)$("#"+a).hide()})}var flashProxy=false;$(document).ready(function(){if($("#hotelteaser").length>0){$("#hotelteaser > .hotel > div").fadeTo("fast",.9);$("#hotelteaser > .hotel > div").hover(function(){$(this).children(".hdesc").addClass("hover");$(this).fadeTo("normal",1)},function(){$(this).children(".hdesc").removeClass("hover");$(this).fadeTo("normal",.9)});if($("#emotionHome,#presseNavi,#beLogin").length>0){$("#hotelteaser").css("top","252px")}else if($("#emotionHotel").length>0&&$("#videoButtons").length>0){$("#hotelteaser").css("top","646px")}else if($("#emotionHotel").length>0||$("#highlightButton").length>0){$("#hotelteaser").css("top","617px")}else if($("#hotelteaser").length>0){$("#hotelteaser").css("top","588px")}$("#hotelteaser").show()}if($("#laenderNavi > ul > li.active").length>0){$("#hotelNavi").css("top",$("#laenderNavi > ul > li.active").position().top+28+"px");jQuery.each($("#hotelNavi > ul > li > a > p"),function(){if($(this).innerHeight()<36)$(this).parent("a").height($(this).parent("a").height()-28);if($(this).innerHeight()>53)$(this).parent("a").height($(this).parent("a").height()+28)});$("#hotelNavi").css("visibility","visible")}if($("#presseNavi > ul > li.current").length>0){if($("#presseClippings").length>0||$("#newsletterArchive").length>0){var a="";if($("#presseClippings").length>0)a="#presseClippings";else a="#newsletterArchive";$(a).css("top",$("#presseNavi > ul > li.current").position().top+28+"px");jQuery.each($(a+" > ul > li > a > p"),function(){if($(this).height()<36)$(this).parent("a").height($(this).parent("a").height()-28);if($(this).height()>53)$(this).parent("a").height($(this).parent("a").height()+28)});$(a).css("visibility","visible")}else if($("#nlAnmeldung").length>0){$("#nlAnmeldung").css("top",$("#presseNavi > ul > li.current").position().top+28+"px");$("#nlAnmeldung").css("visibility","visible")}}if($("#kontinentNavi,#reisespecialNavi").length>0){jQuery.each($("#kontinentNavi > div > h3,#reisespecialNavi > div > h3"),function(){$(this).click(function(){if(activeKontinent==$(this).attr("id")){$(this).removeClass("active");$("#"+$(this).attr("id")+" + div").hide();if(flashProxy)flashProxy.call("zoomOut");activeKontinent=null}else{$("#"+$(this).attr("id")+" + div").css("top",$(this).position().top+28+"px");if(activeKontinent!=null){$("#"+activeKontinent).removeClass("active");$("#"+activeKontinent+" + div").hide()}$(this).addClass("active");$("#"+$(this).attr("id")+" + div").show();if(flashProxy)flashProxy.call("zoomRegion",$(this).text());activeKontinent=$(this).attr("id")}})});if($("#"+activeKontinent).length>0&&typeof $("#"+activeKontinent).position()!="undefined"){if($("#"+activeKontinent+" > h3").length>0)$("#"+activeKontinent+" > h3").addClass("active");else $("#"+activeKontinent).addClass("active");$("#"+activeKontinent+" + div").css("top",$("#"+activeKontinent).position().top+28+"px");$("#"+activeKontinent+" + div").show()}}if($("#frmSearch_freeText").length>0){$("#frmSearch_freeText").autocomplete({source:makeUrl({module:"object",action:"gettitle"}),minLength:3,focus:function(a,b){var c=b.item.name.indexOf(" - ");if(c!=-1)$("#frmSearch_freeText").val(b.item.name.substr(c+3));else $("#frmSearch_freeText").val(b.item.name);return false},select:function(a,b){window.location.href=b.item.link}}).data("autocomplete")._renderItem=function(a,b){return $("<li></li>").data("item.autocomplete",b).append("<a>"+b.name.replace(/-/g,"<br/>&raquo;")+"</a>").appendTo(a)}}if($("a[rel^='prettyPhoto']").length>0){$("a[rel^='prettyPhoto']").prettyPhoto({slideshow:5e3,autoplay_slideshow:true,theme:"dark_square",social_tools:"",overlay_gallery:false,changepicturecallback:function(){if($("#pp_full_res").children("iframe").length>0){$(".pp_pause").click()}}})}if($("#input_abflug").length>0){$("#input_abflug").datepicker({minDate:0,maxDate:"+2Y",firstDay:1})}if($("#input_ankunft").length>0){$("#input_ankunft").datepicker({minDate:0,maxDate:"+2Y",firstDay:1})}if($("#messageBox").length>0){$("#messageBox").colorbox({open:true,inline:true,href:"#messageBox"})}if($("#slideImage").length>0){$("#slideImage").innerfade({timeout:5e3,speed:1e3,type:"random_start"})}if($(".messTop").length>0){var b=0;var c="";$(".messTop").each(function(){if(b<$(this).position().top+$(this).outerHeight()){b=$(this).position().top+$(this).outerHeight();c=$(this).attr("id")}});if(b>0){if($("#contentText").length>0){var d=parseInt($("#contentText").css("paddingTop"));var e=b-$("#contentText").position().top;if(c=="contentText"&&e%83>0)e=e+Math.round(83/(e%83));else e=e-d-3;$("#contentText").css("height",e+"px")}}else{$("#"+c).css("paddingBottom","27px")}}if($(".teaserPhoto").length>0&&$("#flashPhoto0").length>0){$(".teaserPhoto").css("background","url("+$("#flashPhoto0").attr("href")+") no-repeat center")}$(document).cssCheckbox()})
