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 $("header").toggleClass('pos'); 69 $("html").toggleClass('reveal-out'); 70 } 71 else{ 72 $("header a.expand").toggleClass('active'); 73 $("html").toggleClass('reveal-out'); 74 } 75 }); 76 77 // SLIDESHOWS 78 $(".banner .slides").slick({ 79 arrows: true, 80 dots: true, 81 infinite: true, 82 speed: 600, 83 fade: true, 84 adaptiveHeight: true, 85 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 86 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>', 87 responsive: [ 88 { 89 breakpoint: 767, 90 settings: { 91 arrows: false 92 } 93 } 94 ] 95 }); 96 97 // SLICK CAROUSEL ANIMATE EACH SLIDE 98 $('.banner .slides').on('afterChange', function(event, slick, currentSlide){ 99 $('.slick-active .os-animation').removeClass('fadeInUp animated'); 100 $('.slick-active .os-animation').addClass('fadeInUp animated'); 101 }); 102 $('.banner .slides').on('beforeChange', function(event, slick, currentSlide){ 103 $('.slick-active .os-animation').removeClass('fadeInUp animated'); 104 }); 105 106 $(".slideshow").slick({ 107 arrows: true, 108 dots: false, 109 infinite: true, 110 speed: 600, 111 fade: false, 112 adaptiveHeight: true, 113 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 114 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>' 115 }); 116 117 $(".image-carousel .slides").slick({ 118 arrows: true, 119 prevArrow: '<div class="slick-prev"><i class="ion-chevron-left"></i>', 120 nextArrow: '<div class="slick-next"><i class="ion-chevron-right"></i>', 121 dots: true, 122 infinite: true, 123 speed: 600, 124 easing: 'linear', 125 slidesToShow: 4, 126 slidesToScroll: 4, 127 responsive: [ 128 { 129 breakpoint: 1200, 130 settings: { 131 slidesToShow: 3, 132 slidesToScroll: 3, 133 } 134 }, 135 { 136 breakpoint: 768, 137 settings: { 138 slidesToShow: 2, 139 slidesToScroll: 2 140 } 141 }, 142 { 143 breakpoint: 480, 144 settings: { 145 slidesToShow: 1, 146 slidesToScroll: 1 147 } 148 } 149 ] 150 }); 151 152 // SCROLL PROMPT LINK 153 $('.advanced-page .scroll-prompt').click(function() { 154 155 var target; 156 $("section").not($(this).parent().parent().parent().parent().parent()).each(function(i, element) { 157 158 target = ($(element).offset().top - 60); 159 if (target - 10 > $(document).scrollTop()) { 160 return false; // break 161 } 162 }); 163 $("html, body").animate({ 164 scrollTop: target 165 }, 600); 166 167 }); 168 $('.standard-page .scroll-prompt').click(function() { 169 170 var target; 171 $("section").not($(this).parent().parent()).each(function(i, element) { 172 173 target = ($(element).offset().top - 60); 174 if (target - 10 > $(document).scrollTop()) { 175 return false; // break 176 } 177 }); 178 $("html, body").animate({ 179 scrollTop: target 180 }, 600); 181 182 }); 183 184 // BACK TO TOP 185 if ( ($(window).height() + 100) < $(document).height() ) { 186 187 $('#top-link-block').addClass('show').affix({ 188 // how far to scroll down before link "slides" into view 189 offset: {top:140} 190 }); 191 192 } 193 194 // PARALLAX 195 $('.item.parallax').parallax({ 196 speed: -0.25 197 }); 198 199 // MATCH HEIGHTS 200 // LISTING - GRID 201 $(".listing.grid .item").matchHeight({ 202 byRow: true 203 }); 204 $(".listing.grid .text").matchHeight({ 205 byRow: true 206 }); 207 208 // PROMO PODS 209 $(".promo-pods .item").matchHeight({ 210 byRow: true 211 }); 212 $(".promo-pods .text").matchHeight({ 213 byRow: true 214 }); 215 216 // TEXT WITH VIDEO OR IMAGE 217 $(".apc.text-with-image-or-video .image, .apc.text-with-image-or-video .item").matchHeight({ 218 byRow: true 219 }); 220 221 // WIDE COLUMN SITE WIDE POD 222 $(".swp > .col-xs-12").matchHeight({ 223 byRow: true 224 }); 225 226 }); 227 228 // OPEN MULTIPLE COLLAPSE PANELS 229 // http://www.bootply.com/90JfjI2Q7n 230 $(function () { 231 232 $('a[data-toggle="collapse"]').on('click',function(){ 233 var objectID=$(this).attr('href'); 234 if($(objectID).hasClass('in')) 235 { 236 $(objectID).collapse('hide'); 237 } 238 else{ 239 $(objectID).collapse('show'); 240 } 241 }); 242 243 // EXPAND ALL 244 $('#expandAll').on('click',function(){ 245 $('a[data-toggle="collapse"]').each(function(){ 246 var objectID=$(this).attr('href'); 247 if($(objectID).hasClass('in')===false) 248 { 249 $(objectID).collapse('show'); 250 } 251 }); 252 }); 253 254 // COLLAPSE ALL 255 $('#collapseAll').on('click',function(){ 256 $('a[data-toggle="collapse"]').each(function(){ 257 var objectID=$(this).attr('href'); 258 $(objectID).collapse('hide'); 259 }); 260 }); 261 }); 262 263 // LIGTHBOX 264 $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) { 265 event.preventDefault(); 266 $(this).ekkoLightbox(); 267 }); 268 269 // HEADER SCROLLING 270 var didScroll; 271 var lastScrollTop = 0; 272 var delta = 160; 273 var navbarHeight = $('header').outerHeight(); 274 275 $(window).scroll(function(event){ 276 didScroll = true; 277 }); 278 279 setInterval(function() { 280 if (didScroll) { 281 hasScrolled(); 282 didScroll = false;
283 } 284 }, 160); 285 286 function hasScrolled() { 287 /* var st = $(this).scrollTop(); 288 289 // Make sure they scroll more than delta 290 if(Math.abs(lastScrollTop - st) <= delta) 291 return; 292 293 if (st > lastScrollTop && st > navbarHeight){ 294 // Scroll Down 295 $('html').removeClass('nav-down').addClass('nav-up'); 296 } else { 297 // Scroll Up 298 $('html').addClass('nav-down').removeClass('nav-up'); 299 } 300 301 lastScrollTop = st;*/ 302 } 303 304 // FIXED HEADER 305 $(window).scroll(function() { 306 307 var scroll = $(window).scrollTop(); 308 309 if (scroll >= 160) { 310 $("html").removeClass("reached-top"); 311 } else { 312 $("html").addClass("reached-top"); 313 } 314 315 }); 316
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.