document.createElement("header");document.createElement("section");document.createElement("article");document.createElement("footer");$(document).on("click", ".galerie .thumbs img", function(){var name = $(this).attr("src");var title = $(this).attr("alt");$(".galerie .active img").attr("src", name);$(".galerie .active div").remove();if(title != ""){ $(".galerie .active").append("<div>" + title + "</div>"); }return false;});$(function(){setBG100("section.home header img"); $("section.home header img").css({ "opacity":"0.9", "filter":"alpha(Opacity=90)" });});$(function(){$("a.scroll").click(function(){if($(window).width() < 1024){ var naviHeight = 0; }else{ var naviHeight = $(".navi1").height(); }naviHeight -= 2;var $target = $(this.hash);var targetOffset = $target.offset().top-naviHeight;$("html,body").animate({scrollTop: targetOffset}, 600);return false;});});function naviShow(){$(".menu .text").click(function(){ $(".navi2 .links").slideToggle(300); });}function naviSwitch(){var winWidth = $(window).width();if(winWidth > 1024){ $(".navi2 .links").show(); } else{ $(".navi2 .links").hide(); }}function naviFixed(){var winWidth = $(window).width();var scrollTop = $(window).scrollTop();var sectionFirstHeight = $("section.home").height() - $(".navi1").height();if((scrollTop > 30) && (winWidth > 1024)){ $(".navi1").addClass("navi1-fixed"); }else{ $(".navi1").removeClass("navi1-fixed"); }return false;}function sectionActive(){var browserTop = $(window).scrollTop() + 110;$("section").each(function(i){if($(this).position().top <= browserTop){$(".navi2 .links .active").removeClass("active");$(".navi2 .links a").eq(i).addClass("active");}});}function setBG100(img){disBG100(img);$(window).resize(function(){ disBG100(img); });}function disBG100(img){var $this = $(img);$this.css("width", "auto" );$this.css("height", "auto" );$this.css("max-width", "none");$this.css("min-width", "none");$this.css("max-height", "none");$this.css("min-height", "none");var iw = $this.width();var ih = $this.height();var ww = $this.parent().width();var wh = $this.parent().height();if(ww > wh){if(iw > ih){var fRatio = iw / ih;$this.css("width", ww + "px");$this.css("height", Math.round(ww * (1 / fRatio)));var newIh = Math.round(ww * (1 / fRatio));if(newIh < wh){var fRatio = ih / iw;$this.css("height", wh);$this.css("width", Math.round(wh * ( 1 / fRatio)));}}else{var fRatio = ih / iw;$this.css("height", wh);$this.css("width", Math.round(wh * ( 1 / fRatio)));}}else{var fRatio = ih / iw;$this.css("height", wh);$this.css("width", Math.round(wh * ( 1 / fRatio)));}if($this.width() > ww){var this_left = ($this.width() - ww) / 2;$this.css({ "margin-top" : 0, "margin-left" : - this_left });}if($this.height() > wh){var this_height = ($this.height() - wh) / 2;$this.css({ "margin-left" : 0, "margin-top" : - this_height });}}
