1(function ($) { 2 $(document).ready(function () { 3 console.log('JS Plugin Ready'); 4 5 6 7 /* 8 * Workaround for smooth Anchor scrolling 9 * Used in Pages with subsections 10 */ 11 // Select all links with hashes 12 $('a[href*="#"]') 13 // Remove links that don't actually link to anything 14 .not('[href="#"]') 15 .not('[href="#0"]') 16 .click(function(event) { 17 // On-page links 18 if ( 19 location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 20 && 21 location.hostname == this.hostname 22 ) { 23 // Figure out element to scroll to 24 var target = $(this.hash); 25 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 26 // Does a scroll target exist? 27 if (target.length) { 28 // Only prevent default if animation is actually gonna happen 29 event.preventDefault(); 30 $('html, body').animate({ 31 32 scrollTop: target.offset().top - 80 33 }, 1000, function() { 34 // Callback after animation 35 // Must change focus! 36 var $target = $(target); 37 $target.focus(); 38 if ($target.is(":focus")) { // Checking if the target was focused 39 return false; 40 } else { 41 $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable 42 $target.focus(); // Set focus again 43 }; 44 }); 45 } 46 } 47 }); 48 49 50 51 52 // Initialize function 53 function initialize() { 54 // Starting location 55 var location = new google.maps.LatLng(47.388497, 8.485281); 56 57 // Starting map options 58 var mapOptions = { 59 center: location, 60 zoom: 14, 61 mapTypeControl: false 62 }; 63 64 // Create a new Google Maps Object passing in the element and custom options 65 var map = new google.maps.Map(document.getElementById('customMap'), mapOptions); 66 67 var icon = { 68 url: "http://fizinfo.cloudrexx.com/themes/fiz-info/img/logo/logo-only-fiz.svg", 69 anchor: new google.maps.Point(25,50), 70 scaledSize: new google.maps.Size(50,50) 71 } 72 73 74 // var marker = new SVGMarker({ 75 // map: map, 76 // position: location, 77 // draggable: false, 78 // icon: { 79 // anchor: new google.maps.Point(30, 30.26), 80 // size: new google.maps.Size(60, 30.26), 81 // url: 'http://fizinfo.cloudrexx.com/themes/fiz-info/img/logo/logo-only-fiz.svg' 82 // } 83 // }); 84 85 86 var image = 'http://fizinfo.cloudrexx.com/themes/fiz-info/img/logo/logo-only-fiz.png'; 87 88 89 var marker = new google.maps.Marker({ 90 position: location, 91 draggable: false, 92 icon: image, 93 map: map 94 }); 95 96 97 98 // 99 // var marker = new google.maps.Marker({ 100 // position: location, 101 // draggable: false, 102 // icon: icon, 103 // map: map 104 // }); 105 106 107 108 // State custom styles 109 var styles = 110 [ 111 { 112 "featureType": "water", 113 "elementType": "geometry.fill", 114 "stylers": [ 115 { 116 "color": "#e40050" 117 } 118 ] 119 }, 120 121 { 122 "featureType": "administrative", 123 "elementType": "labels.text.fill", 124 "stylers": [ 125 { 126 "color": "#0b0b0b" 127 } 128 ] 129 }, 130 { 131 "featureType": "landscape", 132 "elementType": "all", 133 "stylers": [ 134 { 135 "color": "#f2f2f2" 136 } 137 ] 138 }, 139 { 140 "featureType": "poi", 141 "elementType": "all", 142 "stylers": [ 143 { 144 "visibility": "off" 145 } 146 ] 147 }, 148 { 149 "featureType": "road", 150 "elementType": "all", 151 "stylers": [ 152 { 153 "saturation": -100 154 }, 155 { 156 "lightness": 20 157 } 158 ] 159 }, 160 { 161 "featureType": "road", 162 "elementType": "labels.text.fill", 163 "stylers": [ 164 { 165 "color": "#090909" 166 } 167 ] 168 }, 169 { 170 "featureType": "road.highway", 171 "elementType": "all", 172 "stylers": [ 173 { 174 "visibility": "simplified" 175 } 176 ] 177 }, 178 { 179 "featureType": "road.arterial", 180 "elementType": "labels.icon", 181 "stylers": [ 182 { 183 "visibility": "off" 184 } 185 ] 186 }, 187 { 188 "featureType": "transit", 189 "elementType": "all", 190 "stylers": [ 191 { 192 "visibility": "off" 193 } 194 ] 195 }, 196 { 197 "featureType": "water", 198 "elementType": "all", 199 "stylers": [ 200 { 201 "color": "#e40050" 202 }, 203 { 204 "visibility": "on" 205 } 206 ] 207 }, 208 { 209 "featureType": "water", 210 "elementType": "labels.text.fill", 211 "stylers": [ 212 { 213 "color": "#ffffff" 214 } 215 ] 216 }, 217 { 218 "featureType": "water", 219 "elementType": "labels.text.stroke", 220 "stylers": [ 221 { 222 "color": "#f7f7f7" 223 } 224 ] 225 } 226 ] 227 228 // Set custom styles on map 229 map.setOptions({styles: styles}); 230 231 232 } 233 234 235 if(document.getElementById('customMap')) { 236 // Event Listener to call the function once the HTML elements on the page have loaded 237 google.maps.event.addDomListener(window, 'load', initialize); 238 } 239 240 241 242 243 }); 244 245 $(window).resize(function () { 246 }); 247 248 $(window).scroll(function () { 249 }); 250 251 $(window).load(function () { 252 }); 253 254})(jQuery);
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.