1(function($){ 2 3 if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || 4 navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || 5 navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || 6 navigator.userAgent.match(/Windows Phone/i) ){ 7 var gdlr_touch_device = true; 8 }else{ 9 var gdlr_touch_device = false; 10 } 11 12 // retrieve GET variable from url 13 $.extend({ 14 getUrlVars: function(){ 15 var vars = [], hash; 16 var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); 17 for(var i = 0; i < hashes.length; i++) 18 { 19 hash = hashes[i].split('='); 20 vars.push(hash[0]); 21 vars[hash[0]] = hash[1]; 22 } 23 return vars; 24 }, 25 getUrlVar: function(name){ 26 return $.getUrlVars()[name]; 27 } 28 }); 29 30 // blog - port nav 31 function gdlr_set_item_outer_nav(){ 32 $('.blog-item-wrapper > .gdlr-nav-container').each(function(){ 33 var container = $(this).siblings('.blog-item-holder'); 34 var child = $(this).children(); 35 child.css({ 'top':container.position().top, 'bottom':'auto', height: container.height() - 50 }); 36 }); 37 $('.portfolio-item-wrapper > .gdlr-nav-container').each(function(){ 38 var container = $(this).siblings('.portfolio-item-holder'); 39 var child = $(this).children(); 40 child.css({ 'top':container.position().top, 'bottom':'auto', height: container.height() - 40 }); 41 }); 42 } 43 44 // runs flex slider function 45 $.fn.gdlr_flexslider = function(){ 46 if(typeof($.fn.clevercourse_flexslider) == 'function'){ 47 $(this).each(function(){ 48 var flex_attr = { 49 animation: 'fade', 50 animationLoop: true, 51 prevText: '<i class="icon-angle-left" ></i>', 52 nextText: '<i class="icon-angle-right" ></i>', 53 useCSS: false 54 }; 55 56 // slide duration 57 if( $(this).attr('data-pausetime') ){ 58 flex_attr.slideshowSpeed = parseInt($(this).attr('data-pausetime')); 59 } 60 if( $(this).attr('data-slidespeed') ){ 61 flex_attr.animationSpeed = parseInt($(this).attr('data-slidespeed')); 62 } 63 64 // set the attribute for carousel type 65 if( $(this).attr('data-type') == 'carousel' ){ 66 flex_attr.move = 1; 67 flex_attr.animation = 'slide'; 68 69 if( $(this).closest('.gdlr-item-no-space').length > 0 ){ 70 flex_attr.itemWidth = $(this).width() / parseInt($(this).attr('data-columns')); 71 flex_attr.itemMargin = 0; 72 }else{ 73 flex_attr.itemWidth = (($(this).width() + 30) / parseInt($(this).attr('data-columns'))) - 30; 74 flex_attr.itemMargin = 30; 75 } 76 77 // if( $(this).attr('data-columns') == "1" ){ flex_attr.smoothHeight = true; } 78 }else{ 79 if( $(this).attr('data-effect') ){ 80 flex_attr.animation = $(this).attr('data-effect'); 81 } 82 } 83 if( $(this).attr('data-columns') ){ 84 flex_attr.minItems = parseInt($(this).attr('data-columns')); 85 flex_attr.maxItems = parseInt($(this).attr('data-columns')); 86 } 87 88 // set the navigation to different area 89 if( $(this).attr('data-nav-container') ){ 90 var flex_parent = $(this).parents('.' + $(this).attr('data-nav-container')).prev('.gdlr-nav-container'); 91 92 if( flex_parent.find('.gdlr-flex-prev').length > 0 || flex_parent.find('.gdlr-flex-next').length > 0 ){ 93 flex_attr.controlNav = false; 94 flex_attr.directionNav = false; 95 flex_attr.start = function(slider){ 96 flex_parent.find('.gdlr-flex-next').click(function(){ 97 slider.flexAnimate(slider.getTarget("next"), true); 98 }); 99 flex_parent.find('.gdlr-flex-prev').click(function(){ 100 slider.flexAnimate(slider.getTarget("prev"), true); 101 }); 102 103 gdlr_set_item_outer_nav(); 104 $(window).resize(function(){ gdlr_set_item_outer_nav(); }); 105 } 106 }else{ 107 flex_attr.controlNav = false; 108 flex_attr.controlsContainer = flex_parent.find('.nav-container'); 109 } 110 111 } 112 113 $(this).clevercourse_flexslider(flex_attr); 114 }); 115 } 116 } 117 118 // runs nivo slider function
119 $.fn.gdlr_nivoslider = function(){ 120 if(typeof($.fn.nivoSlider) == 'function'){ 121 $(this).each(function(){ 122 var nivo_attr = {}; 123 124 if( $(this).attr('data-pausetime') ){ 125 nivo_attr.pauseTime = parseInt($(this).attr('data-pausetime')); 126 } 127 if( $(this).attr('data-slidespeed') ){ 128 nivo_attr.animSpeed = parseInt($(this).attr('data-slidespeed')); 129 } 130 if( $(this).attr('data-effect') ){ 131 nivo_attr.effect = $(this).attr('data-effect'); 132 } 133 134 $(this).nivoSlider(nivo_attr); 135 }); 136 } 137 } 138 139 // runs isotope function 140 $.fn.gdlr_isotope = function(){ 141 if(typeof($.fn.isotope) == 'function'){ 142 $(this).each(function(){ 143 var layout = ($(this).attr('data-layout'))? $(this).attr('data-layout'): 'fitRows'; 144 if( layout == 'fitRows' ) return; 145 146 // execute isotope 147 var isotope_element = $(this); 148 isotope_element.children('.clear').remove(); 149 isotope_element.isotope({ 150 layoutMode: layout 151 }); 152 153 // resize event 154 $(window).resize(function(){ 155 isotope_element.isotope(); 156 }); 157 }); 158 } 159 } 160 161 // runs fancybox function 162 $.fn.gdlr_fancybox = function(){ 163 if(typeof($.fn.fancybox) == 'function'){ 164 var fancybox_attr = { 165 nextMethod : 'resizeIn', 166 nextSpeed : 250, 167 prevMethod : false, 168 prevSpeed : 250, 169 helpers : { media : {} } 170 }; 171 172 if( typeof($.fancybox.helpers.thumbs) == 'object' ){ 173 fancybox_attr.helpers.thumbs = { width: 50, height: 50 }; 174 } 175 176 $(this).fancybox(fancybox_attr); 177 } 178 } 179 180 // responsive video 181 $.fn.gdlr_fluid_video = function(){ 182 $(this).find('iframe[src*="youtube"], iframe[src*="vimeo"]').each(function(){ 183 184 if( ($(this).is('embed') && $(this).parent('object').length) || $(this).parent('.fluid-width-video-wrapper').length ){ return; } 185 if( !$(this).attr('id') ){ $(this).attr('id', 'gdlr-video-' + Math.floor(Math.random()*999999)); } 186 187 // ignore if inside layerslider 188 if( $(this).closest('.ls-container').length <= 0 ){ 189 var ratio = $(this).height() / $(this).width(); 190 $(this).removeAttr('height').removeAttr('width');
191 $(this).wrap('<div class="gdlr-fluid-video-wrapper"></div>').parent().css('padding-top', (ratio * 100)+"%"); 192 } 193 194 }); 195 } 196 197 // pie chart 198 $.fn.gdlr_pie_chart = function(){ 199 if(typeof($.fn.easyPieChart) == 'function'){ 200 $(this).each(function(){ 201 var gdlr_chart = $(this); 202 203 $(this).easyPieChart({ 204 animate: 1200, 205 lineWidth: gdlr_chart.attr('data-linewidth')? parseInt(gdlr_chart.attr('data-linewidth')): 8, 206 size: gdlr_chart.attr('data-size')? parseInt(gdlr_chart.attr('data-size')): 155, 207 barColor: gdlr_chart.attr('data-color')? gdlr_chart.attr('data-color'): '#a9e16e', 208 trackColor: gdlr_chart.attr('data-bg-color')? gdlr_chart.attr('data-bg-color'): '#f2f2f2', 209 backgroundColor: gdlr_chart.attr('data-background'), 210 scaleColor: false, 211 lineCap: 'square' 212 }); 213 214 // for responsive purpose 215 function limit_gdlr_chart_size(){ 216 if( gdlr_chart.parent().width() < parseInt(gdlr_chart.attr('data-size')) ){ 217 var max_width = gdlr_chart.parent().width() + 'px'; 218 gdlr_chart.css({'max-width': max_width, 'max-height': max_width}); 219 } 220 } 221 limit_gdlr_chart_size(); 222 $(window).resize(function(){ limit_gdlr_chart_size(); }); 223 }); 224 } 225 } 226 227 $(document).ready(function(){ 228 229 // top woocommerce button 230 $('.gdlr-top-woocommerce-wrapper').hover(function(){ 231 $(this).children('.gdlr-top-woocommerce').fadeIn(200); 232 }, function(){ 233 $(this).children('.gdlr-top-woocommerce').fadeOut(200); 234 }); 235 236 // script for accordion item 237 $('.gdlr-accordion-item').each(function(){ 238 var multiple_tab = $(this).hasClass('gdlr-multiple-tab'); 239 $(this).children('.accordion-tab').children('.accordion-title').click(function(){ 240 var current_tab = $(this).parent(); 241 if( current_tab.hasClass('active') ){ 242 current_tab.removeClass('pre-active'); 243 $(this).children('i').removeClass('icon-minus fa-minus').addClass('icon-plus fa-plus'); 244 $(this).siblings('.accordion-content').slideUp(function(){ current_tab.removeClass('active'); }); 245 }else{ 246 current_tab.addClass('pre-active'); 247 $(this).children('i').removeClass('icon-plus fa-plus').addClass('icon-minus fa-minus'); 248 $(this).siblings('.accordion-content').slideDown(function(){ current_tab.addClass('active'); }); 249 250 } 251 252 // close another tab if multiple tab is not allowed ( accordion ) 253 if( !multiple_tab ){ 254 current_tab.siblings().removeClass('pre-active'); 255 current_tab.siblings().children('.accordion-title').children('i').removeClass('icon-minus fa-minus').addClass('icon-plus fa-plus'); 256 current_tab.siblings().children('.accordion-content').slideUp(function(){ $(this).parent().removeClass('active'); }); 257 } 258 }); 259 }); 260 261 // script for tab item 262 $('.tab-title-wrapper').children().click(function(){ 263 $(this).addClass('active'); 264 $(this).siblings().removeClass('active'); 265 266 var selected_index = $(this).index() + 1; 267 $(this).parent().siblings('.tab-content-wrapper').children(':nth-child(' + selected_index + ')').each(function(){ 268 $(this).siblings().removeClass('active').hide(); 269 $(this).fadeIn(function(){ $(this).addClass('active'); }); 270 }) 271 }); 272 273 // initiate the tab when the get tab variable is sent 274 var inital_tab = $.getUrlVar('tab'); 275 if( inital_tab ){ $('#' + inital_tab.replace(',', ', #')).each(function(){ $(this).trigger('click'); }); } 276 277 // script for code item 278 $('.gdlr-code-item .gdlr-code-title').click(function(){ 279 var parent = $(this).parent(); 280 if( parent.hasClass('active') ){ 281 $(this).children('i').removeClass('icon-minus fa-minus').addClass('icon-plus fa-plus'); 282 $(this).siblings('.gdlr-code-content').slideUp(function(){ 283 parent.removeClass('active'); 284 }); 285 }else{ 286 $(this).children('i').removeClass('icon-plus fa-plus').addClass('icon-minus fa-minus'); 287 $(this).siblings('.gdlr-code-content').slideDown(function(){ 288 parent.addClass('active'); 289 }); 290 } 291 }); 292 293 // script for parallax background 294 $('.gdlr-parallax-wrapper').each(function(){ 295 if( $(this).hasClass('gdlr-background-image') ){ 296 var parallax_section = $(this); 297 var parallax_speed = parseFloat(parallax_section.attr('data-bgspeed')); 298 if( parallax_speed == 0 || gdlr_touch_device ) return; 299 if( parallax_speed == -1 ){ 300 parallax_section.css('background-attachment', 'fixed'); 301 parallax_section.css('background-position', 'center center'); 302 return; 303 } 304 305 $(window).scroll(function(){ 306 // if in area of interest 307 if( ( $(window).scrollTop() + $(window).height() > parallax_section.offset().top ) && 308 ( $(window).scrollTop() < parallax_section.offset().top + parallax_section.outerHeight() ) ){ 309 310 var scroll_pos = 0; 311 if( $(window).height() > parallax_section.offset().top ){ 312 scroll_pos = $(window).scrollTop(); 313 }else{ 314 scroll_pos = $(window).scrollTop() + $(window).height() - parallax_section.offset().top; 315 } 316 parallax_section.css('background-position', 'center ' + (-scroll_pos * parallax_speed) + 'px'); 317 } 318 }); 319 }else if( $(this).hasClass('gdlr-background-video') ){ 320 if(typeof($.fn.mb_YTPlayer) == 'function'){ 321 $(this).children('.gdlr-bg-player').mb_YTPlayer(); 322 } 323 }else{ 324 return; 325 } 326 }); 327 328 // video responsive 329 $('body').gdlr_fluid_video(); 330 331 // runs superfish menu 332 if(typeof($.fn.superfish) == 'function'){ 333 334 // create the mega menu script 335 $('#gdlr-main-navigation .sf-mega > ul').each(function(){ 336 $(this).children('li').each(function(){ 337 var current_item = $(this); 338 current_item.replaceWith( 339 $('<div />').addClass('sf-mega-section') 340 .addClass(current_item.attr('data-column')) 341 .attr('data-size', current_item.attr('data-size')) 342 .html( $('<div />').addClass('sf-mega-section-inner') 343 .addClass(current_item.attr('class')) 344 .attr('id', current_item.attr('id')) 345 .html(current_item.html()) 346 ) 347 ); 348 }); 349 $(this).replaceWith(this.innerHTML); 350 }); 351 352 // make every menu same height 353 $('#gdlr-main-navigation .sf-mega').each(function(){ 354 var sf_mega = $(this); $(this).show(); 355 356 var row = 0; var column = 0; var max_height = 0; 357 sf_mega.children('.sf-mega-section').each(function(){ 358 if( column % 60 == 0 ){ 359 if( row != 0 ){ 360 sf_mega.children('[data-row="' + row + '"]').children('.sf-mega-section-inner').height( max_height - 50 ); 361 max_height = 0; 362 } 363 row++; $(this).addClass('first-column'); 364 } 365 366 $(this).attr('data-row', row); 367 column += eval('60*' + $(this).attr('data-size'));
368 369 if( $(this).height() > max_height ){ 370 max_height = $(this).height(); 371 } 372 }); 373 374 sf_mega.children('[data-row="' + row + '"]').children('.sf-mega-section-inner').height( max_height - 50 ); 375 }); 376 377 $('#gdlr-main-navigation').superfish({ 378 delay: 400, 379 speed: 'fast' 380 }).supposition(); 381 } 382 383 // responsive menu 384 if(typeof($.fn.dlmenu) == 'function'){ 385 $('#gdlr-responsive-navigation').each(function(){ 386 $(this).find('.dl-submenu').each(function(){ 387 if( $(this).siblings('a').attr('href') && $(this).siblings('a').attr('href') != '#' ){ 388 var parent_nav = $('<li class="menu-item gdlr-parent-menu"></li>'); 389 parent_nav.append($(this).siblings('a').clone()); 390 391 $(this).prepend(parent_nav); 392 } 393 }); 394 $(this).dlmenu(); 395 }); 396 } 397 398 // gallery thumbnail type 399 $('.gdlr-gallery-thumbnail').each(function(){ 400 var thumbnail_container = $(this).children('.gdlr-gallery-thumbnail-container'); 401 402 $(this).find('.gallery-item').click(function(){ 403 var selected_slide = thumbnail_container.children('[data-id="' + $(this).attr('data-id') + '"]'); 404 if(selected_slide.css('display') == 'block') return false; 405 406 // check the gallery height 407 var image_width = selected_slide.children('img').attr('width'); 408 var image_ratio = selected_slide.children('img').attr('height') / image_width; 409 var temp_height = image_ratio * Math.min(thumbnail_container.width(), image_width); 410 411 thumbnail_container.animate({'height': temp_height}); 412 selected_slide.fadeIn().siblings().hide(); 413 return false; 414 }); 415 416 $(window).resize(function(){ thumbnail_container.css('height', 'auto') }); 417 }); 418 419 // fancybox 420 $('a[href$=".jpg"], a[href$=".png"], a[href$=".gif"]').not('[data-rel="fancybox"]').attr('data-rel', 'fancybox'); 421 $('[data-rel="fancybox"]').gdlr_fancybox(); 422 423 // image shortcode
424 $('.gdlr-image-link-shortcode').hover(function(){ 425 $(this).find('.gdlr-image-link-overlay').animate({opacity: 0.8}, 150); 426 $(this).find('.gdlr-image-link-icon').animate({opacity: 1}, 150); 427 }, function(){ 428 $(this).find('.gdlr-image-link-overlay').animate({opacity: 0}, 150); 429 $(this).find('.gdlr-image-link-icon').animate({opacity: 0}, 150); 430 }); 431 432 // Personnel 433 $('.gdlr-personnel-item.round-style .personnel-item').each(function(){ 434 var current_item = $(this); 435 function gdlr_set_round_personnel_height(){ 436 current_item.find('.personnel-item-inner').each(function(){ 437 $(this).css('margin-top', -($(this).height()/2)); 438 }); 439 } 440 441 gdlr_set_round_personnel_height(); 442 $(window).resize(function(){ 443 gdlr_set_round_personnel_height(); 444 }); 445 }); 446 $('.gdlr-personnel-item.round-style .personnel-item').hover(function(){ 447 $(this).find('.personnel-author-image').animate({'opacity':0.05}, 200); 448 $(this).find('.personnel-item-inner').animate({'opacity':1}, 200); 449 }, function(){ 450 $(this).find('.personnel-author-image').animate({'opacity':1}, 200); 451 $(this).find('.personnel-item-inner').animate({'opacity':0}, 200); 452 }); 453 454 // Price Table 455 $('.gdlr-price-table-item').each(function(){ 456 var price_table = $(this); 457 458 function set_price_table_height(){ 459 var max_height = 0; 460 var price_content = price_table.find('.price-content'); 461 462 price_content.css('height', 'auto'); 463 price_content.each(function(){ 464 if( max_height < $(this).height() ){ max_height = $(this).height(); } 465 }); 466 price_content.css('height', max_height); 467 } 468 469 set_price_table_height() 470 $(window).resize(function(){ set_price_table_height(); }); 471 }); 472 473 // Default text 474 $('form').submit(function(){ 475 var has_default = false; 476 $(this).find('input[data-default]').each(function(){ 477 if( $(this).is('#url') ){ 478 if( $(this).val() == $(this).attr('data-default') ) $(this).val(''); 479 }else{ 480 if( $(this).val() == $(this).attr('data-default') ) has_default = true; 481 } 482 }); 483 484 if(has_default) return false; 485 }); 486 487 // Search option 488 $('#gdlr-nav-search-form-button').click(function(){ 489 $('#gdlr-nav-search-form').slideToggle(200); 490 return false; 491 }); 492 $('#gdlr-nav-search-form').click(function(event){ 493 if(event.stopPropagation){ 494 event.stopPropagation(); 495 }else if(window.event){ 496 window.event.cancelBubble=true; 497 } 498 }); 499 $("html").click(function(){ 500 $('#gdlr-nav-search-form').slideUp(200); 501 }); 502 $('.search-text input[data-default], .gdlr-comments-area input[data-default]').each(function(){ 503 var default_value = $(this).attr("data-default"); 504 $(this).val(default_value); 505 $(this).on("blur", function(){ 506 if ($(this).val() == ""){ 507 $(this).val(default_value); 508 } 509 }).on("focus", function(){ 510 if ($(this).val() == default_value){ 511 $(this).val(""); 512 } 513 }); 514 }); 515 516 // smooth anchor 517 if( window.location.hash ){ 518 $('html, body').animate({ 519 scrollTop: $(window.location.hash).offset().top - 68 520 }, 500); 521 } 522 $('.gdlr-navigation a[href^="#"], .gdlr-responsive-navigation a[href^="#"]').click(function(){ 523 if( $(this).attr('href').length > 1 ){ 524 var item_id = $($(this).attr('href')); 525 526 if( $('body').hasClass('home') ){ 527 if( item_id.length > 0 ){ 528 $('html, body').animate({ 529 scrollTop: item_id.offset().top - 68 530 }, 500); 531 return false; 532 } 533 }else{ 534 window.location.replace($('.body-wrapper').attr('data-home') + '/' + $(this).attr('href')); 535 } 536 } 537 }); 538 539 // animate ux 540 if( !gdlr_touch_device ){ 541 542 // image ux 543 $('.content-wrapper img').each(function(){ 544 if( $(this).closest('.gdlr-ux, .ls-wp-container, .product, .flexslider, .nivoSlider').length ) return; 545 546 var ux_item = $(this); 547 if( ux_item.offset().top > $(window).scrollTop() + $(window).height() ){ 548 ux_item.css({ 'opacity':0 }); 549 }else{ return; } 550 551 $(window).scroll(function(){ 552 if( $(window).scrollTop() + $(window).height() > ux_item.offset().top + 100 ){ 553 ux_item.animate({ 'opacity':1 }, 1200); 554 } 555 }); 556 }); 557 558 // item ux 559 $('.gdlr-ux').each(function(){ 560 var ux_item = $(this); 561 if( ux_item.hasClass('gdlr-chart') || ux_item.hasClass('gdlr-skill-bar') ){ 562 if( ux_item.offset().top < $(window).scrollTop() + $(window).height() ){ 563 if( ux_item.hasClass('gdlr-chart') ){ 564 ux_item.gdlr_pie_chart(); 565 }else if( ux_item.hasClass('gdlr-skill-bar') ){ 566 ux_item.children('.gdlr-skill-bar-progress').each(function(){ 567 if($(this).attr('data-percent')){ 568 $(this).animate({width: $(this).attr('data-percent') + '%'}, 1200, 'easeOutQuart'); 569 } 570 }); 571 } 572 return; 573 } 574 }else if( ux_item.offset().top > $(window).scrollTop() + $(window).height() ){ 575 ux_item.css({ 'opacity':0, 'padding-top':20, 'margin-bottom':-20 }); 576 }else{ return; } 577 578 $(window).scroll(function(){ 579 if( $(window).scrollTop() + $(window).height() > ux_item.offset().top + 100 ){ 580 if( ux_item.hasClass('gdlr-chart') ){ 581 ux_item.gdlr_pie_chart(); 582 }else if( ux_item.hasClass('gdlr-skill-bar') ){ 583 ux_item.children('.gdlr-skill-bar-progress').each(function(){ 584 if($(this).attr('data-percent')){ 585 $(this).animate({width: $(this).attr('data-percent') + '%'}, 1200, 'easeOutQuart'); 586 } 587 }); 588 }else{ 589 ux_item.animate({ 'opacity':1, 'padding-top':0, 'margin-bottom':0 }, 1200); 590 } 591 } 592 }); 593 }); 594 595 // do not animate on scroll in mobile 596 }else{ 597 598 // Pie chart 599 $('.gdlr-chart').gdlr_pie_chart(); 600 601 602 // skill bar 603 $('.gdlr-skill-bar-progress').each(function(){ 604 if($(this).attr('data-percent')){ 605 $(this).animate({width: $(this).attr('data-percent') + '%'}, 1200, 'easeOutQuart'); 606 } 607 }); 608 } 609 610 // runs nivoslider when available
611 $('.nivoSlider').gdlr_nivoslider(); 612 613 // runs flexslider when available 614 $('.flexslider').gdlr_flexslider(); 615 616 }); 617 618 $(window).load(function(){ 619 620 // run isotope when available 621 $('.gdlr-isotope').gdlr_isotope(); 622 623 // float menu 624 $('.body-wrapper.float-menu').each(function(){ 625 var sub_area = $('#gdlr-header-substitute'); 626 var main_area = sub_area.siblings('.gdlr-header-wrapper'); 627 628 var logo = main_area.find('.gdlr-logo'); 629 var logo_img = main_area.find('.gdlr-logo img'); 630 var navigation = main_area.find('.gdlr-navigation-wrapper'); 631 var original = { 632 logo_top: logo.css('margin-top'), 633 logo_bottom: logo.css('margin-bottom'), 634 nav_top: navigation.css('margin-top') 635 }; 636 637 $(window).scroll(function(){ 638 if( main_area.hasClass('gdlr-fixed-header') && ($(this).scrollTop() == 0 || $(this).width() < 959)){ 639 main_area.children('.top-navigation-wrapper').slideDown(100); 640 641 logo.animate({'margin-top': original.logo_top, 'margin-bottom': original.logo_bottom}, {duration: 100, queue: false}); 642 logo_img.animate({'width': '100%'}, {duration: 100, queue: false}); 643 navigation.animate({'margin-top': original.nav_top}, {duration: 100, queue: false, 644 complete: function(){ 645 sub_area.css('height', 'auto'); 646 main_area.removeClass('gdlr-fixed-header'); 647 648 navigation.removeAttr("style"); 649 logo.removeAttr("style"); 650 } 651 }); 652 }else if( !main_area.hasClass('gdlr-fixed-header') && $(this).width() > 959 && 653 $(this).scrollTop() > main_area.children('.gdlr-header-inner').offset().top - parseInt($('html').css('margin-top')) ){ 654 sub_area.css('height', main_area.height()); 655 main_area.addClass('gdlr-fixed-header'); 656 main_area.children('.top-navigation-wrapper').hide(); 657 658 logo.animate({'margin-top': '20', 'margin-bottom': '23'}, {duration: 100, queue: false}); 659 logo_img.animate({'width': '80%'}, {duration: 100, queue: false}); 660 navigation.animate({'margin-top': '25'}, {duration: 100, queue: false}); 661 } 662 }); 663 }); 664 665 $(window).trigger('resize'); 666 $(window).trigger('scroll'); 667 }); 668 669})(jQuery);
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.