1$ = jQuery; 2$(document).ready(function(){ 3 4 if(window.location.hash) { 5 var hash = window.location.hash; 6 7 $('html, body').animate({ 8 scrollTop: $(hash).offset().top - 150 9 }, 500, 'swing'); 10 } 11 12 // smooth scrolling 13 $(function() { 14 $('a[href*="#"]').click(function() { 15 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 16 var target = $(this.hash); 17 target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 18 if (target.length) { 19 $('html,body').animate({ 20 scrollTop: target.offset().top - 150 21 }, 500); 22 return false; 23 } 24 } 25 }); 26 }); 27 28 $('.header_mobile').click(function(){ 29 $('.header_nav').toggle(); 30 $(this).find('i').toggleClass('fa-bars').toggleClass('fa-times'); 31 }); 32 33 // check if is touch device 34 function isTouchDevice() { 35 return 'ontouchstart' in document.documentElement; 36 } 37 38 // double click to go to main menu item on touch devices 39 if (isTouchDevice()){ 40 $('.header_nav li.menu-item-has-children a:not(".header_megamenu a")').on('click', function(e) { 41 if( !$(this).is('.clicked') ) { 42 e.preventDefault(); 43 $(this).addClass('clicked'); 44 } 45 }); 46 } 47 48 $('.ym_project_filters_clear').click(function(){ 49 window.location.href = window.location.href.split('?')[0]; 50 }); 51 52 var $window = $(window); 53 54 function check_if_in_view() { 55 var window_height = $window.height(); 56 var window_top_position = $window.scrollTop(); 57 var window_bottom_position = (window_top_position + window_height); 58 59 $.each($('.to_animate'), function() { 60 var $element = $(this); 61 var element_height = $element.outerHeight(); 62 var element_top_position = $element.offset().top; 63 var element_bottom_position = (element_top_position + element_height); 64 65 //check to see if this current container is within viewport 66 if ((element_bottom_position >= window_top_position) && 67 (element_top_position <= window_bottom_position)) { 68 69 $element.addClass('animate'); 70 71 } else { 72 $element.removeClass('animate'); 73 } 74 }); 75 76 $.each($('.counter'), function() { 77 var $element = $(this); 78 var element_height = $element.outerHeight(); 79 var element_top_position = $element.offset().top; 80 var element_bottom_position = (element_top_position + element_height); 81 82 countTo = $element.attr('data-count'); 83 84 if ((element_bottom_position >= window_top_position) && 85 (element_top_position <= window_bottom_position)) { 86 87 if(!(countTo % 1 != 0)){ 88 $({ countNum: $element.text()}).animate({ 89 countNum: countTo 90 }, 91 92 { 93 duration: 1000, 94 easing:'linear', 95 step: function() { 96 $element.text(Math.floor(this.countNum)); 97 }, 98 complete: function() { 99 $element.text(this.countNum); 100 } 101 102 }); 103 } else { 104 $({ countNum: $element.text()}).animate({ 105 countNum: countTo 106 }, 107 108 { 109 duration: 1000, 110 easing:'linear', 111 step: function() { 112 $element.text(Math.floor(this.countNum * 10 ) / 10); 113 }, 114 complete: function() { 115 $element.text(this.countNum); 116 } 117 118 }); 119 } 120 } 121 }); 122 123 } 124 125 $window.on('scroll resize', check_if_in_view); 126 $window.trigger('scroll'); 127 128 $('.ym_project_slider').slick({ 129 arrows:false, 130 dots:true, 131 autoplay:true, 132 autoplaySpeed:6000, 133 pauseOnHover:true 134 }); 135 136 $('.ym_webpage_slider').slick({ 137 slidesToShow:1, 138 slidesToScroll:1, 139 arrows:true, 140 dots:false, 141 fade:true, 142 }); 143 144 $('.ym_testimonial_slider').slick({ 145 slidesToShow:2, 146 slidesToScroll:1, 147 arrows:false, 148 dots:true, 149 adaptiveHeight:false, 150 responsive: [ 151 { 152 breakpoint: 991, 153 settings: { 154 slidesToShow: 1, 155 adaptiveHeight:true 156 } 157 } 158 ] 159 }); 160 161 if($(window).width() > 575){ 162 var tsHeight = $('.ym_testimonial_slider .slick-track').height(); 163 $('.ym_testimonial_slider .slick-slide').css('height',tsHeight + 'px' ); 164 } 165 166 167 $('.ym_process_slider').slick({ 168 slidesToShow:1, 169 slidesToScroll:1, 170 arrows:true, 171 appendArrows:$('.ym_process_slider_arrows'), 172 dots:true, 173 adaptiveHeight:false, 174 fade:true 175 }); 176 177 $('.ym_voting_block_image_slider').slick({ 178 arrows:false, 179 dots:true, 180 autoplay:true, 181 autoplaySpeed:4000, 182 pauseOnHover:true 183 }); 184 185 $('.footer_instagram_slider').slick({ 186 arrows:true, 187 dots:false, 188 centerMode:true, 189 slidesToShow:5, 190 slidesToScroll:1, 191 responsive: [ 192 { 193 breakpoint: 1200, 194 settings: { 195 slidesToShow: 4 196 } 197 }, 198 { 199 breakpoint: 992, 200 settings: { 201 slidesToShow: 3 202 } 203 }, 204 { 205 breakpoint: 768, 206 settings: { 207 slidesToShow: 2 208 } 209 }, 210 { 211 breakpoint: 350, 212 settings: { 213 slidesToShow: 1 214 } 215 } 216 ] 217 }); 218 219 $('.ym_featured_project_slider').slick({ 220 slidesToShow:1, 221 slidesToScroll:1, 222 arrows:false, 223 dots:false, 224 asNavFor:'.ym_featured_project_thumbnails', 225 fade:true, 226 adaptiveHeight:true 227 }); 228 229 $('.ym_featured_project_thumbnails').slick({ 230 slidesToShow:4, 231 slidesToScroll:1, 232 arrows:true, 233 dots:false, 234 asNavFor:'.ym_featured_project_slider', 235 focusOnSelect:true, 236 responsive: [ 237 { 238 breakpoint: 767, 239 settings: { 240 slidesToShow: 3 241 } 242 }, 243 { 244 breakpoint: 575, 245 settings: { 246 slidesToShow: 1 247 } 248 } 249 ] 250 }); 251 252 $(window).scroll(function(){ 253 if($(window).scrollTop() > 0){ 254 $('.header').addClass('header_scrolled'); 255 } else { 256 $('.header').removeClass('header_scrolled'); 257 } 258 }); 259 260 $('.ym_faq_q').click(function(){ 261 $(this).find('i').toggleClass('fa-times').toggleClass('fa-angle-down'); 262 $(this).closest('.ym_faq_section').find('.ym_faq_a').toggle(); 263 }); 264 265 $('.ym_team_member a').click(function(){ 266 var id = $(this).attr('id'); 267 var teamslide = $('.ym_team_slide.'+id); 268 teamslide.show('slide', { direction: 'right' }, 500); 269 }); 270 271 $('.ym_team_slide_close').click(function(){ 272 $(this).closest('.ym_team_slide').hide('slide', { direction: 'right' }, 500); 273 }); 274 275 $('.footer_word_slider').slick({ 276 fade:true, 277 arrows:false, 278 autoplay:true, 279 speed:1000 280 }); 281 282 function addColorPicker(){ 283 $('.addcolor').find('.ginput_container input').addClass('colorpick'); 284 } 285 286 addColorPicker(); 287 288 $('.colorpick').minicolors({ 289 defaultValue: '', 290 format: 'hex' 291 }); 292 293}); 294 295/* 296* Google Maps 297*/ 298function initialize() { 299 300 var mapProp = { 301 center: {lat: 42.353640, lng: -71.045390}, 302 zoom: 12, 303 disableDefaultUI: true, 304 styles: [ 305 {elementType: 'geometry', stylers: [{color: '#455560'}]}, 306 {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]}, 307 {elementType: 'labels.text.fill', stylers: [{color: '#1682c5'}]}, 308 { 309 featureType: 'administrative.locality', 310 elementType: 'labels.text.fill', 311 stylers: [{color: '#1682c5'}] 312 }, 313 { 314 featureType: 'poi', 315 elementType: 'labels.text.fill', 316 stylers: [{color: '#e1e1e1'}] 317 }, 318 { 319 featureType: 'poi.park', 320 elementType: 'geometry', 321 stylers: [{color: '#263c3f'}] 322 }, 323 { 324 featureType: 'poi.park', 325 elementType: 'labels.text.fill', 326 stylers: [{color: '#6b9a76'}] 327 }, 328 { 329 featureType: 'road', 330 elementType: 'geometry', 331 stylers: [{color: '#38414e'}] 332 }, 333 { 334 featureType: 'road', 335 elementType: 'geometry.stroke', 336 stylers: [{color: '#212a37'}] 337 }, 338 { 339 featureType: 'road', 340 elementType: 'labels.text.fill', 341 stylers: [{color: '#9ca5b3'}] 342 }, 343 { 344 featureType: 'road.highway', 345 elementType: 'geometry', 346 stylers: [{color: '#746855'}] 347 }, 348 { 349 featureType: 'road.highway', 350 elementType: 'geometry.stroke', 351 stylers: [{color: '#1f2835'}] 352 }, 353 { 354 featureType: 'road.highway', 355 elementType: 'labels.text.fill', 356 stylers: [{color: '#f3d19c'}] 357 }, 358 { 359 featureType: 'transit', 360 elementType: 'geometry', 361 stylers: [{color: '#2f3948'}] 362 }, 363 { 364 featureType: 'transit.station', 365 elementType: 'labels.text.fill', 366 stylers: [{color: '#d59563'}] 367 }, 368 { 369 featureType: 'water', 370 elementType: 'geometry', 371 stylers: [{color: '#bbbbbb'}] 372 }, 373 { 374 featureType: 'water', 375 elementType: 'labels.text.fill', 376 stylers: [{color: '#515c6d'}] 377 }, 378 { 379 featureType: 'water', 380 elementType: 'labels.text.stroke', 381 stylers: [{color: '#17263c'}] 382 } 383 ] 384 }; 385 386 var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); 387 388 var marker = new google.maps.Marker({ 389 position: {lat: 42.353640, lng: -71.045390}, 390 icon: '/wp-content/themes/yellingmule/public/img/map-icon.png' 391 }); 392
393 marker.setMap(map); 394 395} 396 397google.maps.event.addDomListener(window, 'load', initialize); 398 399console.log('Hey there! Looking for a job? Check out our careers page.');
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.