1 2 // TRIGGER ANIMATIONS 3 // http://www.oxygenna.com/tutorials/scroll-animations-using-waypoints-js-animate-css 4 $(window).bind('load resize', function(){ 5 6 function onScrollInit( items, trigger ) { 7 8 items.each( function() { 9 var osElement = $(this), 10 osAnimationClass = osElement.attr('data-os-animation'), 11 osAnimationDelay = osElement.attr('data-os-animation-delay'); 12 13 osElement.css({ 14 '-webkit-animation-delay': osAnimationDelay, 15 '-moz-animation-delay': osAnimationDelay, 16 '-ms-animation-delay': osAnimationDelay, 17 'animation-delay': osAnimationDelay 18 }); 19 20 var osTrigger = ( trigger ) ? trigger : osElement; 21 22 osTrigger.waypoint(function() { 23 osElement.addClass('animated').addClass(osAnimationClass); 24 $('.slick-slide .os-animation').removeClass('fadeInUp animated'); 25 $('.slick-active .os-animation').addClass('fadeInUp animated'); 26 },{ 27 //triggerOnce: true, 28 offset: '90%' 29 }); 30 }); 31 32 } 33 onScrollInit( $('.os-animation') ); 34 35 }); 36 37 $(document).ready(function() { 38 39 $(".item:nth-child(odd), ul li:nth-child(odd), dl dt:nth-child(odd), dl dd:nth-child(odd), tr:nth-child(odd), .tables .body .item:nth-child(odd)").addClass("odd"); 40 $(".item:nth-child(even), ul li:nth-child(even), dl dt:nth-child(even), dl dd:nth-child(even), tr:nth-child(even), .tables .body .item:nth-child(even)").addClass("even"); 41 42 // DROP DOWN - CLICK & HOVER - MAIN NAV 43 $(".navigation nav.main ul li.has-child").hover(function(){ 44 $(this).toggleClass("hover"); 45 $(this).toggleClass("hover"); 46 }); 47 //$(".navigation nav.main ul ul").hide(); 48 $(".navigation nav.main ul li > i").click(function(){ 49 if ($(".navigation nav.main ul li > i").length ) { 50 $(this).parent().toggleClass("open"); 51 $(this).parent().siblings().removeClass("open"); 52 } 53 else{ 54 $(this).parent().toggleClass("open"); 55 } 56 }); 57 $("html").click(function() { 58 $(".navigation nav.main ul li.open").removeClass("open"); 59 }); 60 $(".navigation nav.main ul li > i").click(function(e){ 61 e.stopPropagation(); 62 }); 63 64 // EXPAND MOBILE NAVIVAGTION 65 $("header a.expand").click(function(){ 66 if ($(".navigation .reveal").length ) { 67 $("header a.expand").toggleClass('active'); 68 $("html").toggleClass('reveal-out'); 69 } 70 else{ 71 $("header a.expand").toggleClass('active'); 72 $("html").toggleClass('reveal-out'); 73 } 74 }); 75 76 // SLIDESHOWS 77 $(".banner .slides").slick({ 78 arrows: true, 79 dots: true, 80 infinite: true, 81 speed: 600, 82 fade: true, 83 adaptiveHeight: true, 84 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 85 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>', 86 responsive: [ 87 { 88 breakpoint: 767, 89 settings: { 90 arrows: false 91 } 92 } 93 ] 94 }); 95 96 // SLICK CAROUSEL ANIMATE EACH SLIDE 97 $('.banner .slides').on('afterChange', function(event, slick, currentSlide){ 98 $('.slick-active .os-animation').removeClass('fadeInUp animated'); 99 $('.slick-active .os-animation').addClass('fadeInUp animated'); 100 }); 101 $('.banner .slides').on('beforeChange', function(event, slick, currentSlide){ 102 $('.slick-active .os-animation').removeClass('fadeInUp animated'); 103 }); 104 105 $(".slideshow").slick({ 106 arrows: true, 107 dots: false, 108 infinite: true, 109 speed: 600, 110 fade: false, 111 adaptiveHeight: true, 112 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 113 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>' 114 }); 115 116 $(".image-carousel .slides").slick({ 117 arrows: true, 118 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 119 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>', 120 dots: true, 121 infinite: true, 122 speed: 600, 123 easing: 'linear', 124 slidesToShow: 4, 125 slidesToScroll: 4, 126 responsive: [ 127 { 128 breakpoint: 1200, 129 settings: { 130 slidesToShow: 3, 131 slidesToScroll: 3, 132 } 133 }, 134 { 135 breakpoint: 768, 136 settings: { 137 slidesToShow: 2, 138 slidesToScroll: 2 139 } 140 }, 141 { 142 breakpoint: 480, 143 settings: { 144 slidesToShow: 1, 145 slidesToScroll: 1 146 } 147 } 148 ] 149 }); 150 151 // SCROLL PROMPT LINK 152 $('.advanced-page .scroll-prompt').click(function() { 153 154 var target; 155 $("section").not($(this).parent().parent().parent().parent().parent()).each(function(i, element) { 156 157 target = ($(element).offset().top - 60); 158 if (target - 10 > $(document).scrollTop()) { 159 return false; // break 160 } 161 }); 162 $("html, body").animate({ 163 scrollTop: target 164 }, 600); 165 166 }); 167 $('.standard-page .scroll-prompt').click(function() { 168 169 var target; 170 $("section").not($(this).parent().parent()).each(function(i, element) { 171 172 target = ($(element).offset().top - 60); 173 if (target - 10 > $(document).scrollTop()) { 174 return false; // break 175 } 176 }); 177 $("html, body").animate({ 178 scrollTop: target 179 }, 600); 180 181 }); 182 183 // BACK TO TOP 184 if ( ($(window).height() + 100) < $(document).height() ) { 185 186 $('#top-link-block').addClass('show').affix({ 187 // how far to scroll down before link "slides" into view 188 offset: {top:140} 189 }); 190 191 } 192 193 // PARALLAX 194 //$('.item.parallax').parallax({ 195 // speed: -0.25 196 //}); 197 198 // MATCH HEIGHTS 199 // LISTING - GRID 200 $(".listing.grid .item").matchHeight({ 201 byRow: true 202 }); 203 $(".listing.grid .text").matchHeight({ 204 byRow: true 205 }); 206 207 // PROMO PODS 208 $(".promo-pods .item").matchHeight({ 209 byRow: true 210 }); 211 $(".promo-pods .text").matchHeight({ 212 byRow: true 213 }); 214 215 // TEXT WITH VIDEO OR IMAGE 216 $(".apc.text-with-image-or-video .image, .apc.text-with-image-or-video .item").matchHeight({ 217 byRow: true 218 }); 219 220 // WIDE COLUMN SITE WIDE POD 221 $(".swp > .col-xs-12").matchHeight({ 222 byRow: true 223 }); 224 225 }); 226 227 // OPEN MULTIPLE COLLAPSE PANELS 228 // http://www.bootply.com/90JfjI2Q7n 229 $(function () { 230 231 $('a[data-toggle="collapse"]').on('click',function(){ 232 var objectID=$(this).attr('href'); 233 if($(objectID).hasClass('in')) 234 { 235 $(objectID).collapse('hide'); 236 } 237 else{ 238 $(objectID).collapse('show'); 239 } 240 }); 241 242 // EXPAND ALL 243 $('#expandAll').on('click',function(){ 244 $('a[data-toggle="collapse"]').each(function(){ 245 var objectID=$(this).attr('href'); 246 if($(objectID).hasClass('in')===false) 247 { 248 $(objectID).collapse('show'); 249 } 250 }); 251 }); 252 253 // COLLAPSE ALL 254 $('#collapseAll').on('click',function(){ 255 $('a[data-toggle="collapse"]').each(function(){ 256 var objectID=$(this).attr('href'); 257 $(objectID).collapse('hide'); 258 }); 259 }); 260 }); 261 262 // LIGTHBOX 263 $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { 264 event.preventDefault(); 265 $(this).ekkoLightbox(); 266 }); 267 268 // HEADER SCROLLING 269 var didScroll; 270 var lastScrollTop = 0; 271 var delta = 160; 272 var navbarHeight = $('header').outerHeight(); 273 274 $(window).scroll(function(event){ 275 didScroll = true; 276 }); 277 278 setInterval(function() { 279 if (didScroll) { 280 hasScrolled(); 281 didScroll = false;
282 } 283 }, 160); 284 285 function hasScrolled() { 286 var st = $(this).scrollTop(); 287 288 // Make sure they scroll more than delta 289 if(Math.abs(lastScrollTop - st) <= delta) 290 return; 291 292 if (st > lastScrollTop && st > navbarHeight){ 293 // Scroll Down 294 $('html').removeClass('nav-down').addClass('nav-up'); 295 } else { 296 // Scroll Up 297 $('html').addClass('nav-down').removeClass('nav-up'); 298 } 299 300 lastScrollTop = st; 301 } 302 303 // FIXED HEADER 304 $(window).scroll(function() { 305 306 var scroll = $(window).scrollTop(); 307 308 if (scroll >= 160) { 309 $("html").removeClass("reached-top"); 310 } else { 311 $("html").addClass("reached-top"); 312 } 313 314 }); 315
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.