$.rrdata={};$(document).ready(function(){$("#wolken").pan({fps:30,speed:.4,dir:"left"});var a="";window.location.hostname==="mbp"||window.location.hostname==="localhost"?a="/~ebbo/public/json/":a="/json/";window.location.hash===""&&$.History.go("!/");$("#contact-form").submit(function(a){a.preventDefault();var b=$("#contact-name"),c=$("#contact-email"),d=$("#contact-message");$.post("/_scripts/submit.php",{name:b.val(),email:c.val(),message:d.val()}).success(function(a){jQuery("<div/>",{"class":"message",text:"Nachricht wurde versandt!"}).appendTo("#contact-form").fadeOut(4e3)}).error(function(){jQuery("<div/>",{"class":"message-error",text:"Nachricht wurde NICHT versandt!"}).appendTo("#contact-form").fadeOut(6e3)})});var b=window.History,c=document.title,d=$("#content"),e=$("#nav a"),f=d.children();f.hide();var g=function(a){e.each(function(){var b=$(this);b.attr("href")=="#"+a?b.addClass("active"):b.removeClass("active")})};$.getJSON(a+"specials.json",function(a){$("#specials").children().length==1&&$("#specialsTemplate").tmpl(a).appendTo("#specials")});$.getJSON(a+"kreuzfahrten.json",function(a){$("#kreuzfahrten").children().length==1&&$("#kreuzfahrtenTemplate").tmpl(a).appendTo("#kreuzfahrten")});$.getJSON(a+"angebote.json",function(a){$("#angebote").children().length==1&&$("#angeboteTemplate").tmpl(a).appendTo("#angebote");$.rrdata.angebote=a;$.each(a,function(){var a=this.id;$.History.bind("!/angebote/"+this.id,function(b){f.hide();g(b);$.each($.rrdata.angebote,function(){if(a===this.id){var b="";screen.width<=960?b=$("#angebotSeiteTemplateMobile").tmpl(this):b=$("#angebotSeiteTemplate").tmpl(this);$("#angebotSeite").html(b);$("#angebotSeite").stop(!0,!0).fadeIn(200)}})})})});$.History.bind("!/",function(a){f.hide();g(a);$("#angebote").stop(!0,!0).fadeIn(200);$("#specials").stop(!0,!0).fadeIn(200);$("#kreuzfahrten").stop(!0,!0).fadeIn(200)});$.History.bind("!/angebote",function(a){f.hide();g(a);$("#angebote").stop(!0,!0).fadeIn(200);$("#specials").stop(!0,!0).fadeIn(200);$("#kreuzfahrten").stop(!0,!0).fadeIn(200)});$.History.bind("!/impressum",function(b){f.hide();$("#impressum").children().length===0&&$.getJSON(a+"impressum.json",function(a){var b="";b=$("#pageTemplate").tmpl(a);$("#impressum").html(b)});$("#impressum").stop(!0,!0).fadeIn(200)});$.History.bind("!/agb",function(b){f.hide();g(b);$("#agb").children().length===0&&$("#agb").load(a+"agb.html");$("#agb").stop(!0,!0).fadeIn(200)});$.History.bind("!/blog",function(b){f.hide();g(b);$("#blog").children().length===1&&$.getJSON(a+"blog.json",function(a){var b="";b=$("#blogTemplate").tmpl(a);$("#blog").html(b)});$("#blog").stop(!0,!0).fadeIn(200)});$.History.bind("!/mitarbeiter",function(b){f.hide();g(b);$("#mitarbeiter").children().length===1&&$.getJSON(a+"mitarbeiter.json",function(a){$("#mitarbeiterTemplate").tmpl(a).appendTo("#mitarbeiter")});$("#mitarbeiter").stop(!0,!0).fadeIn(200)});$.History.bind("!/bueros",function(a){f.hide();g(a);$("#bueros").stop(!0,!0).fadeIn(200)});$.History.bind("!/kontakt",function(a){f.hide();g(a);$("#kontakt").stop(!0,!0).fadeIn(200)});$.History.bind(function(a){})});
