1jQuery(document).ready(function ($) { 2 "use strict"; 3 4 $('body.preloader').jpreLoader({ 5 showSplash : false, 6 loaderVPos : '50%', 7 }).css('visibility', 'visible'); 8 9 10 if (!$('header').hasClass('header_layout_left')) { 11 $(".scroll").on('click', function(e){ 12 e.preventDefault(); 13 var href = $(this).attr('href'); 14 var hash = href.split('#'); 15 var url_hash = '#' + hash[1]; 16 if ($(url_hash).length > 0) { 17 var offset = ($(window).width()<769) ? 20 : 65; 18 $('html, body').animate({ 19 scrollTop: $(url_hash).offset().top-offset 20 }, 1000); 21 } 22 else{ 23 location.href = href; 24 } 25 26 if($(window).width()<769){ 27 $menu_responsive.animate({width:'toggle'},350); 28 } 29 }); 30 } 31 32 if(window.location.hash){ 33 var hash = window.location.hash; 34 var $scrollto = $(hash); 35 if($scrollto.length){ 36 $('html, body').animate({ 37 scrollTop: $scrollto.offset().top-65 38 }, 1000); 39 } 40 } 41
42 //Onepager color waypoints 43 44 $('body.home.page').find('.tcvpb_section_tc').each(function(){ 45 var $section = $(this); 46 var section_id = $(this).attr("id"); 47 var $menu_item_left; 48 var $menu_item_right; 49 var $menu_item; 50 $section.waypoint({ 51 handler: function(direction){ 52 if(section_id!==undefined){ 53 $('.current-menu-item').removeClass('current-menu-item').removeClass('current-menu-ancestor'); 54 if(direction==='down'){ 55 $menu_item_left = $('#main_menu_left a[href=#'+section_id+']').parent(); 56 $menu_item_right = $('#main_menu_right a[href=#'+section_id+']').parent(); 57 $menu_item = $('#main_menu a[href=#'+section_id+']').parent(); 58 if($menu_item_left.length > 0 || $menu_item_right.length > 0 || $menu_item.length > 0){ 59 $menu_item_left.addClass('current-menu-item'); 60 $menu_item_right.addClass('current-menu-item'); 61 $menu_item.addClass('current-menu-item'); 62 } 63 else{ 64 $('#main_menu_left .current_page_item').addClass('current-menu-item'); 65 $('#main_menu_right .current_page_item').addClass('current-menu-item'); 66 $('#main_menu .current_page_item').addClass('current-menu-item'); 67 } 68 } 69 else if(direction==='up'){ 70 var previous_section_id = $section.prevAll('[id]:first').attr('id'); 71 $menu_item_left = $('#main_menu_left a[href=#'+previous_section_id+']').parent(); 72 $menu_item_right = $('#main_menu_right a[href=#'+previous_section_id+']').parent(); 73 $menu_item = $('#main_menu a[href=#'+previous_section_id+']').parent(); 74 if($menu_item_left.length > 0 || $menu_item_right.length > 0 || $menu_item.length > 0){ 75 $menu_item_left.addClass('current-menu-item'); 76 $menu_item_right.addClass('current-menu-item'); 77 $menu_item.addClass('current-menu-item'); 78 } 79 else{ 80 $('#main_menu_left .current_page_item').addClass('current-menu-item'); 81 $('#main_menu_right .current_page_item').addClass('current-menu-item'); 82 $('#main_menu .current_page_item').addClass('current-menu-item'); 83 } 84 } 85 } 86 }, 87 offset: 150 88 }); 89 }); 90 91 $('#back_to_top').on('click', function(e) { 92 e.preventDefault(); 93 $('html, body').animate({scrollTop: 0}, 500); 94 return false; 95 }); 96 97 var $main_slider = $('#ABdev_main_slider'); 98 $main_slider.height('auto'); 99 var $title_bar = $('#headline_breadcrumbs_bar'); 100 var $main_header = $('#ABdev_main_header.header_layout_default'); 101 var $header_spacer = $('#ABdev_header_spacer'); 102 103 var header_height = $main_header.outerHeight(); 104 105 $header_spacer.height(header_height); 106 107 // Header Over Slider 108 function sticky_header(){ 109 if($(window).width()>765){ 110 if($main_slider.length && !$main_header.hasClass("top_header")){ 111 $header_spacer.hide(); 112 if($(document).scrollTop() < $main_slider.height() - $main_header.outerHeight() ){ 113 $main_header.removeClass('sticky_header'); 114 } else{ 115 $main_header.addClass('sticky_header'); 116 } 117 $(document).scroll(function(){ 118 if($(document).scrollTop() < $main_slider.height() - $main_header.outerHeight() ){ 119 $main_header.removeClass('sticky_header'); 120 } else{ 121 $main_header.addClass('sticky_header'); 122 } 123 }); 124 } else{ 125 $main_header.addClass('sticky_header'); 126 $header_spacer.show(); 127 } 128 } else{ 129 $main_header.removeClass('sticky_header'); 130 } 131 } 132 133 sticky_header(); 134 135 //Transparent header 136 137 function transparent_header(){ 138 if( ($main_slider.length || $title_bar.length) && $main_header.hasClass("transparent_header")){ 139 $header_spacer.hide(); 140 if( ($(document).scrollTop() < $main_slider.height() - $main_header.outerHeight()) || ($(document).scrollTop() < $title_bar.outerHeight() - $main_header.outerHeight()) ){ 141 $main_header.addClass('transparent_header'); 142 } else{ 143 $main_header.removeClass('transparent_header'); 144 } 145 $(document).scroll(function(){ 146 if(($(document).scrollTop() < $main_slider.height() - $main_header.outerHeight()) || ($(document).scrollTop() < $title_bar.outerHeight() - $main_header.outerHeight()) ){ 147 $main_header.addClass('transparent_header'); 148 } else{ 149 $main_header.removeClass('transparent_header'); 150 } 151 }); 152 } 153 } 154 // Transparent Header 155 transparent_header(); 156 157 158 // Header Layout Left 159 var $left_header = $('#ABdev_main_header.header_layout_left'); 160 161 $left_header.find('nav > ul > li').each(function() { 162 if($(this).find('> ul').length) { 163 $(this).find('> a').append('<i class="ci_icon-arrow_carrot-up"></i>'); 164 } 165 }); 166 167 168 var $menu_with_children = $('#ABdev_main_header.header_layout_left nav > ul > li.menu-item-has-children > a'); 169 170 171 $menu_with_children.on('click', function(e){ 172 e.preventDefault(); 173 var $this = $(this); 174 if (!$this.parent().find('> ul').hasClass('visible')) { 175 $this.parent().find('> ul').addClass('visible').slideDown('slow'); 176 $this.find('i').css('transform', 'rotate(0)'); 177 } else{ 178 $this.parent().find('> ul').removeClass('visible').slideUp('fast'); 179 $this.find('i').css('transform', 'rotate(180deg)'); 180 } 181 }); 182 183 184 var $sf = $('#main_menu_left, #main_menu_right, #main_menu'); 185 if ($('#ABdev_menu_toggle').css('display') === 'none') { 186 // enable superfish when the page first loads if we're on desktop 187 $sf.superfish({ 188 delay: 300, 189 animation: {opacity:'show',height:'show'}, 190 animationOut: {height:'hide'}, 191 speed: 'fast', 192 speedOut: 'fast', 193 cssArrows: false, 194 disableHI: true /* load hoverIntent.js in header to use this option */, 195 onBeforeShow: function () { 196 var ww = $(window).width(); 197 if (this.parent().offset() !== undefined) { 198 var locUL = this.parent().offset().left + this.width(); 199 var locsubUL = this.parent().offset().left + this.parent().width() + this.width(); 200 var par = this.parent(); 201 if (par.parent().is('#main_menu, #main_menu_left, #main_menu_right') && (locUL > ww)) { 202 this.css('marginLeft', "-"+(locUL-ww+20)+"px"); 203 } 204 else if (!par.parent().is('#main_menu, #main_menu_left, #main_menu_right') && (locsubUL > ww)) { 205 this.css('left', "-"+(this.width())+"px"); 206 } 207 } 208 } 209 }); 210 } 211 212 // Insert<->Remove Right Menu 213 function header_right_menu(){ 214 var $left_menu_nav = $('#ABdev_main_header .first_menu nav'); 215 var $left_menu_ul = $('#ABdev_main_header .first_menu #main_menu_left'); 216 var $right_menu_ul = $('#ABdev_main_header .second_menu #main_menu_right'); 217 var $left_menu_on_right = $('#ABdev_main_header .second_menu #main_menu_left'); 218 219 if($(window).width()<769){ 220 $right_menu_ul.before($left_menu_ul); 221 } 222 else{ 223 $left_menu_on_right.appendTo($left_menu_nav); 224 } 225 } 226 227 header_right_menu(); 228 229 var $menu_responsive = $('#ABdev_latest_portfolio nav, #ABdev_main_header nav'); 230 $('#ABdev_menu_toggle').on('click', function () { 231 $menu_responsive.animate({width:'toggle'},350); 232 }); 233 234 $(".submit").on('click', function () { 235 $(this).closest("form").submit(); 236 }); 237 238 $('input, textarea').placeholder(); 239 240 //Isotope portfolio 241 242 var sortBy = 'original-order'; 243 var columnWidth = '.portfolio_item'; 244 245 $('.ABdev_latest_portfolio').each(function () { 246 var $current_portfolio = $(this); 247 if ($current_portfolio.find('.portfolio_item').hasClass('portfolio_masonry_fullwidth')) { 248 sortBy = 'random'; 249 columnWidth = '.portfolio_item.small'; 250 } 251 $current_portfolio.imagesLoaded(function () { 252 $current_portfolio.isotope({ 253 layoutMode: 'masonry', 254 masonry: { 255 columnWidth: columnWidth 256 }, 257 itemSelector : '.portfolio_item', 258 sortBy: sortBy 259 }); 260 }); 261 }); 262 263 $('.portfolio_filter_button').on('click', function () { 264 var $portfolio_filter_clicked_button = $(this); 265 266 if ($portfolio_filter_clicked_button.hasClass('selected')) { 267 return false;
268 } 269 270 var $portfolio_filter = $portfolio_filter_clicked_button.parents('.portfolio_filter'); 271 $portfolio_filter.find('.selected').removeClass('selected'); 272 $portfolio_filter_clicked_button.addClass('selected'); 273 var options = {}, 274 key = $portfolio_filter.attr('data-option-key'), 275 value = $portfolio_filter_clicked_button.attr('data-option-value'); 276 value = value === 'false' ? false : value; 277 options[key] = value; 278 279 if (key === 'layoutMode' && typeof changeLayoutMode === 'function') { 280 changeLayoutMode($portfolio_filter_clicked_button, options); 281 } else { 282 $portfolio_filter.next('.ABdev_latest_portfolio').isotope(options); 283 } 284 285 return false; 286 }); 287 288 $(window).load(function() { 289 290 $('#portfolio_gallery_slider').imagesLoaded(function () { 291 $('#portfolio_gallery_slider').nivoSlider({ 292 effect:'fade', // Specify sets like: 'fold,fade,sliceDown' 293 pauseTime:3000, // How long each slide will show 294 directionNav:true, // Next & Prev navigation 295 controlNavThumbs:false, 296 controlNav: true, 297 controlNavThumbsFromRel:false, 298 prevText: '<span class="previous_slide"></span>', 299 nextText: '<span class="next_slide"></span>', 300 manualAdvance: false, 301 }); 302 }); 303 304 $('#post_gallery_slider').imagesLoaded(function () { 305 $('#post_gallery_slider').nivoSlider({ 306 effect:'fade', // Specify sets like: 'fold,fade,sliceDown' 307 pauseTime:3000, // How long each slide will show 308 directionNav:true, // Next & Prev navigation 309 controlNavThumbs:false, 310 controlNav: true, 311 controlNavThumbsFromRel:false, 312 prevText: '<span class="previous_slide"></span>', 313 nextText: '<span class="next_slide"></span>', 314 manualAdvance: false, 315 }); 316 }); 317 318 }); 319 320 321 $(window).resize(function () { 322 323 sticky_header(); 324 transparent_header(); 325 header_right_menu(); 326 327 $('#ABdev_latest_portfolio').isotope('reLayout'); 328 329 if ($('#ABdev_menu_toggle').css('display') === 'none' && !$sf.hasClass('sf-js-enabled')) { 330 // you only want SuperFish to be re-enabled once ($sf.hasClass) 331 $menu_responsive.show(); 332 $sf.superfish({ 333 delay: 300, 334 animation: {opacity:'show',height:'show'}, 335 animationOut: {height:'hide'}, 336 speed: 'fast', 337 speedOut: 'fast', 338 cssArrows: false, 339 disableHI: true /* load hoverIntent.js in header to use this option */, 340 onBeforeShow: function () { 341 this.css('marginLeft', "0px"); 342 var ww = $(window).width(); 343 var locUL = this.parent().offset().left + this.width(); 344 var locsubUL = this.parent().offset().left + this.parent().width() + this.width(); 345 var par = this.parent(); 346 if (par.parent().is('#main_menu, #main_menu_left, #main_menu_right') && (locUL > ww)) { 347 this.css('marginLeft', "-"+(locUL-ww+20)+"px"); 348 } 349 else if (!par.parent().is('#main_menu, #main_menu_left, #main_menu_right') && (locsubUL > ww)) { 350 this.css('left', "-"+(this.width())+"px"); 351 } 352 } 353 }); 354 } else if ($('#ABdev_menu_toggle').css('display') != 'none' && $sf.hasClass('sf-js-enabled')) { 355 // smaller screen, disable SuperFish 356 $sf.superfish('destroy'); 357 $menu_responsive.hide(); 358 } 359 360 }); 361 362 363});
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.