1jQuery(window).on("load", function() { 2 "use strict"; 3 4 /* ----------------------------------------- 5 FlexSlider Init 6 ----------------------------------------- */ 7 var homeSlider = jQuery('.home-slider'); 8 if ( homeSlider.length ) { 9 homeSlider.flexslider( { 10 controlNav : true, 11 directionNav: false, 12 prevText : '', 13 nextText : '', 14 animation: ThemeOption.slider_effect, 15 direction: ThemeOption.slider_direction, 16 slideshow: Boolean(ThemeOption.slider_autoslide), 17 slideshowSpeed: Number(ThemeOption.slider_speed), 18 animationSpeed: Number(ThemeOption.slider_duration), 19 pauseOnHover: true, 20 start: function( slider ) { 21 slider.removeClass( 'loading' ); 22 }, 23 after: function( slider ){ 24 var currentSlide = slider.slides.eq(slider.currentSlide); 25 currentSlide.siblings().each(function() { 26 var src = jQuery(this).find('iframe').attr('src'); 27 jQuery(this).find('iframe').attr('src',src); 28 }); 29 } 30 }); 31 } 32 33 var testimonialSlider = jQuery('.testimonials'); 34 if ( testimonialSlider.length ) { 35 testimonialSlider.flexslider( { 36 controlNav: false, 37 prevText : '', 38 nextText : '' 39 } ); 40 } 41 42 var portfolioSlider = jQuery('.portfolio-slider'); 43 if ( portfolioSlider.length ) { 44 portfolioSlider.flexslider({ 45 controlNav: false, 46 prevText : '', 47 nextText : '' 48 }); 49 } 50 51 /* ----------------------------------------- 52 Filtering functionality 53 ----------------------------------------- */ 54 if ( jQuery(".filters-nav").length ) { 55 var $container = jQuery('.item-list'); 56 $container.isotope(); 57 58 // filter items when filter link is clicked 59 jQuery('.filters-nav li a').click(function(){ 60 var selector = jQuery(this).attr('data-filter'); 61 jQuery(this).parent().siblings().find('a').removeClass('selected'); 62 jQuery(this).addClass("selected"); 63 64 $container.isotope({ 65 filter : selector, 66 animationOptions: { 67 duration: 750, 68 easing : 'linear', 69 queue : false 70 } 71 }); 72 73 return false; 74 }); 75 } 76 77 /* ----------------------------------------- 78 Parallax 79 ----------------------------------------- */ 80 function initParallax() { 81 jQuery('.parallax').each(function() { 82 var $self = jQuery(this), 83 offsetCoords = $self.offset(), 84 yPos = 0, 85 topOffset = offsetCoords.top, 86 speed = jQuery(this).data('speed'); 87 88 $self.css('backgroundPosition', '50% 0'); 89 var lastScrollTop = 0, 90 $window = jQuery(window); 91 92 $window.scroll(function() { 93 // If this section is in view 94 if ( ($window.scrollTop() + $window.height()) > (topOffset) && (( topOffset + $self.height()) > $window.scrollTop() )) { 95 96 var current = $self.css('backgroundPosition').split(" "); 97 current = current[1].replace('px', ''); 98 99 var st = jQuery(this).scrollTop(); 100 if (st > lastScrollTop) { 101 // Down 102 yPos = (parseInt(current, 10) - speed); 103 if ( yPos > $self.height() ) { yPos = $self.height(); } 104 } else { 105 // Up 106 yPos = (parseInt(current, 10) + speed); 107 if ( yPos > 0 ) { yPos = 0; } 108 } 109 lastScrollTop = st; 110 111 var coords = '50% '+ yPos + 'px'; 112 113 // Move the background 114 $self.css({ backgroundPosition: coords }); 115 } 116 }); 117 }); 118 } 119 120 if ( jQuery(window).width() > 767 ) { 121 initParallax(); 122 } 123 124 /* ----------------------------------------- 125 Equalize Heights 126 ----------------------------------------- */ 127 jQuery(".item-list").find("div[class^='col']").matchHeight(); 128}); 129 130jQuery(document).ready(function($) { 131 "use strict"; 132 133 /* ----------------------------------------- 134 Sticky header 135 ----------------------------------------- */ 136 $(".header").waypoint('sticky', { 137 offset: 43 138 }); 139 140 /* ----------------------------------------- 141 Responsive Menus Init with mmenu 142 ----------------------------------------- */ 143 var mainNav = $("#navigation"), 144 mobileNav = $("#mobilemenu"); 145 146 mainNav.clone().removeAttr('id').removeClass().appendTo(mobileNav); 147 mobileNav.find('li').removeAttr('id'); 148 149 mobileNav.mmenu({ 150 offCanvas: { 151 position : 'top', 152 zposition: 'front' 153 } 154 }); 155 156 /* ----------------------------------------- 157 Main Navigation Init 158 ----------------------------------------- */ 159 $('#navigation').superfish({ 160 delay : 300, 161 animation : { opacity: 'show', height: 'show' }, 162 speed : 'fast', 163 dropShadows: false 164 }); 165 166 /* ----------------------------------------- 167 Responsive Videos with fitVids 168 ----------------------------------------- */ 169 $('body').fitVids(); 170 171 172 /* ----------------------------------------- 173 Lightbox 174 ----------------------------------------- */ 175 var pp_images = $("a[data-rel^='prettyPhoto']"); 176 if (pp_images.length) { 177 pp_images.prettyPhoto({ 178 show_title : false, 179 hook : 'data-rel',
180 social_tools : false, 181 theme : 'pp_woocommerce', 182 horizontal_padding: 20, 183 opacity : 0.8, 184 deeplinking : false 185 }); 186 } 187 188 189 /* ----------------------------------------- 190 Contact Map Init 191 ----------------------------------------- */ 192 var contact_map = $("#map"); 193 if ( contact_map.length ) { 194 var lat = contact_map.data('lat'), 195 lng = contact_map.data('lng'), 196 tipText = contact_map.data('tooltip-txt'), 197 titleText = contact_map.attr('title'); 198 199 map_init('map', lat, lng, tipText, titleText); 200 } 201 202}); 203 204 205function map_init(mapID, lat, lng, tipText, titleText) { 206 'use strict'; 207 if ( typeof google === 'object' && typeof google.maps === 'object' ) { 208 var myLatlng = new google.maps.LatLng( lat, lng ); 209 var mapOptions = { 210 scrollwheel: false, 211 zoom : 8, 212 center : myLatlng, 213 mapTypeId : google.maps.MapTypeId.ROADMAP, 214 styles : [ 215 {"stylers": [{"saturation": -100}, {"gamma": 1}]}, 216 { 217 "elementType": "labels.text.stroke", 218 "stylers" : [{"visibility": "off"}] 219 }, 220 { 221 "featureType": "poi.business", 222 "elementType": "labels.text", 223 "stylers" : [{"visibility": "off"}] 224 }, 225 { 226 "featureType": "poi.business", 227 "elementType": "labels.icon", 228 "stylers" : [{"visibility": "off"}] 229 }, 230 { 231 "featureType": "poi.place_of_worship", 232 "elementType": "labels.text", 233 "stylers" : [{"visibility": "off"}] 234 }, 235 { 236 "featureType": "poi.place_of_worship", 237 "elementType": "labels.icon", 238 "stylers" : [{"visibility": "off"}] 239 }, 240 { 241 "featureType": "road", 242 "elementType": "geometry", 243 "stylers" : [{"visibility": "simplified"}] 244 }, 245 { 246 "featureType": "water", 247 "stylers" : [{"visibility": "on"}, {"saturation": 50}, {"gamma": 0}, {"hue": "#50a5d1"}] 248 }, 249 { 250 "featureType": "administrative.neighborhood", 251 "elementType": "labels.text.fill", 252 "stylers" : [{"color": "#333333"}] 253 }, 254 { 255 "featureType": "road.local", 256 "elementType": "labels.text", 257 "stylers" : [{"weight": 0.5}, {"color": "#333333"}] 258 }, 259 { 260 "featureType": "transit.station", 261 "elementType": "labels.icon", 262 "stylers" : [{"gamma": 1}, {"saturation": 0}] 263 } 264 ] 265 }; 266 267 var map = new google.maps.Map( document.getElementById( mapID ), mapOptions ); 268 269 var contentString = '<div class="content">' + tipText + '</div>'; 270 271 var infowindow = new google.maps.InfoWindow( { 272 content: contentString 273 } ); 274 275 var marker = new google.maps.Marker( { 276 position: myLatlng, map: map, title: titleText 277 } ); 278 279 google.maps.event.addListener( marker, 'click', function() { 280 infowindow.open( map, marker ); 281 } ); 282 } 283}
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.