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