1// Copyright 2015 Markus Albrecht Partschins 2// Copyright 2015 Markus Albrecht Partschins 3// Copyright 2015 Markus Albrecht Partschins 4// Copyright 2015 Markus Albrecht Partschins 5// Copyright 2015 Markus Albrecht Partschins 6// Copyright 2015 Markus Albrecht Partschins 7 8function getImgResolution() { 9 $window = $(window); 10 if ($window.width() < 768) { 11 return "xs" 12 } else if ($window.width() >= 768 && $window.width() < 1200) { 13 return "smd" 14 } else if ($window.width() >= 1200 && $window.width() <= 1920) { 15 return "lg" 16 } else if ($window.width() > 1920) { 17 return "xxl" 18 }; 19}; 20 21function initLazySections() { 22 $("section.lazy, #WebsiteFooter.lazy").lazy({ 23 threshold: 200, 24 beforeLoad: function (e) { 25 console.log("Start loading: " + e.prop("id")); 26 }, 27 Section_2: function (e) { 28 e.css("background-image", "url('sections/vernagtsee-" + getImgResolution() + ".jpg')"); 29 e.load(); 30 }, 31 Section_4: function (e) { 32 e.css("background-image", "url('sections/tuer2-" + getImgResolution() + ".jpg')"); 33 e.load(); 34 }, 35 Section_Wellness_2: function (e) { 36 e.css("background-image", "url('sections/hallenbad-" + getImgResolution() + ".jpg')"); 37 e.load(); 38 }, 39 Section_Restaurant_2: function (e) { 40 e.css("background-image", "url('sections/tische-" + getImgResolution() + ".jpg')"); 41 e.load(); 42 }, 43 Section_Restaurant_3: function (e) { 44 e.css("background-image", "url('sections/saal-" + getImgResolution() + ".jpg')"); 45 e.load(); 46 }, 47 Section_Restaurant_4: function (e) { 48 e.css("background-image", "url('sections/terrasse-" + getImgResolution() + ".jpg')"); 49 e.load(); 50 }, 51 Section_Fischen_1: function (e) { 52 e.css("background-image", "url('sections/fischen-" + getImgResolution() + ".jpg')"); 53 e.load(); 54 }, 55 Section_Sehenswertes: function (e) { 56 e.css("background-image", "url('sections/Sehenswertes-" + getImgResolution() + ".jpg')"); 57 e.load(); 58 }, 59 Section_Schnalstal: function (e) { 60 e.css("background-image", "url('sections/alm-" + getImgResolution() + ".jpg')"); 61 e.load(); 62 }, 63 Section_sommer: function (e) { 64 e.css("background-image", "url('sections/aktiv-sommer-" + getImgResolution() + ".jpg')"); 65 e.load(); 66 }, 67 Section_winter: function (e) { 68 e.css("background-image", "url('sections/aktiv-winter-" + getImgResolution() + ".jpg')"); 69 e.load(); 70 }, 71 }); 72 73 if ($("img.lazy").length) { 74 $("img.lazy").lazy({ 75 threshold: 200, //effect: "fadeIn", 76 beforeLoad: function (e) { 77 console.log("Start loading: " + e.data("src")); 78 } 79 }); 80 }; 81};
82 83$(document).ready(function () { 84 initLazySections(); 85}); 86 87$(window).bind("orientationchange", function () { 88 window.setTimeout("window.location.reload()", 2000); 89});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.