1// JavaScript Document 2jQuery(function ($) { 3 4 'use strict'; 5 6 7 8 /* ======= ScrollTo ======= */ 9 $('a.scrollto').on('click', function(e){ 10 11 //store hash 12 var target = this.hash; 13 14 e.preventDefault(); 15 16 $('body').scrollTo(target, 1000, {offset: -60, 'axis':'y'}); 17 18 }); 19 20 21 jQuery(document).ready(function() { 22 if($("#gmap").length){ 23 24 var lat=$("#gmap").attr("data-lat"); // Latitude of the place to be marked 25 26 var long=$("#gmap").attr("data-long"); // Longitude of the place to be marked 27 28 var infoWin=$("#gmap").attr("data-info-win"); // Content to be shown in Info Window on Marker 29 30 callGoogleMapStyle(lat, long, infoWin); // Call to Google Map Styler 31 } 32 }); 33 34 // ------------------------------------------------------------- 35 // Sticky Nav 36 // ------------------------------------------------------------- 37 38 39 (function () { 40 41 $(window).scroll(function() { 42 var nav = $('.home-banner .navbar'); 43 var $this = $(this); 44 45 if($this.scrollTop() > 735) { 46 nav.addClass('sticky-nav animated fadeInDown'); 47 } 48 else { 49 nav.removeClass('sticky-nav animated fadeInDown'); 50 } 51 }); 52 53 }()); 54 55 56 57 // ------------------------------------------------------------- 58 // Owl Carousel 59 // ------------------------------------------------------------- 60 61 (function() { 62 63 $(".clients-slider").owlCarousel({ 64 items:4, 65 nav:true, 66 autoplay:true, 67 dots:false, 68 navText: false, 69 responsive: { 70 0: { 71 items: 1, 72 slideBy:1 73 }, 74 480: { 75 items: 2, 76 slideBy:1 77 }, 78 768: { 79 items: 3, 80 slideBy:1 81 }, 82 991: { 83 items: 4, 84 slideBy:1 85 }, 86 } 87 }); 88 89 $(".testimony-slider").owlCarousel({ 90 items:1, 91 autoplay:true, 92 loop: true, 93 autoplaySpeed: 900, 94 autoplayHoverPause:true 95 }); 96 97 98 }()); 99 100 // ------------------------------------------------------------- 101 // Cubeportfolio 102 // ------------------------------------------------------------- 103 104 105 (function () { 106 107 $('#portfolio-item').cubeportfolio({ 108 filters: '#portfolio-menu', 109 loadMore: '#portfolio-menu', 110 animationType: 'sequentially', 111 gapVertical: 30, 112 gapHorizontal: 0, 113 114 }); 115 116 }()); 117 118 function callGoogleMapStyle(lat, long, infoWin) 119{ 120 var styles = [ 121 { 122 featureType: 'water', //Color of the Water Bodies 123 elementType: 'geometry.fill', 124 stylers: [ 125 { color: '#adc9b8' } 126 ] 127 },{ 128 featureType: 'landscape.natural', //Color of the Natural Landscapes 129 elementType: 'all', 130 stylers: [ 131 { hue: '#809f80' }, 132 { lightness: -35 } 133 ] 134 },{ 135 featureType: 'poi', //Color of Points of Interest like Business 136 elementType: 'geometry', 137 stylers: [ 138 { hue: '#f9e0b7' }, 139 { lightness: 30 } 140 ] 141 },{ 142 featureType: 'road', //Color of Main Roads 143 elementType: 'geometry', 144 stylers: [ 145 { hue: '#d5c18c' }, 146 { lightness: 14 } 147 ] 148 },{ 149 featureType: 'road.local', //Color Of Local Roads 150 elementType: 'all', 151 stylers: [ 152 { hue: '#ffd7a6' }, 153 { saturation: 100 }, 154 { lightness: -12 } 155 ] 156 } 157]; 158 159 var options = { 160 mapTypeControlOptions: { 161 mapTypeIds: ['Styled'] 162 }, 163 center: new google.maps.LatLng(lat, long), 164 zoom: 16, 165 disableDefaultUI: true, 166 mapTypeId: 'Styled' 167 }; 168 var div = document.getElementById('gmap'); 169 170 var map = new google.maps.Map(div, options); 171 172 var styledMapType = new google.maps.StyledMapType(styles, { name: 'Styled' }); 173 174 map.mapTypes.set('Styled', styledMapType); 175 176 var marker = new google.maps.Marker({ 177 map: map, 178 position: new google.maps.LatLng(lat, long) // Set Marker Position of the place 179 });
180 181 marker['infowindow'] = new google.maps.InfoWindow({ 182 content: infoWin // Set Content of the Info Window of the Marker 183 }); 184 185 new google.maps.event.addListener(marker, 'mouseover', function() { 186 this['infowindow'].open(map, this); // On Marker Hover, show Info Window 187 }); 188} 189 190}); // Main js end 191
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.