1/* jshint ignore:start */ 2//GLOBAL VARIABLES DECLARATION 3var scrollVal; 4var buttons; 5var first_load=true; 6var is_animating=loading_page=true; 7var sidebar_is_open=loaded_google_maps=false; 8var current_URL=jQuery(location).attr('href'); 9//OLDER BROWSERS CONSOLE SUPPORT 10if(!(window.console && console.log)) { 11 console = { 12 log: function(){}, 13 debug: function(){}, 14 info: function(){}, 15 warn: function(){}, 16 error: function(){} 17 }; 18} 19function seven_init() { 20 "use strict"; 21 var delayed_anim=""; 22 var stop_verification=false; 23 var ajax_calls = theme_options.ajax_calls==="1" ? true : false; 24 var logo_margin=Math.floor((parseInt(jQuery('#prk_responsive_menu').attr('data-height'),10)-parseInt(jQuery('#seven_logo_holder img').attr('height'),10))/2); 25 jQuery('#seven_logo_holder').css({'margin-top':logo_margin+'px'}); 26 var ajax_in_pos=0; 27 var mirror_offset=0; 28 var height_fix=0; 29 var last_scroll_position=0; 30 var admin_bar_height=0; 31 var menu_bar_height=0; 32 var menu_mode="sidy"; 33 var delay_1=300; 34 var delay_2=651; 35 var delay_3=500; 36 if (jQuery('.seven_fully').length) { 37 menu_mode="fully"; 38 delay_1=0; 39 delay_2=0; 40 delay_3=200; 41 } 42 if (jQuery('.seven_fixed_menu').length) { 43 menu_mode="fixy"; 44 menu_bar_height=theme_options.menu_vertical; 45 //TOP BAR MENU STUFF 46 jQuery('#nav-main ul.sf-menu').supersubs({ 47 minWidth: 1, 48 maxWidth: 12, 49 extraWidth: 2 50 }).superfish({ 51 hoverClass:'seven_hover_sub', 52 delay:100, 53 animation: {color:'show'}, 54 cssArrows: false, 55 speed: 250, 56 speedOut: 250, 57 dropShadows: false, 58 onBeforeShow:function(){ 59 jQuery(this).css({'visibility':'visible'}); 60 }, 61 onHide:function(){ 62 jQuery(this).css({'visibility':'hidden'}); 63 } 64 }); 65 } 66 else { 67 jQuery('#prk_hidden_bar_inner .sf-menu .sub-menu').each(function() { 68 jQuery(this).parent().children('a').append('<div class="prk_plus_sign_wrapper"><div class="prk_plus_sign"></div></div>'); 69 jQuery(this).parent().children('a').addClass('with_plus_sign'); 70 }); 71 } 72 if (jQuery('.seven_theme.admin-bar').length) { 73 admin_bar_height=32; 74 } 75 var first_cross=true; 76 var seven_on_mobile = is_mobile()===true ? true : false; 77 if (seven_on_mobile) { 78 jQuery('body').addClass('seven_on_mobile'); 79 jQuery('.slider_scroll_button').remove(); 80 } 81 //MENU STUFF 82 jQuery('#prk_hidden_bar_inner .sf-menu>li>a').each(function() { 83 jQuery(this).addClass('regular_anchor_menu header_font'); 84 }); 85 jQuery('#prk_hidden_bar_inner .sf-menu .sub-menu a').each(function() { 86 jQuery(this).addClass('regular_anchor_menu regular_font'); 87 }); 88 var force_menu_hide=false; 89 var responsive_menu_is_open=false; 90 function is_on_viewport(elem) { 91 if (!jQuery(elem).length) { 92 return false; 93 } 94 else { 95 var docViewTop = jQuery(window).scrollTop(); 96 var docViewBottom = docViewTop + jQuery(window).height(); 97 var elemTop = jQuery(elem).offset().top; 98 var elemBottom = elemTop + jQuery(elem).height(); 99 return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)); 100 } 101 } 102 //SHARING FUNCTIONS 103 function prk_init_sharrre() { 104 jQuery('.prk_sharrre_twitter').sharrre({ 105 share: { 106 twitter: true 107 }, 108 template: '<a class="box social_tipped" href="#" data-color="#43b3e5"><div class="share">Tweet</div></a><div class="count prk_sharrre_count" href="#">{total}</div>', 109 enableHover: false, 110 enableTracking: false, 111 //buttons: { twitter: {via: 'username'}}, 112 click: function(api) { 113 api.simulateClick(); 114 api.openPopup('twitter'); 115 }, 116 render: function(api){ 117 } 118 }); 119 jQuery('.prk_sharrre_facebook').sharrre({ 120 share: { 121 facebook: true 122 }, 123 template: '<a class="box social_tipped" href="#" data-color="#1f69b3"><div class="share">Like</div></a><div class="count prk_sharrre_count" href="#">{total}</div>', 124 enableHover: false, 125 enableTracking: false, 126 click: function(api) { 127 api.simulateClick(); 128 api.openPopup('facebook'); 129 }, 130 render: function(api){ 131 } 132 }); 133 jQuery('.prk_sharrre_google').sharrre({ 134 share: { 135 googlePlus: true 136 }, 137 template: '<a class="box social_tipped" href="#" data-color="#222222"><div class="share">+1</div></a><div class="count prk_sharrre_count" href="#">{total}</div>', 138 enableHover: false, 139 enableTracking: false, 140 click: function(api) { 141 api.simulateClick(); 142 api.openPopup('googlePlus'); 143 }, 144 render: function(api){ 145 } 146 }); 147 var pinterestMedia=""; 148 jQuery('.prk_sharrre_pinterest').sharrre({ 149 share: { 150 pinterest: true 151 }, 152 buttons: { 153 pinterest: { 154 media: pinterestMedia, 155 description: '' 156 } 157 }, 158 template: '<a class="box social_tipped" href="#" data-color="#df2126"><div class="share">Pin It</div></a><div class="count prk_sharrre_count" href="#">{total}</div>', 159 enableHover: false, 160 enableTracking: false, 161 click: function(api) { 162 api.simulateClick(); 163 api.openPopup('pinterest'); 164 }, 165 render: function(api){ 166 } 167 }); 168 jQuery('.prk_sharrre_pinterest').on('mouseover', function() { 169 jQuery('#prk_pint').attr('data-media',jQuery(this).attr('data-media')); 170 }); 171 } 172 //TOP BAR SEARCH FORM 173 jQuery('#prk_menu_loupe').click(function() { 174 //jQuery('#searchform_menu').addClass('seven_focused'); 175 jQuery('#searchform_menu input').focus(); 176 });
177 jQuery('#searchform_menu input').focus(function (){ 178 jQuery('#searchform_menu').addClass('seven_focused'); 179 }); 180 jQuery('#searchform_menu input').blur(function() { 181 jQuery('#searchform_menu').removeClass('seven_focused'); 182 }); 183 function seven_close_search() { 184 if (jQuery('#top_form_hider').css('display')==='block') { 185 jQuery('#searchform_top,#top_form_hider').stop().animate({ 186 opacity:0 187 }, 188 { 189 easing:'linear', 190 duration:200, 191 complete:function() { 192 jQuery('#searchform_top,#top_form_hider').css({'display':'none'}); 193 } 194 }); 195 } 196 } 197 jQuery('#top_form_close').click(function() { 198 seven_close_search(); 199 }); 200 jQuery('.sform_wrapper .seven_fa-search').not(jQuery('#prk_menu_loupe')).click(function() { 201 jQuery(this).parent().parent().submit(); 202 }); 203 //SCROLLING FUNCTIONS 204 if (!seven_on_mobile) { 205 jQuery(window).scroll(function() { 206 var st = jQuery(this).scrollTop(); 207 last_scroll_position = st; 208 jQuery('#footer_revealer').css({'opacity':jQuery('#footer_mirror').css('opacity')}); 209 //SKROLLR FIX IF NEEDED 210 if (stop_verification===false) { 211 stop_verification=true; 212 if ((parseInt(jQuery('body')[0].style.height,10)-jQuery('#prk_mega_wrap').outerHeight())>100) { 213 jQuery(window).trigger("debouncedresize"); 214 } 215 } 216 }); 217 } 218 jQuery(window).scroll(function() { 219 scroll_listener(); 220 }); 221 //BACK TO TOP BUTTON 222 jQuery('#seven_to_top').click(function(e) { 223 e.preventDefault(); 224 jQuery('html,body').stop().animate({ 225 'scrollTop': 0 226 }, 1200, 'easeInOutExpo' 227 ); 228 }); 229 //CALL A SCROLL EVENT TO INITIALIZE CONTENT 230 jQuery(window).scroll(); 231 jQuery("a.regular_anchor_menu").on('click', function(event) { 232 if (jQuery(this).attr("target")==="_blank" || jQuery(this).parent().hasClass('regular_load') || jQuery('.seven_theme.admin-bar').length || ajax_calls===false) { 233 //OPEN LINK NORMALLY 234 if (jQuery(this).attr('href')==="#") { 235 jQuery(this).parent().removeClass('active_parent'); 236 if(jQuery(this).parent().children('.sub-menu').css('display')==="none") { 237 jQuery(this).parent().addClass('seven_showing_sub'); 238 } 239 else { 240 jQuery(this).parent().removeClass('seven_showing_sub'); 241 if (jQuery(this).parent().find('.sub-menu li.active').length) { 242 jQuery(this).parent().addClass('active_parent'); 243 } 244 } 245 jQuery(this).parent().children('.sub-menu').slideToggle({ 246 'duration':500, 247 easing:'easeOutExpo', 248 step: function(now, fx) {}, 249 complete:function() {} 250 }); 251 return; 252 } 253 } 254 else { 255 event.preventDefault(); 256 var offsetter=""; 257 var fragment=jQuery(this).attr('href').split('#'); 258 console.log(menu_mode); 259 if (menu_mode!=="fixy") { 260 if (jQuery(this).attr('href')==="#") { 261 jQuery(this).parent().removeClass('active_parent'); 262 if(jQuery(this).parent().children('.sub-menu').css('display')==="none") { 263 jQuery(this).parent().addClass('seven_showing_sub'); 264 } 265 else { 266 jQuery(this).parent().removeClass('seven_showing_sub'); 267 if (jQuery(this).parent().find('.sub-menu li.active').length) { 268 jQuery(this).parent().addClass('active_parent'); 269 } 270 } 271 jQuery(this).parent().children('.sub-menu').slideToggle({ 272 'duration':500, 273 easing:'easeOutExpo', 274 step: function(now, fx) {}, 275 complete:function() {} 276 }); 277 return; 278 } 279 else { 280 var target = this.hash; 281 var $target = jQuery(target); 282 //IS IT AN ANCHOR LINK 283 if (target!=="") { 284 //IS IT AN EXISITNG ID 285 if ($target.offset()!==undefined) { 286 offsetter=$target.offset().top; 287 } 288 else { 289 //event.preventDefault(); 290 } 291 } 292 } 293 if (offsetter!=="") { 294 event.preventDefault(); 295 jQuery('html,body').stop().animate({ 296 'scrollTop': offsetter-admin_bar_height-menu_bar_height 297 }, 1200, 'easeInOutExpo', function () { 298 299 }); 300 } 301 else { 302 var next_page=jQuery(this).attr("href"); 303 prk_toggle_sidebar(); 304 deactivate_menu_links(next_page); 305 jQuery(this).parent().addClass('active'); 306 close_submenus(); 307 load_ajax_page(next_page,true); 308 delayed_anim=setTimeout(function(){ 309 jQuery('#wrap,#prk_footer_wrapper').removeClass('prk_first_anim'); 310 jQuery('#main_block').addClass('prk_tweaked'); 311 jQuery('#main_loader').removeClass('prk_tweaked'); 312 },350); 313 } 314 } 315 else { 316 if (jQuery(this).attr('href')==="#") { 317 return; 318 } 319 else { 320 var target = this.hash; 321 var $target = jQuery(target); 322 //IS IT AN ANCHOR LINK 323 if (target!=="") { 324 //IS IT AN EXISITNG ID 325 if ($target.offset()!==undefined) { 326 offsetter=$target.offset().top; 327 } 328 else { 329 //event.preventDefault(); 330 } 331 } 332 } 333 if (offsetter!=="") { 334 event.preventDefault(); 335 jQuery('html,body').stop().animate({ 336 'scrollTop': offsetter-admin_bar_height-menu_bar_height 337 }, 1200, 'easeInOutExpo', function () { 338 339 }); 340 } 341 else { 342 var next_page=jQuery(this).attr("href"); 343 if (responsive_menu_is_open) { 344 prk_toggle_sidebar(); 345 } 346 deactivate_menu_links(next_page); 347 jQuery(this).parent().addClass('active'); 348 if (jQuery(this).parent().parent().hasClass('sub-menu')) { 349 jQuery(this).parent().parent().parent().addClass('active_parent'); 350 } 351 close_submenus(); 352 jQuery('#wrap,#prk_footer_wrapper').removeClass('prk_first_anim'); 353 jQuery('#main_block').addClass('prk_tweaked'); 354 jQuery('#main_loader').removeClass('prk_tweaked'); 355 delayed_anim=setTimeout(function() { 356 load_ajax_page(next_page,true); 357 358 },350); 359 if (seven_on_mobile) { 360 jQuery('#nav-main ul.sf-menu>li.seven_hover_sub').superfish('hide'); 361 } 362 } 363 } 364 } 365 });
366 //AJAX PAGE LOAD FUNCTIONS 367 function deactivate_menu_links(new_link) { 368 jQuery("#menu_section .sf-menu li").removeClass('active'); 369 jQuery("#menu_section .sf-menu li").removeClass('active_parent'); 370 } 371 function close_submenus() { 372 jQuery('#menu_section .sf-menu .sub-menu').each(function() { 373 if (!jQuery(this).find('li.active').length) { 374 jQuery(this).parent().removeClass('seven_showing_sub'); 375 jQuery(this).slideUp({ 376 'duration':500, 377 easing:'easeOutExpo', 378 step: function(now, fx) {}, 379 complete:function() {} 380 }); 381 } 382 }); 383 } 384 var seven_ajax_content=jQuery("#seven_ajax_holder"); 385 function show_new_link(ajax_page,text,regular_holder) { 386 force_menu_hide=false; 387 seven_ajax_content.html(''); 388 var loaded_html = jQuery(text); 389 var new_inner = loaded_html.find('#ajaxed_content'); 390 //IS THE OVERLAY OPEN? 391 if (regular_holder===true) { 392 seven_ajax_content.append(new_inner); 393 ended_loading(false); 394 } 395 else { 396 jQuery('.seven_ajax_portfolio').html(''); 397 jQuery('.seven_ajax_portfolio').append(new_inner); 398 jQuery('.seven_ajax_portfolio').removeClass('prk_tweaked'); 399 jQuery('.seven_ajax_portfolio').css({'visibility':'visible','display':'none'}); 400 ended_loading(true); 401 } 402 } 403 function load_ajax_link(ajax_page,change_history,regular_holder) { 404 jQuery('#multi_spinner').css({'opacity':'1'}); 405 jQuery('.seven_ajax_portfolio_wrapper').slideDown(250); 406 jQuery.ajax({ 407 url: ajax_page, 408 dataType: 'html', 409 async: true, 410 success: function (text) { 411 //CHANGE HISTORY IF NEEDED 412 if (change_history===true && window.history.pushState) { 413 var pageurl = ajax_page; 414 if (pageurl !== window.location) { 415 window.history.pushState({ 416 path: pageurl 417 }, '', pageurl); 418 } 419 } 420 show_new_link(ajax_page,text,regular_holder); 421 }, 422 error: function () { 423 //SHOW 404 ERROR PAGE IF NEEDED 424 window.location.replace(ajax_page); 425 } 426 }); 427 } 428 function init_member() { 429 if (jQuery('#member_full_row').length && jQuery('#member_full_row').attr('data-color')!=="default") { 430 jQuery('#member_full_row .prk_button_like,#member_full_row .prk_blockquote.colored_background').css({'background-color':jQuery('#member_full_row').attr('data-color')}); 431 jQuery('#member_full_row .seven_navigation_singles a').attr({'data-color':jQuery('#member_full_row').attr('data-color')}); 432 } 433 } 434 //BLOG ISOTOPE FUNCTIONS 435 function load_more_posts(parent_wrapper) { 436 var $newEls = []; 437 var $appender=jQuery(parent_wrapper).children('.blog_appender'); 438 if (jQuery(parent_wrapper).children('.masonry_blog').length) { 439 var $appended=jQuery(parent_wrapper).children('.masonry_blog'); 440 } 441 else { 442 var $appended=jQuery(parent_wrapper).children('.blog_entries'); 443 } 444 jQuery(parent_wrapper).append('<div id="dumper"></div>'); 445 var $dumper=jQuery('#dumper'); 446 var pos=1; 447 while (pos<=jQuery(parent_wrapper).attr('data-items')) { 448 $appender.children('.blog_entry_li:nth-child('+1+')').find('.grid_image').each(function() { 449 if (jQuery(this).attr('data-src')!==undefined) { 450 jQuery(this).attr('src',jQuery(this).attr('data-src')); 451 } 452 }); 453 $appender.children('.blog_entry_li:nth-child('+1+')').find('.blog_top_image').each(function() {
454 if (jQuery(this).attr('data-src')!==undefined) { 455 jQuery(this).css({'background':'url('+jQuery(this).attr('data-src')+')'}); 456 } 457 }); 458 $dumper.append($appender.children('.blog_entry_li:nth-child('+1+')')); 459 pos++; 460 } 461 $newEls=$dumper.children(); 462 setTimeout(function() { 463 var img_load=imagesLoaded($dumper); 464 img_load.on('always', function() { 465 $appended.append($newEls).isotope('appended',$newEls); 466 $appended.fitVids(); 467 setTimeout(function() { 468 jQuery('#ajax_spinner.spinner-icon').removeClass('prk_first_anim'); 469 $appended.isotope('layout'); 470 //MANAGE COLORS 471 jQuery('.blog_entries').each(function() { 472 var $inner_blog=jQuery(this); 473 $inner_blog.find('.featured_color').each(function() { 474 jQuery(this).find('.squared_date.colorized,.not_zero_color').css({'color':jQuery(this).attr('data-color')}); 475 jQuery(this).find('.theme_button_inverted a,.zero_color a,a.zero_color,.default_color a,.small_headings_color a').attr('data-color',jQuery(this).attr('data-color')); 476 jQuery(this).find('.blog_fader_grid').css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 477 }); 478 }); 479 jQuery('.masonry_blog').each(function() { 480 var $inner_blog=jQuery(this); 481 $inner_blog.find('.featured_color').each(function() { 482 jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color',jQuery(this).attr('data-color')); 483 jQuery(this).find('.blog_fader_grid').stop().css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 484 jQuery(this).find('.squared_date,.blog_categories a,.blog_lower').css({'color':jQuery(this).attr('data-color')}); 485 }); 486 }); 487 //UPDATE CONTENT 488 thumbs_roll(); 489 jQuery(parent_wrapper).find('.blog_load_more').removeClass('loading_posts'); 490 jQuery('#dumper').remove(); 491 if($appender.is(':empty')) { 492 setTimeout(function(){ 493 jQuery(parent_wrapper).find('.blog_load_more').addClass("seven_animated bounceOut"); 494 },1200); 495 setTimeout(function(){ 496 jQuery(parent_wrapper).find('.outer_load_more').slideUp(500); 497 },2600); 498 } 499 },50); 500 }); 501 },10); 502 } 503 function init_blog() { 504 jQuery('.page-prk-blog-stacked .blog_entry_li').click(function(e) { 505 if (jQuery(e.target).hasClass('clearfix')) { 506 e.preventDefault(); 507 var inner_link=jQuery(this).find('h2 a').attr('href'); 508 if (ajax_calls) { 509 if (loading_page===false && inner_link!=="#" && !event.metaKey) { 510 event.preventDefault(); 511 loading_page=true; 512 var next_page=inner_link;
513 //CHECK IF WE SHOULD SCROLL TO AN ANCHOR 514 if (inner_link.split('#')[1]!==undefined && (inner_link.split('#')[0]===window.location.href.split("#")[0])) { 515 } 516 else { 517 jQuery('#wrap,#prk_footer_wrapper').removeClass('prk_first_anim'); 518 jQuery('#main_block').addClass('prk_tweaked'); 519 jQuery('#main_loader').removeClass('prk_tweaked'); 520 setTimeout(function(){ 521 load_ajax_page(next_page,true) 522 },350); 523 } 524 } 525 } 526 } 527 }); 528 jQuery('.blog_entries').each(function() { 529 var $inner_blog=jQuery(this); 530 $inner_blog.find('.blog_top_image').each(function() { 531 if (jQuery(this).attr('data-src')!==undefined) { 532 jQuery(this).css({'background-image':'url('+jQuery(this).attr('data-src')+')'}); 533 } 534 }); 535 jQuery(this).parent().find('.filter_blog .b_filter>a').click(function(e) { 536 e.preventDefault(); 537 jQuery(this).parent().parent().children('.b_filter').removeClass('active'); 538 curr_filter_blog = jQuery(this).attr('data-filter').split(' '); 539 jQuery(this).parent().addClass('active'); 540 setTimeout(function(){ jQuery(window).trigger("smartresize");},5); 541 $inner_blog.isotope({ 542 filter: '.'+curr_filter_blog 543 }); 544 }); 545 $inner_blog.find('.featured_color').each(function() { 546 jQuery(this).find('.squared_date.colorized,.not_zero_color').css({'color':jQuery(this).attr('data-color')}); 547 jQuery(this).find('.theme_button_inverted a,.zero_color a,a.zero_color,.default_color a,.small_headings_color a').attr('data-color',jQuery(this).attr('data-color')); 548 jQuery(this).find('.blog_fader_grid').css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 549 }); 550 $inner_blog.fitVids(); 551 $inner_blog.addClass('prk_first_anim'); 552 var img_load=imagesLoaded($inner_blog); 553 img_load.on('always', function() { 554 var minus_sm=parseInt($inner_blog.attr('data-margin'),10)-10; 555 $inner_blog.isotope({ 556 itemSelector : '.blog_entry_li', 557 masonry:{columnWidth:'.grid-sizer'}, 558 transitionDuration:'0.6s' 559 }); 560 setTimeout(function() { 561 $inner_blog.isotope('layout'); 562 },30); 563 }); 564 }); 565 jQuery('.masonry_blog').each(function() { 566 var $inner_blog=jQuery(this); 567 jQuery(this).parent().find('.filter_blog .b_filter>a').click(function(e) { 568 e.preventDefault(); 569 jQuery(this).parent().parent().children('.b_filter').removeClass('active'); 570 curr_filter_blog = jQuery(this).attr('data-filter').split(' '); 571 jQuery(this).parent().addClass('active'); 572 setTimeout(function(){ jQuery(window).trigger("smartresize");},5); 573 $inner_blog.isotope({ 574 filter: '.'+curr_filter_blog 575 }); 576 }); 577 $inner_blog.find('.featured_color').each(function() { 578 jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color',jQuery(this).attr('data-color')); 579 jQuery(this).find('.blog_fader_grid').stop().css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 580 jQuery(this).find('.squared_date,.blog_categories a,.blog_lower').css({'color':jQuery(this).attr('data-color')}); 581 }); 582 $inner_blog.fitVids(); 583 var img_load=imagesLoaded($inner_blog); 584 img_load.on('always', function() { 585 jQuery("#wrap,#prk_footer_wrapper").addClass('prk_first_anim'); 586 jQuery('#main_loader').addClass('prk_tweaked'); 587 $inner_blog.removeClass('per_init'); 588 if ($inner_blog.hasClass('templated')) { 589 $inner_blog.addClass('trigger_anim'); 590 $inner_blog.removeClass('templated'); 591 scroll_listener(); 592 } 593 $inner_blog.isotope({ 594 itemSelector : '.blog_entry_li', 595 masonry:{columnWidth:'.grid-sizer'}, 596 transitionDuration:'0.6s' 597 }); 598 setTimeout(function() { 599 $inner_blog.isotope('layout'); 600 },30); 601 }); 602 }); 603 if (jQuery('#single_blog_content').length) { 604 jQuery('#single_blog_content').fitVids(); 605 jQuery('#single_blog_content.featured_color').each(function() { 606 jQuery('#main').find('.not_zero_color,.not_zero_color a').css({'color':jQuery(this).attr('data-color')}); 607 jQuery('#main').find('.comments_meta_wrapper .not_zero_color a,.pirenko_highlighted,.theme_button a,.theme_button_inverted a,.zero_color a,a.zero_color,.default_color a,.small_headings_color a').attr('data-color',jQuery(this).attr('data-color')); 608 jQuery('#main').find('.prk_blockquote.plain').css('border-color',jQuery(this).attr('data-color')); 609 }); 610 } 611 if (jQuery('#seven_related_projects').length) { 612 var $inner_blog=jQuery('#seven_related_projects'); 613 $inner_blog.find('.featured_color').each(function() { 614 jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color',jQuery(this).attr('data-color')); 615 jQuery(this).find('.blog_fader_grid').stop().css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 616 jQuery(this).find('.squared_date,.blog_categories a,.blog_lower').css({'color':jQuery(this).attr('data-color')}); 617 }); 618 }; 619 jQuery('.recentposts_ul_shortcode').each(function() { 620 var $inner_blog=jQuery(this); 621 $inner_blog.fitVids(); 622 $inner_blog.find('.featured_color').each(function() { 623 jQuery(this).find('a.zero_color,.zero_color a,.small_headings_color a,a.small_headings_color,.blog_categories a').attr('data-color',jQuery(this).attr('data-color')); 624 jQuery(this).find('.blog_fader_grid').stop().css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity)}); 625 jQuery(this).find('.squared_date,.blog_categories a,.blog_lower').css({'color':jQuery(this).attr('data-color')}); 626 }); 627 }); 628 } 629 630 //PORTFOLIO ISOTOPE FUNCTIONS 631 function load_more_portfolios(parent_wrapper) { 632 var $newEls = []; 633 var $appender=jQuery(parent_wrapper).children('.folio_appender'); 634 var $appended=jQuery(parent_wrapper).children('.folio_masonry'); 635 jQuery(parent_wrapper).append('<div id="dumper"></div>'); 636 var $dumper=jQuery('#dumper'); 637 var pos=1; 638 while (pos<=jQuery(parent_wrapper).attr('data-items')) { 639 $appender.children('.portfolio_entry_li:nth-child('+1+')').find('.grid_image').each(function(){ 640 jQuery(this).attr('src',jQuery(this).attr('data-src')); 641 }); 642 $dumper.append($appender.children('.portfolio_entry_li:nth-child('+1+')')); 643 pos++; 644 } 645 $newEls=$dumper.children();
646 setTimeout(function() { 647 var img_load=imagesLoaded($dumper); 648 img_load.on('always', function() { 649 $appended.append($newEls).isotope('appended',$newEls); 650 setTimeout(function() { 651 $appended.isotope('layout'); 652 var ctr=1; 653 var counter=100; 654 setTimeout(function() { 655 $appended.find('.hidden_by_css').each(function() { 656 var $current_child=jQuery(this); 657 $current_child.addClass('animate'); 658 setTimeout(function() { 659 $current_child.removeClass('hidden_by_css'); 660 $current_child.addClass('animate'); 661 },counter); 662 counter=counter+200; 663 }); 664 },10); 665 //UPDATE CONTENT 666 jQuery('#folio_father').addClass('dyn_loaded'); 667 thumbs_roll(); 668 jQuery(parent_wrapper).find('.pf_load_more').removeClass('loading_posts'); 669 jQuery('#dumper').remove(); 670 if($appender.is(':empty')) { 671 setTimeout(function(){ 672 jQuery(parent_wrapper).find('.pf_load_more').addClass("seven_animated bounceOut"); 673 },1200); 674 setTimeout(function(){ 675 jQuery(parent_wrapper).find('.pf_load_more_wrapper').slideUp(500); 676 },2600); 677 } 678 }); 679 }); 680 },10); 681 } 682 var $container=""; 683 var grid_helper=""; 684 var portfolio_gutter=0; 685 var curr_filter="p_all"; 686 var curr_filter_blog="b_all"; 687 function init_portfolio() { 688 if (jQuery('#seven_ajax_wrapper #prk_half_folio,#seven_ajax_wrapper #prk_full_folio').length) { 689 jQuery ('body').addClass('seven_showing_lightbox'); 690 jQuery('body,html').animate({scrollTop:0},0); 691 setTimeout(function(){ 692 jQuery('#seven_ajax_holder').addClass('prk_first_anim'); 693 jQuery('#top_bar_wrapper').addClass('prk_first_anim'); 694 },75); 695 } 696 if (jQuery('.navigation_previous_portfolio>a').length) { 697 jQuery('#seven_left').removeClass('prk_tweaked'); 698 } 699 else { 700 jQuery('#seven_left').addClass('prk_tweaked'); 701 } 702 if (jQuery('.navigation_next_portfolio>a').length) { 703 jQuery('#seven_right').removeClass('prk_tweaked'); 704 } 705 else { 706 jQuery('#seven_right').addClass('prk_tweaked'); 707 } 708 709 jQuery('.filter_shortcodes .p_filter>a').on('click', function(e) { 710 e.preventDefault(); 711 jQuery(this).parent().parent().children('.p_filter').removeClass('active'); 712 curr_filter = jQuery(this).attr('data-filter').split(' '); 713 jQuery(this).parent().addClass('active'); 714 setTimeout(function(){ jQuery(window).trigger("smartresize");},5); 715 var $thisa=jQuery(this).parent().parent().parent().parent().children('.folio_masonry'); 716 $container.isotope({ 717 filter: '.'+curr_filter 718 }); 719 }); 720 var img_load=imagesLoaded('#seven_related_grid'); 721 img_load.on('always', function() { 722 jQuery('#seven_related_grid').find('.centerized_father').each(function() { 723 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").innerHeight()); 724 }); 725 }); 726 jQuery('.folio_masonry.per_init').each(function() { 727 var $container = jQuery(this); 728 $container.parent().find('.filter_folio .p_filter>a').click(function(e) { 729 e.preventDefault(); 730 jQuery(this).parent().parent().children('.p_filter').removeClass('active'); 731 curr_filter = jQuery(this).attr('data-filter').split(' '); 732 jQuery(this).parent().addClass('active'); 733 setTimeout(function(){ jQuery(window).trigger("smartresize");},5); 734 $container.isotope({ 735 filter: '.'+curr_filter 736 }); 737 }); 738 $container.removeClass('per_init'); 739 if (!jQuery('#filter_top').length) { 740 $container.css({'margin-top':portfolio_gutter}); 741 } 742 $container.find('.centerized_father').each(function() { 743 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 744 }); 745 var img_load=imagesLoaded($container); 746 img_load.on('always', function() { 747 first_cross=true; 748 if (!$container.hasClass('default_colored_th')) { 749 jQuery('.portfolio_entry_li').each(function() { 750 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" ) { 751 jQuery(this).find('.grid_colored_block').css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity_folio)}); 752 jQuery(this).find('.lone_linker a').css({'color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity_folio)}); 753 jQuery(this).find('.lone_linker a').attr('data-color',jQuery(this).attr('data-color')); 754 } 755 }); 756 } 757 $container.css({'display':'block'});
758 $container.isotope({ 759 itemSelector : '.portfolio_entry_li', 760 masonry:{columnWidth:'.grid-sizer'}, 761 transitionDuration:'0.6s' 762 }); 763 $container.find('.centerized_father').each(function() { 764 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 765 }); 766 $container.isotope('on', 'layoutComplete',function() { 767 $container.find('.centerized_father').each(function() { 768 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 769 }); 770 }); 771 setTimeout(function() { 772 $container.isotope('layout'); 773 scroll_listener(); 774 },30); 775 }); 776 }); 777 jQuery('.seven_iso_gallery.per_init').each(function() { 778 var $container_gals = jQuery(this); 779 var iso_gallery_gutter=parseInt(jQuery(this).attr('data-margin'),10); 780 $container_gals.removeClass('per_init'); 781 if (iso_gallery_gutter!==0) { 782 $container_gals.css({'margin-right':-iso_gallery_gutter}); 783 } 784 else { 785 $container_gals.css({'margin-right':''}); 786 } 787 if (!jQuery('#filter_top').length) { 788 $container_gals.css({'margin-top':iso_gallery_gutter}); 789 } 790 //$container_gals.find('.portfolio_entry_li').css({'margin-bottom':iso_gallery_gutter}); 791 $container_gals.find('.centerized_father').each(function() { 792 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 793 }); 794 var img_load=imagesLoaded($container_gals); 795 img_load.on('always', function() { 796 $container_gals.isotope({ 797 itemSelector : '.portfolio_entry_li', 798 masonry:{columnWidth:'.grid-sizer'}, 799 transitionDuration:'0.6s' 800 }); 801 $container_gals.find('.centerized_father').each(function() { 802 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 803 }); 804 $container_gals.isotope('on', 'layoutComplete',function() { 805 $container_gals.find('.centerized_father').each(function() { 806 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").height()); 807 }); 808 }); 809 setTimeout(function() { 810 $container_gals.isotope('layout'); 811 scroll_listener(); 812 },30); 813 }); 814 }); 815 jQuery('#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio').attr('data-color','default'); 816 817 jQuery('#prk_half_folio.featured_color').each(function() { 818 jQuery(this).find('#half-entry-right a').not(jQuery(this).find('#half-entry-right #single_folio_sharer a')).css({'color':jQuery('#prk_half_folio.featured_color').attr('data-color')}); 819 jQuery('#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio').attr('data-color',jQuery('#prk_half_folio.featured_color').attr('data-color')); 820 jQuery(this).find('#single_meta_header a,.pirenko_highlighted,.theme_button a,.theme_button_inverted a').attr('data-color',jQuery(this).attr('data-color')); 821 if (jQuery('#seven_wrapper').hasClass('solid_buttons')) { 822 jQuery('#after_single_folio').find('.theme_button a').css({'background-color':jQuery(this).attr('data-color')}); 823 } 824 else { 825 jQuery('#after_single_folio').find('.theme_button a').css({'border-color':jQuery(this).attr('data-color'),'color':jQuery(this).attr('data-color')}); 826 } 827 }); 828 jQuery('#prk_full_folio.featured_color').each(function() { 829 jQuery('#prk_full_folio.featured_color #single_entry_content a,#single_blog_meta a,.seven_info_block a').css({'color':jQuery('#prk_full_folio.featured_color').attr('data-color')}); 830 jQuery('#single_meta_header a,#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio').attr('data-color',jQuery('#prk_full_folio.featured_color').attr('data-color')); 831 jQuery('#after_single_folio').find('.pirenko_highlighted,.theme_button a,.theme_button_inverted a').attr('data-color',jQuery(this).attr('data-color')); 832 if (jQuery('#seven_wrapper').hasClass('solid_buttons')) { 833 jQuery('#after_single_folio').find('.theme_button a').css({'background-color':jQuery(this).attr('data-color')}); 834 } 835 else { 836 jQuery('#after_single_folio').find('.theme_button a').css({'border-color':jQuery(this).attr('data-color'),'color':jQuery(this).attr('data-color')}); 837 } 838 }); 839 840 jQuery('#seven_related_grid .featured_color').each(function() { 841 jQuery(this).find('.grid_colored_block').css({'background-color':hex2rgb(jQuery(this).attr('data-color'),theme_options.custom_opacity_folio)}); 842 }); 843 jQuery('#seven_close_folio').click(function(e) { 844 if (loading_page===false) { 845 jQuery('#folio_nav_wrapper').slideUp(250); 846 jQuery('.seven_ajax_portfolio_wrapper').slideUp(250);
847 jQuery('.seven_ajax_portfolio').slideUp(250, function() { 848 jQuery('.seven_ajax_portfolio').html(''); 849 jQuery('#folio_nav_wrapper').removeClass('prk_first_anim'); 850 jQuery('#folio_nav_wrapper').css({'display':'block'}); 851 }); 852 } 853 }); 854 jQuery('#seven_left_folio').click(function(e) { 855 if (loading_page===false) { 856 loading_page=true; 857 if (ajax_in_pos>0) { 858 ajax_in_pos=parseInt(ajax_in_pos,10)-1; 859 } 860 else { 861 ajax_in_pos=parseInt(jQuery(this).parent().parent().parent().parent().find('.folio_masonry>div').length-1); 862 } 863 jQuery('.seven_ajax_portfolio').slideUp(350, function() { 864 load_ajax_link(jQuery(this).parent().parent().parent().parent().find('.folio_masonry>div:nth-child('+parseInt((ajax_in_pos+1),10)+') a.seven_ajax_above').attr('href'),false,false); 865 }); 866 } 867 }); 868 jQuery('#seven_right_folio').click(function(e) { 869 if (loading_page===false) { 870 loading_page=true; 871 if (ajax_in_pos<(jQuery(this).parent().parent().parent().parent().find('.folio_masonry>div').length-1)) { 872 ajax_in_pos=parseInt(ajax_in_pos,10)+1; 873 } 874 else { 875 ajax_in_pos=0; 876 } 877 jQuery('.seven_ajax_portfolio').slideUp(350, function() { 878 load_ajax_link(jQuery(this).parent().parent().parent().parent().find('.folio_masonry>div:nth-child('+parseInt((ajax_in_pos+1),10)+') a.seven_ajax_above').attr('href'),false,false); 879 }); 880 } 881 }); 882 } 883 function scroll_listener() { 884 //LOAD MORE CONTENT 885 if (jQuery('.folio_masonry.shortcoded').length && (is_on_viewport(jQuery('.folio_masonry.shortcoded')) || seven_on_mobile)) { 886 var $elemeter=jQuery('.folio_masonry.shortcoded'); 887 if (!$elemeter.hasClass('seven_effect')) { 888 $elemeter.addClass('seven_effect') 889 var counter=100; 890 $elemeter.find('.portfolio_entry_li').each(function() { 891 var $new_item=jQuery(this); 892 setTimeout(function() { 893 $new_item.removeClass('hidden_by_css'); 894 $new_item.addClass('animate'); 895 },counter); 896 counter=counter+150; 897 }); 898 } 899 } 900 if (jQuery('.masonry_blog.trigger_anim').length && (is_on_viewport(jQuery('.masonry_blog.trigger_anim')) || seven_on_mobile)) { 901 var $elemeter=jQuery('.masonry_blog.trigger_anim'); 902 if (!$elemeter.hasClass('seven_effect')) { 903 $elemeter.addClass('seven_effect') 904 var counter=100; 905 $elemeter.find('.blog_entry_li').each(function() { 906 var $new_item=jQuery(this); 907 setTimeout(function() { 908 $new_item.removeClass('hidden_by_css'); 909 $new_item.addClass('animate'); 910 },counter); 911 counter=counter+150; 912 }); 913 } 914 } 915 //END - LOAD MORE CONTENT 916 } 917 function thumbs_roll() { 918 //NEXT ARROW CLICK 919 jQuery('.seven_next_arrow').each(function() { 920 if (!jQuery(this).hasClass('seven_at_slider')) { 921 jQuery(this).parent().attr('href','#'+jQuery(this).closest(".seven_row").next().next().attr('id')); 922 jQuery(this).parent().css({'color':jQuery(this).parent().parent().css('color')}); 923 } 924 }); 925 //SOLID OVER 926 jQuery('.solid_buttons .theme_button a,.solid_buttons .theme_button input').on('mouseover', function() { 927 jQuery(this).stop().css({'background-color':theme_options.theme_buttons_color}); 928 }); 929 //BORDERED OVER 930 jQuery('.bordered_buttons .theme_button a,.bordered_buttons .theme_button input').on('mouseover', function() { 931 if (jQuery(this).attr('data-forced-color')===undefined && jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 932 jQuery(this).css({'background-color':jQuery(this).attr('data-color'),'border-color':jQuery(this).attr('data-color'),'color':theme_options.site_background_color}); 933 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':jQuery(this).attr('data-color')}); 934 } 935 else { 936 if (jQuery(this).parent().attr('data-text-color')===undefined) { 937 jQuery(this).css({'background-color':theme_options.active_color,'border-color':theme_options.active_color,'color':theme_options.site_background_color}); 938 } 939 else { 940 jQuery(this).css({'background-color':theme_options.active_color,'border-color':theme_options.active_color,'color':jQuery(this).attr('data-text-color')}); 941 } 942 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':theme_options.active_color}); 943 } 944 }); 945 //SOLID OUT 946 jQuery('.solid_buttons .theme_button a,.solid_buttons .theme_button input').on('mouseout', function() { 947 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 948 jQuery(this).css({'background-color':jQuery(this).attr('data-color')}); 949 } 950 else 951 { 952 jQuery(this).css({'background-color':theme_options.active_color}); 953 } 954 }); 955 //BORDERED OUT 956 jQuery('.bordered_buttons .theme_button a,.bordered_buttons .theme_button input').on('mouseout', function() { 957 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 958 jQuery(this).css({'background-color':'transparent','color':jQuery(this).attr('data-color'),'border-color':jQuery(this).attr('data-color')}); 959 } 960 else { 961 jQuery(this).css({'background-color':'transparent','color':'','border-color':''}); 962 if (jQuery(this).parent().attr('data-text-color')!==undefined) { 963 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':jQuery(this).parent().attr('data-text-color')}); 964 } 965 } 966 }); 967 //INVERTED 968 jQuery('.bordered_buttons .theme_button_inverted a,.bordered_buttons .theme_button_inverted input').on('mouseover', function() { 969 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 970 jQuery(this).css({'background-color':jQuery(this).attr('data-color'),'color':theme_options.site_background_color,'border-color':jQuery(this).attr('data-color')}); 971 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':jQuery(this).attr('data-color')}); 972 } 973 else { 974 jQuery(this).css({'background-color':theme_options.active_color,'border-color':theme_options.active_color,'color':theme_options.site_background_color}); 975 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':theme_options.active_color}); 976 } 977 }); 978 jQuery('.solid_buttons .theme_button_inverted a,.solid_buttons .theme_button_inverted input').on( 'mouseout', function() { 979 jQuery(this).css({'background-color':theme_options.theme_buttons_color}); 980 }); 981 jQuery('.bordered_buttons .theme_button_inverted a,.bordered_buttons .theme_button_inverted input').on( 'mouseout', function() { 982 if (jQuery(this).parent().attr('data-text-color')===undefined) { 983 jQuery(this).css({'background-color':'transparent','color':theme_options.theme_buttons_color,'border-color':theme_options.theme_buttons_color}); 984 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':theme_options.active_color}); 985 } 986 else { 987 jQuery(this).css({'background-color':'transparent','border-color':jQuery(this).parent().attr('data-text-color'),'color':jQuery(this).parent().attr('data-text-color')}); 988 jQuery(this).parent().parent().find('.seven_fa-chevron-down').css({'color':jQuery(this).parent().attr('data-text-color')}); 989 } 990 991 }); 992 jQuery('#prk_full_folio.featured_color a, #prk_half_folio.featured_color #half-entry-right a').not('#single_folio_sharer a').on('mouseover', function() { 993 if (seven_on_mobile===false) { 994 jQuery(this).css({'color':theme_options.bd_headings_color}); 995 } 996 }); 997 jQuery('#prk_half_folio.featured_color #half-entry-right a').not('#single_folio_sharer a').on('mouseout', function() { 998 if (seven_on_mobile===false) { 999 jQuery(this).css({'color':jQuery('#prk_half_folio.featured_color').attr('data-color')}); 1000 } 1001 }); 1002 jQuery('#prk_full_folio.featured_color a').not('#single_folio_sharer a').on('mouseout', function() { 1003 if (seven_on_mobile===false) { 1004 jQuery(this).css({'color':jQuery('#prk_full_folio.featured_color').attr('data-color')}); 1005 } 1006 }); 1007 jQuery('.owl-next,.owl-prev').on('mouseover', function() { 1008 if (seven_on_mobile===false) { 1009 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1010 jQuery(this).css({'background-color': jQuery(this).attr('data-color')}); 1011 } 1012 else { 1013 jQuery(this).css({'background-color': theme_options.active_color}); 1014 } 1015 } 1016 }); 1017 jQuery('.owl-next,.owl-prev').on('mouseout', function() { 1018 if (seven_on_mobile===false) { 1019 jQuery(this).css({'background-color': theme_options.buttons_color}); 1020 } 1021 }); 1022 jQuery('.lone_linker a').on('mouseover', function() { 1023 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1024 jQuery(this).css({'background-color': jQuery(this).attr('data-color'),'color':theme_options.site_background_color}); 1025 1026 } 1027 }); 1028 jQuery('.lone_linker a').on('mouseout', function() { 1029 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1030 jQuery(this).css({'color': jQuery(this).attr('data-color'),'background-color':theme_options.site_background_color}); 1031 } 1032 }); 1033 jQuery('.small_headings_color a,a.small_headings_color,.zero_color a,a.zero_color,a.default_color,.sitemap_block.default_color a,.member_lnk>a,.smoothed_anchor a,a.smoothed_anchor').on('mouseover', function() { 1034 if (seven_on_mobile===false) { 1035 1036 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1037 jQuery(this).css({'color':jQuery(this).attr('data-color')}); 1038 } 1039 else { 1040 jQuery(this).css({'color':theme_options.active_color}); 1041 } 1042 jQuery(this).children('.prk_theme_arrows').addClass('seven_hover_arrow'); 1043 } 1044 }); 1045 jQuery('.not_zero_color>a,a.not_zero_color').on('mouseover', function() { 1046 if (seven_on_mobile===false) { 1047 jQuery(this).css({'color':theme_options.bd_headings_color}); 1048 } 1049 }); 1050 jQuery('.not_zero_color>a,a.not_zero_color').on('mouseout', function() { 1051 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1052 jQuery(this).css({'color':jQuery(this).attr('data-color')}); 1053 } 1054 else { 1055 jQuery(this).css({'color':theme_options.active_color}); 1056 } 1057 }); 1058 jQuery('.small_headings_color a,a.small_headings_color,.zero_color a,a.zero_color,a.default_color,.sitemap_block.default_color a,.member_lnk>a,.smoothed_anchor a,a.smoothed_anchor').on( 'mouseout', function() { 1059 jQuery(this).css({'color':''}); 1060 jQuery(this).children('.prk_theme_arrows').removeClass('seven_hover_arrow'); 1061 }); 1062 jQuery('#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio').on('mouseover', function() { 1063 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default") { 1064 jQuery(this).css({'color':jQuery(this).attr('data-color')}); 1065 jQuery(this).find('.inner_mover').css({'color':jQuery(this).attr('data-color')}); 1066 } 1067 }); 1068 jQuery('#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio').on('mouseout', function() { 1069 jQuery(this).css({'color':''}); 1070 jQuery(this).find('.inner_mover').css({'color':''}); 1071 }); 1072 jQuery('#seven_left,#seven_right,#seven_close,#seven_left_folio,#seven_right_folio,#seven_close_folio') 1073 jQuery('.prk_service').on('mouseover', function() { 1074 if (jQuery(this).attr('data-color')!=="default") { 1075 jQuery(this).find('.colored_link_icon').css({'color':jQuery(this).attr('data-color')}); 1076 } 1077 }); 1078 jQuery('.prk_service').on( 'mouseout', function() { 1079 if (jQuery(this).attr('data-default')!=="default") { 1080 jQuery(this).find('.colored_link_icon').css({'color':jQuery(this).attr('data-default')}); 1081 } 1082 else { 1083 jQuery(this).find('.colored_link_icon').css({'color':''}); 1084 } 1085 }); 1086 jQuery('.blog_load_more,.pf_load_more,.portfolio_entry_li,.blog_hover,.simple_scale,.simple_fade').hover(function() { 1087 if (seven_on_mobile===false) { 1088 jQuery(this).addClass('hover_trigger'); 1089 } 1090 }, 1091 function() { 1092 if (seven_on_mobile===false) { 1093 jQuery(this).removeClass('hover_trigger'); 1094 } 1095 }); 1096 jQuery('.seven_recent_ul.thumbnail_lay .img_blogger').hover(function() { 1097 if (seven_on_mobile===false) { 1098 jQuery(this).stop().animate({ 1099 opacity:0.55 1100 },250); 1101 } 1102 }, 1103 function() { 1104 if (seven_on_mobile===false) { 1105 jQuery(this).stop().animate({ 1106 opacity:1 1107 },250); 1108 } 1109 }); 1110 } 1111 function go_hash(timing,closed_folio) { 1112 var offsetter=""; 1113 //TRY TO MOVE TO PORTFOLIO IF NEEDED AND POSSIBLE 1114 if (closed_folio) { 1115 var $target = jQuery('.seven_row:has(#folio_father)'); 1116 if (target!=="") { 1117 //IS IT AN EXISITNG ID 1118 if ($target.offset()!==undefined) { 1119 offsetter=$target.offset().top; 1120 } 1121 } 1122 } 1123 else { 1124 if (window.location.hash==="#" || window.location.hash==="") { 1125 offsetter=0; 1126 target=""; 1127 } 1128 else { 1129 var target = window.location.hash; 1130 var $target = jQuery(target); 1131 //IS IT AN ANCHOR LINK 1132
1132 if (target!=="") { 1133 //IS IT AN EXISITNG ID 1134 if ($target.offset()!==undefined) { 1135 offsetter=$target.offset().top; 1136 } 1137 } 1138 } 1139 } 1140 if (offsetter!=="") { 1141 jQuery('#prk_responsive_menu').addClass('seven_shown_menu'); 1142 jQuery('html').stop().animate({ 1143 'scrollTop': offsetter-admin_bar_height-menu_bar_height 1144 }, timing); 1145 jQuery('body').stop().animate({ 1146 'scrollTop': offsetter-admin_bar_height-menu_bar_height 1147 }, timing, 'swing', function () { 1148 jQuery('#prk_responsive_menu').removeClass('seven_shown_menu'); 1149 setTimeout(function() { 1150 jQuery('#prk_responsive_menu').removeClass('seven_hidden_menu'); 1151 },15); 1152 //CLEAR HASHTAGS FROM URL IF NEEDED 1153 var fragment=window.location.href.split('#'); 1154 if(fragment[1]!==undefined) { 1155 if (history.pushState) { 1156 history.pushState(null, null, fragment[0]); 1157 } 1158 else { 1159 location.hash = fragment[0]; 1160 } 1161 } 1162 }); 1163 } 1164 } 1165 //WINDOW HISTORY MANAGEMENT 1166 if (ajax_calls && window.history.pushState) { 1167 jQuery(window).bind('popstate', function () { 1168 if (current_URL!==jQuery(location).attr('href') && first_load===false && location.href.indexOf("#")===-1) { 1169 var next_page=jQuery(location).attr('href'); 1170 window.location=next_page; 1171 } 1172 }); 1173 } 1174 function update_page_meta(text) { 1175 var new_title = text.find('.prk_page_ttl').text(); 1176 document.title = new_title; 1177 jQuery('body').removeClass(); 1178 jQuery('body').addClass(text.find('#prk_body_classes').attr('class')); 1179 } 1180 function show_new_page(ajax_page,text) { 1181 prk_content.html(''); 1182 var loaded_html = jQuery(text); 1183 var new_inner = loaded_html.find('#centered_block'); 1184 current_URL=jQuery(location).attr('href'); 1185 clearTimeout(delayed_anim); 1186 prk_content.append(new_inner); 1187 update_page_meta(loaded_html); 1188 ended_loading(false); 1189 jQuery('body,html').animate({scrollTop:0},0); 1190 } 1191 function load_ajax_page(ajax_page,change_history) { 1192 console.log("STARTED LOADING"); 1193 jQuery.ajax({ 1194 url: ajax_page, 1195 dataType: 'html', 1196 async: true, 1197 success: function (text) { 1198 //CHANGE HISTORY IF NEEDED 1199 if (change_history===true && window.history.pushState) { 1200 var pageurl = ajax_page; 1201 if (pageurl !== window.location) { 1202 window.history.pushState({ 1203 path: pageurl 1204 }, '', pageurl); 1205 } 1206 } 1207 show_new_page(ajax_page,text); 1208 }, 1209 error: function () { 1210 //SHOW 404 ERROR PAGE IF NEEDED 1211 window.location.replace(ajax_page); 1212 } 1213 }); 1214 } 1215 //REGULAR SITE LINKS 1216 jQuery("a.fade_anchor,.fade_anchor a,.seven_menu a").on('click', function(event) { 1217 var fragment=jQuery(this).attr('href').split('#'); 1218 if (jQuery(this).attr("target")==="_blank" || jQuery(this).parent().hasClass('regular_load') || jQuery('.seven_theme.admin-bar').length || ajax_calls===false) { 1219 //OPEN LINK NORMALLY 1220 } 1221 else { 1222 if (ajax_calls) { 1223 if (loading_page===false && jQuery(this).attr("href")!=="#" && !event.metaKey) { 1224 event.preventDefault(); 1225 loading_page=true; 1226 var next_page=jQuery(this).attr("href");
1227 //CHECK IF WE SHOULD SCROLL TO AN ANCHOR 1228 if (jQuery(this).attr("href").split('#')[1]!==undefined && (jQuery(this).attr("href").split('#')[0]===window.location.href.split("#")[0])) { 1229 } 1230 else { 1231 //UPDATE MAIN MENU IF POSSIBLE 1232 var found_link=false; 1233 jQuery('#menu_section .sf-menu li a').each(function() { 1234 if (next_page===jQuery(this).attr('href') && found_link===false) { 1235 deactivate_menu_links(next_page); 1236 jQuery(this).parent().addClass('active'); 1237 close_submenus(); 1238 found_link=true; 1239 } 1240 }); 1241 if (found_link===true) { 1242 jQuery('.sub-menu li.active').each(function() { 1243 jQuery(this).parent().parent().addClass('active_parent'); 1244 console.log("DR"); 1245 }); 1246 } 1247 jQuery('#wrap,#prk_footer_wrapper').removeClass('prk_first_anim'); 1248 jQuery('#main_block').addClass('prk_tweaked'); 1249 jQuery('#main_loader').removeClass('prk_tweaked'); 1250 setTimeout(function(){ 1251 load_ajax_page(next_page,true) 1252 },350); 1253 } 1254 } 1255 } 1256 } 1257 }); 1258 var prk_content; 1259 function ended_loading(folio_flag) { 1260 prk_content=jQuery("#prk_ajax_container"); 1261 is_animating=true; 1262 console.log("ENDED LOADING"); 1263 if (!jQuery('.page-prk-blog-masonry').length) { 1264 setTimeout(function(){ 1265 jQuery(window).trigger("debouncedresize") 1266 jQuery("#wrap,#prk_footer_wrapper").addClass('prk_first_anim'); 1267 jQuery('#main_loader').addClass('prk_tweaked'); 1268 },10); 1269 }; 1270 if (jQuery('#centered_block.featured_header').length) { 1271 jQuery('#seven_wrapper').addClass('seven_forced_header'); 1272 setTimeout(function(){ 1273 is_animating=false; 1274 },800); 1275 } 1276 else { 1277 jQuery('#seven_wrapper').removeClass('seven_forced_header'); 1278 } 1279 if (jQuery('#not_slider').length) { 1280 jQuery('#not_slider').fitVids(); 1281 } 1282 jQuery('.seven_shortcode_slider.super_height.per_init').each(function() { 1283 //console.log(jQuery(this).attr('id')); 1284 var $this_id=jQuery(this).attr('id'); 1285 var $this_slider=jQuery(this); 1286 $this_slider.removeClass('per_init'); 1287 $this_slider.addClass('just_init'); 1288 jQuery(window).on("debouncedresize", function( event ) { 1289 setTimeout(function(){ 1290 $this_slider.find('.owl-wrapper-outer,.owl-item').css({'height':height_fix-menu_bar_height}); 1291 var min_width=jQuery(window).width(); 1292 var min_height=height_fix-menu_bar_height; 1293 $this_slider.find('.owl-item img.seven_vsbl').each(function() { 1294 var $this_image=jQuery(this); 1295 var or_width=parseInt($this_image.attr('data-or_w'),10); 1296 var or_height=parseInt($this_image.attr('data-or_h'),10); 1297 var ratio=min_height / or_height; 1298 //FILL HEIGHT 1299 $this_image.css("height", min_height); 1300 $this_image.css("width", or_width * ratio); 1301 //UPDATE VARS 1302 or_width=$this_image.width(); 1303 or_height=$this_image.height(); 1304 //FILL WIDTH IF NEEDED 1305 if(or_width<min_width) { 1306 ratio=min_width/or_width; 1307 $this_image.css("width", min_width); 1308 $this_image.css("height", or_height * ratio); 1309 } 1310 //ADJUST MARGINS 1311 $this_image.css({"margin-left":-($this_image.width()-min_width)/2}); 1312 if (jQuery(window).width()<780) { 1313 $this_image.css("margin-top",0); 1314 } 1315 else { 1316 $this_image.css("margin-top",-($this_image.height()-$this_slider.find('.owl-wrapper-outer').height())/2); 1317 } 1318 }); 1319 $this_slider.find('.sld_v_center').each(function() { 1320 jQuery(this).css({'margin-top':-parseInt(j
1320Query(this).height()/2,10)}); 1321 }); 1322 },50); 1323 }); 1324 if ($this_slider.find('.item').length>1 && $this_slider.attr('data-autoplay') === "true") { 1325 var autoplayer=$this_slider.attr('data-delay') 1326 } 1327 else { 1328 var autoplayer=false; 1329 } 1330 $this_slider.fitVids().owlCarousel({ 1331 autoPlay:autoplayer, 1332 navigation : $this_slider.attr('data-navigation') === "true" ? true : false, 1333 navigationText: ['<i class="icon-left-open-big"></i>','<i class="icon-right-open-big"></i>'], 1334 pagination:$this_slider.attr('data-pagination') === "true" ? true : false, 1335 slideSpeed : 300, 1336 paginationSpeed : 400, 1337 items : 1, 1338 itemsDesktop : false, 1339 itemsDesktopSmall : false, 1340 itemsTablet: false, 1341 itemsMobile : false, 1342 itemsScaleUp:true, 1343 transitionStyle : "fade", 1344 touchDrag:false, 1345 addClassActive:true, 1346 afterInit: function(){ 1347 setTimeout(function() { 1348 $this_slider.find(".js-rotating").Morphext({ 1349 animation: "fadeInRotator", 1350 separator: "+", 1351 speed: 2500 1352 }); 1353 setTimeout(function() { 1354 $this_slider.find('.sld_v_center').each(function() { 1355 jQuery(this).css({'margin-top':-parseInt(jQuery(this).height()/2,10)}); 1356 }); 1357 },10); 1358 },750); 1359 $this_slider.find('.owl-pagination').css({'margin-top':-$this_slider.find('.owl-pagination').height()/2}); 1360 /*$this_slider.addClass('big_loader'); 1361 $this_slider.find('#slide_1').imagesLoaded(function() { 1362 $this_slider.removeClass('big_loader'); 1363 });*/ 1364 jQuery(window).trigger("debouncedresize"); 1365 }, 1366 afterAction : function() { 1367 $this_slider.find('.headings_top,.headings_body,.slider_action_button,.seven_at_slider').removeClass('seven_animate_slide'); 1368 var slide_id='#seven_slide_'+this.owl.currentItem+''; 1369 if ($this_slider.hasClass('just_init')) { 1370 var in_count=750; 1371 $this_slider.removeClass('just_init'); 1372 } 1373 else { 1374 var in_count=0; 1375 } 1376 setTimeout(function() { 1377 if ($this_slider.find(slide_id).find('.slider_action_button a').attr('data-color')!=="default") { 1378 if (jQuery('#seven_wrapper').hasClass('solid_buttons')) { 1379 $this_slider.find(slide_id).find('.slider_action_button a').css({'background-color':$this_slider.find(slide_id).find('.slider_action_button a').attr('data-color')}); 1380 } 1381 else { 1382 $this_slider.find(slide_id).find('.slider_action_button a').css({'border-color':$this_slider.find(slide_id).find('.slider_action_button a').attr('data-color'),'color':$this_slider.find(slide_id).find('.slider_action_button a').attr('data-color')}); 1383 } 1384 } 1385 if ($this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color')!=="default") { 1386 if (jQuery('#seven_wrapper').hasClass('solid_buttons')) { 1387 $this_slider.find(slide_id).find('.slider_scroll_button a').css({'background-color':$this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color')}); 1388 } 1389 else { 1390 $this_slider.find(slide_id).find('.slider_scroll_button a').css({'border-color':$this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color'),'color':$this_slider.find(slide_id).find('.slider_scroll_button a').attr('data-color')}); 1391 } 1392 } 1393 $this_slider.find(slide_id).find('.headings_top').addClass('seven_animate_slide'); 1394 $this_slider.find(slide_id).find('.headings_body').addClass('seven_animate_slide'); 1395 $this_slider.find(slide_id).find('.slider_action_button').addClass('seven_animate_slide'); 1396 $this_slider.find(slide_id).find('.seven_at_slider').addClass('seven_animate_slide'); 1397 },in_count); 1398 } 1399 }); 1400 }); 1401 jQuery('.seven_shortcode_slider.per_init').not(jQuery('.seven_shortcode_slider.super_height')).each(function() { 1402 var $this_slider=jQuery(this); 1403 if ($this_slider.find('.item').length===0) { 1404 $this_slider.removeClass('per_init'); 1405 } 1406 else { 1407 if ($this_slider.find('.item').length>1 && $this_slider.attr('data-autoplay') === "true") { 1408 var autoplayer=$this_slider.attr('data-delay') 1409 } 1410 else { 1411 var autoplayer=false; 1412 } 1413 $this_slider.fitVids().owlCarousel({ 1414 autoPlay:autoplayer, 1415 navigation : $this_slider.attr('data-navigation') === "true" ? true : false, 1416 navigationText: ['<i class="icon-left-open-big"></i>','<i class="icon-right-open-big"></i>'], 1417 pagination:$this_slider.attr('data-pagination') === "true" ? true : false, 1418 slideSpeed : 300, 1419 paginationSpeed : 400, 1420 items : 1, 1421 itemsDesktop : false, 1422 itemsDesktopSmall : false, 1423 itemsTablet: false, 1424 itemsMobile : false, 1425 itemsScaleUp:true, 1426 transitionStyle : "fade", 1427 autoHeight : true, 1428 touchDrag:false, 1429 addClassActive:true, 1430 afterInit: function() { 1431 $this_slider.removeClass('per_init'); 1432 $this_slider.addClass('just_init'); 1433 setTimeout(function() { 1434 $this_slider.find(".js-rotating").Morphext({ 1435 animation: "fadeInRotator", 1436 separator: "+", 1437 speed: 2500 1438 }); 1439 setTimeout(function() { 1440 $this_slider.find('.sld_v_center').each(function() { 1441 jQuery(this).css({'margin-top':-parseInt(j
1441Query(this).height()/2,10)}); 1442 }); 1443 },10); 1444 },750); 1445 $this_slider.find('.owl-pagination').css({'margin-top':-$this_slider.find('.owl-pagination').height()/2}); 1446 if ($this_slider.attr('data-color')!=undefined && $this_slider.attr('data-color')!="") { 1447 $this_slider.find('.owl-next,.owl-prev').attr('data-color',$this_slider.attr('data-color')); 1448 } 1449 setTimeout(function() { 1450 $this_slider.parent().removeClass('prk_first_anim'); 1451 //jQuery('#single_spinner.spinner-icon').removeClass('prk_first_anim'); 1452 },1000); 1453 }, 1454 afterAction : function() { 1455 $this_slider.find('.headings_top,.headings_body,.slider_action_button,.seven_at_slider').removeClass('seven_animate_slide'); 1456 var slide_id='#seven_slide_'+this.owl.currentItem+''; 1457 if ($this_slider.hasClass('just_init')) { 1458 var in_count=750; 1459 $this_slider.removeClass('just_init'); 1460 } 1461 else { 1462 var in_count=0; 1463 } 1464 setTimeout(function() { 1465 $this_slider.find(slide_id).find('.headings_top').addClass('seven_animate_slide'); 1466 $this_slider.find(slide_id).find('.headings_body').addClass('seven_animate_slide'); 1467 $this_slider.find(slide_id).find('.slider_action_button').addClass('seven_animate_slide'); 1468 $this_slider.find(slide_id).find('.seven_at_slider').addClass('seven_animate_slide'); 1469 },in_count); 1470 } 1471 }); 1472 } 1473 1474 }); 1475 jQuery('.testimonials_slider.per_init,.comments_slider.per_init,.featured_posts_ul_slider.per_init').each(function() { 1476 var $this_slider=jQuery(this); 1477 $this_slider.removeClass('per_init'); 1478 if ($this_slider.find('.item').length>1 && $this_slider.attr('data-autoplay') === "true") { 1479 var autoplayer=$this_slider.attr('data-delay'); 1480 } 1481 else { 1482 var autoplayer=false; 1483 } 1484 $this_slider.owlCarousel({ 1485 autoPlay:autoplayer, 1486 navigation : $this_slider.attr('data-navigation') === "true" ? true : false, 1487 navigationText: ['<i class="icon-left-open-big"></i>','<i class="icon-right-open-big"></i>'], 1488 pagination:$this_slider.attr('data-pagination') === "true" ? true : false, 1489 slideSpeed : 300, 1490 paginationSpeed : 400, 1491 items : 1, 1492 itemsDesktop : false, 1493 itemsDesktopSmall : false, 1494 itemsTablet: false, 1495 itemsMobile : false, 1496 itemsScaleUp:true, 1497 transitionStyle : "fade", 1498 autoHeight : true, 1499 touchDrag:false, 1500 addClassActive:true, 1501 afterInit: function() { 1502 setTimeout(function() { 1503 $this_slider.parent().removeClass('prk_first_anim'); 1504 //jQuery('#single_spinner.spinner-icon').removeClass('prk_first_anim'); 1505 },1000); 1506 }, 1507 }); 1508 }); 1509 jQuery('.recentposts_ul_slider.per_init,.member_ul_slider.per_init').each(function() { 1510 var $this_slider=jQuery(this); 1511 $this_slider.removeClass('per_init'); 1512 $this_slider.owlCarousel({ 1513 navigation : $this_slider.attr('data-navigation') === "true" ? true : false, 1514 navigationText: ['<i class="seven_fa-chevron-left"></i>','<i class="seven_fa-chevron-right"></i>'], 1515 pagination:false, 1516 touchDrag:false, 1517 autoPlay:3500, 1518 autoplayHoverPause:true, 1519 itemsCustom : [ 1520 [0, 1], 1521 [450, 2], 1522 [920, 3], 1523 ], 1524 }); 1525 });
1526 jQuery('.twitter_slider.per_init').each(function() { 1527 var $this_slider=jQuery(this); 1528 $this_slider.removeClass('per_init'); 1529 $this_slider.flexslider({ 1530 animation: "fade", 1531 useCSS :false, 1532 slideshow: true, 1533 slideshowSpeed: 5000, 1534 animationDuration: 300, 1535 smoothHeight: true, 1536 directionNav: true, 1537 controlNav: false, 1538 keyboardNav: false, 1539 touchDrag:false, 1540 prevText: '<i class="seven_fa-chevron-left prk_less_opacity"></i>', 1541 nextText: '<i class="seven_fa-chevron-right prk_less_opacity"></i>', 1542 start:function (slider) { 1543 slider.css({'min-height':0}); 1544 jQuery(window).trigger("debouncedresize"); 1545 } 1546 }); 1547 }); 1548 jQuery('.wpb_single_image a.magnificent').addClass('image-popup-no-margins boxed_shadow'); 1549 jQuery('.image-popup-no-margins').magnificPopup({ 1550 type: 'image', 1551 fixedContentPos: false, 1552 fixedBgPos: true, 1553 closeOnContentClick: true, 1554 closeBtnInside: false, 1555 mainClass: 'mfp-no-margins my-mfp-zoom-in header_font', 1556 removalDelay: 300, 1557 closeMarkup:'<button title="%title%" class="mfp-close"><div class="mfp-close_inner"></div></button>', 1558 gallery: { 1559 enabled: true, 1560 navigateByImgClick: true, 1561 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir% seven_fa-angle-%dir%"></button>', 1562 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 1563 }, 1564 image: { 1565 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 1566 titleSrc: function(item) { 1567 return item.el.attr('title'); 1568 } 1569 }, 1570 iframe: { 1571 markup: '<div class="mfp-iframe-scaler">'+ 1572 '<div class="mfp-close"></div>'+ 1573 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 1574 '<div class="mfp-title">Some caption</div>'+ 1575 '</div>' 1576 }, 1577 callbacks: { 1578 open: function() { 1579 jQuery('html').css({'overflow':'hidden','height':'100%'}); 1580 }, 1581 close: function() { 1582 jQuery('html').css({'overflow-y':'','height':''}); 1583 }, 1584 markupParse: function(template, values, item) { 1585 values.title = item.el.attr('data-title'); 1586 } 1587 } 1588 }); 1589 jQuery('.folio_masonry.lightboxed,.seven_widget_gallery,.sev_magnificent').magnificPopup({ 1590 delegate: 'a.magnificent', 1591 src:'data-src', 1592 type: 'image', 1593 tLoading: 'Loading image #%curr%...', 1594 fixedContentPos: false, 1595 fixedBgPos: true, 1596 closeOnContentClick: true, 1597 closeBtnInside: false, 1598 mainClass: 'mfp-no-margins my-mfp-zoom-in header_font', 1599 removalDelay: 300, 1600 closeMarkup:'<button title="%title%" class="mfp-close"><div class="mfp-close_inner"></div></button>', 1601 gallery: { 1602 enabled: true, 1603 navigateByImgClick: true, 1604 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir% seven_fa-angle-%dir%"></button>', 1605 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 1606 }, 1607 image: { 1608 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 1609 titleSrc: function(item) { 1610 return item.el.attr('title'); 1611 } 1612 }, 1613 iframe: { 1614 markup: '<div class="mfp-iframe-scaler">'+ 1615 '<div class="mfp-close"></div>'+ 1616 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 1617 '<div class="mfp-title">Some caption</div>'+ 1618 '</div>' 1619 }, 1620 callbacks: { 1621 open: function() { 1622 jQuery('html').css({'overflow':'hidden','height':'100%'});
1623 }, 1624 close: function() { 1625 jQuery('html').css({'overflow-y':'','height':''}); 1626 }, 1627 markupParse: function(template, values, item) { 1628 values.title = item.el.attr('data-title'); 1629 } 1630 } 1631 }); 1632 jQuery('.seven_gallery').each(function(){ 1633 jQuery(this).magnificPopup({ 1634 delegate: 'div.portfolio_entry_li', 1635 src:'data-src', 1636 type: 'image', 1637 tLoading: 'Loading image #%curr%...', 1638 fixedContentPos: false, 1639 fixedBgPos: true, 1640 closeOnContentClick: true, 1641 closeBtnInside: false, 1642 mainClass: 'mfp-no-margins my-mfp-zoom-in header_font', 1643 removalDelay: 300, 1644 closeMarkup:'<button title="%title%" class="mfp-close"><div class="mfp-close_inner"></div></button>', 1645 gallery: { 1646 enabled: true, 1647 navigateByImgClick: true, 1648 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir% seven_fa-angle-%dir%"></button>', 1649 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 1650 }, 1651 image: { 1652 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 1653 titleSrc: function(item) { 1654 return item.el.attr('title'); 1655 } 1656 }, 1657 iframe: { 1658 markup: '<div class="mfp-iframe-scaler">'+ 1659 '<div class="mfp-close"></div>'+ 1660 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 1661 '<div class="mfp-title">Some caption</div>'+ 1662 '</div>' 1663 }, 1664 callbacks: { 1665 open: function() { 1666 jQuery('html').css({'overflow':'hidden','height':'100%'}); 1667 }, 1668 close: function() { 1669 jQuery('html').css({'overflow-y':'','height':''}); 1670 }, 1671 markupParse: function(template, values, item) { 1672 values.title = item.el.attr('data-title'); 1673 } 1674 } 1675 }); 1676 }); 1677 jQuery('.recentfolio_ul_wp,.seven_shortcode_slider').magnificPopup({ 1678 delegate: 'a.lone_link', 1679 src:'data-src', 1680 type: 'image', 1681 tLoading: 'Loading image #%curr%...', 1682 fixedContentPos: false, 1683 fixedBgPos: true, 1684 closeOnContentClick: true, 1685 closeBtnInside: false, 1686 mainClass: 'mfp-no-margins my-mfp-zoom-in header_font', 1687 removalDelay: 300, 1688 closeMarkup:'<button title="%title%" class="mfp-close"><div class="mfp-close_inner"></div></button>', 1689 gallery: { 1690 enabled: true, 1691 navigateByImgClick: true, 1692 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir% seven_fa-angle-%dir%"></button>', 1693 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 1694 }, 1695 image: { 1696 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 1697 }, 1698 iframe: { 1699 markup: '<div class="mfp-iframe-scaler">'+ 1700 '<div class="mfp-close"></div>'+ 1701 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 1702 '<div class="mfp-title">Some caption</div>'+ 1703 '</div>' 1704 }, 1705 callbacks: { 1706 open: function() { 1707 jQuery('html').css({'overflow':'hidden','height':'100%'}); 1708 }, 1709 close: function() { 1710 jQuery('html').css({'overflow-y':'','height':''}); 1711 }, 1712 markupParse: function(template, values, item) { 1713 values.title = item.el.attr('data-title'); 1714 } 1715 } 1716 }); 1717 //BACKGROUND VIDEOS HIDE 1718 jQuery('.seven_with_video').each(function() { 1719 if (seven_on_mobile) { 1720 var $vid_remover=jQuery(this); 1721 $vid_remover.css("background-image", "url("+$vid_remover.children('.seven_video-bg').attr('poster')+")"); 1722 $vid_remover.children('.seven_video-bg').remove(); 1723 } 1724 }); 1725 jQuery("#single_blog_content,#full-entry-right,#prk_full_folio").addClass('prk_first_anim'); 1726 setTimeout(function() { 1727 jQuery("#prk_full_size_single,#prk_half_size_single,#after_single_folio").addClass('prk_first_anim'); 1728 },400); 1729 //SIDEBAR STUFF 1730 jQuery('#footer_in a,#sidebar a').not('a.button,.pirenko_social a,#footer_in .pirenko_recent_posts a,#sidebar .pirenko_recent_posts a,.tagcloud a').addClass('default_color'); 1731 jQuery('#footer_in .pirenko_recent_posts a,#sidebar .pirenko_recent_posts a').addClass('zero_color'); 1732 if (jQuery('.google_maps').length) { 1733 if (loaded_google_maps===false) { 1734 loaded_google_maps=true; 1735 var script = document.createElement('script'); 1736 script.type = 'text/javascript'; 1737 if(theme_options.google_maps_key!==undefined && theme_options.google_maps_key!=="") { 1738 script.src = 'https://maps.googleapis.com/ma
1738ps/api/js?v=3.exp&callback=init_map&key='+theme_options.google_maps_key; 1739 } 1740 else { 1741 script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&callback=init_map'; 1742 } 1743 document.body.appendChild(script); 1744 } 1745 else { 1746 init_map(); 1747 } 1748 } 1749 jQuery('.page_title_divider').each(function() { 1750 if (jQuery(this).attr('data-color')!="") { 1751 jQuery(this).find('i').css({'color':jQuery(this).attr('data-color')}); 1752 } 1753 }); 1754 jQuery('#single_page_teaser').each(function() { 1755 if (jQuery(this).attr('data-color')!="") { 1756 jQuery(this).css({'color':jQuery(this).attr('data-color')}); 1757 } 1758 }); 1759 1760 //MAILCHIMP, CONTACT FORM 7 && PROTECTED PAGES 1761 jQuery('#prk_protected input,.mc_input,.wpcf7-form input[type="password"],.wpcf7-form input[type="tel"],.wpcf7-form input[type="email"],.wpcf7-form input[type="text"],.wpcf7-form textarea').not('.wpcf7-submit').addClass('pirenko_highlighted'); 1762 jQuery('.mc_form_inside').addClass('clearfix'); 1763 jQuery('.mc_signup_submit').addClass('theme_button small clearfix'); 1764 jQuery('.mc_signup_submit>input').removeClass('button'); 1765 jQuery('#prk_footer .mc_signup_submit input').attr('data-color',theme_options.titles_color_footer); 1766 jQuery('#prk_hidden_bar .mc_signup_submit input').attr('data-color',theme_options.active_color_right_bar); 1767 jQuery('#prk_footer .mc_signup_submit input').attr('data-forced-color','true'); 1768 jQuery('#prk_hidden_bar .mc_signup_submit input').attr('data-forced-color','true'); 1769 jQuery('.wpcf7-submit').parent().addClass('theme_button small'); 1770 //FORMS MANAGEMENT 1771 //FORCE TEXTFIELDS BLUR 1772 jQuery('.pirenko_highlighted,.pk_contact_highlighted').blur(function() { 1773 jQuery(this).css({'border':'','outline':'none','color':'','background-color':''}); 1774 }); 1775 jQuery('.pirenko_highlighted,.pk_contact_highlighted').not('#footer_in .pirenko_highlighted').focus(function (){ 1776 if (jQuery(this).attr('data-color')!=undefined && jQuery(this).attr('data-color')!="") { 1777 jQuery(this).css({'border':'1px solid '+hex2rgb(jQuery(this).attr('data-color'),0.65)+'','color':jQuery(this).attr('data-color'),'background-color':hex2rgb(jQuery(this).attr('data-color'),0.1)}); 1778 } 1779 }); 1780 //EMAIL SEND FEATURE 1781 jQuery('#submit_message_div a').click(function(e) { 1782 e.preventDefault(); 1783 //REMOVE PREVIOUS ERRORS IF THEY EXIST 1784 jQuery("#contact-form .contact_error").remove(); 1785 1786 //ADD THE TEMPLATE NAME TO THE SUBJECT 1787 var helper=jQuery('#c_subject').attr('value'); 1788 jQuery('#full_subject').attr('value',jQuery('#contact-form').attr('data-name')+' - '+helper); 1789 var empty_text_error=jQuery('#contact-form').attr('data-empty'); 1790 var invalid_email_error=jQuery('#contact-form').attr('data-invalid'); 1791 var value, theID, error, emailReg; 1792 error = false; 1793 emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; 1794 //DATA VALIDATION 1795 jQuery('#c_name, #c_email, #c_message').each(function() 1796 { 1797 value = jQuery(this).val(); 1798 theID = jQuery(this).attr('id'); 1799 if(value === '' || value=== jQuery(this).attr('data-original')) 1800 { 1801 if (theID === 'c_message') { 1802 jQuery(this).after('<p class="contact_error seven_italic prk_heavier_600 header_font at_messa">'+empty_text_error+'</p>'); 1803 } 1804 else { 1805 jQuery(this).after('<p class="contact_error seven_italic prk_heavier_600 header_font">'+empty_text_error+'</p>'); 1806 } 1807 error = true; 1808 } 1809 if(theID === 'c_email' && value !== '' && !emailReg.test(value)) 1810 { 1811 jQuery(this).after('<p class="contact_error seven_italic prk_heavier_600 header_font">
1811'+invalid_email_error+'</p>'); 1812 error = true; 1813 } 1814 jQuery('.contact_error').addClass('seven_animated shake'); 1815 }); 1816 1817 //SEND EMAIL IF THERE ARE NO ERRORS 1818 if(error === false) { 1819 jQuery("#submit_message_div").addClass("seven_animated bounceOut"); 1820 setTimeout(function() { 1821 jQuery('#contact_ok').addClass('seven_animated flash'); 1822 ajaxSubmit(); 1823 },1200); 1824 } 1825 }); 1826 function ajaxSubmit() { 1827 var prk_form_content = jQuery('#contact-form').serialize(); 1828 var data = { 1829 action: 'mail_before_submit', 1830 email_wrap: prk_form_content, 1831 _ajax_nonce:ajax_var.nonce 1832 }; 1833 jQuery.post(ajax_var.url, data, function(response) { 1834 jQuery("#contact_ok").removeClass('flash'); 1835 jQuery("#contact_ok").addClass('forced_opacity'); 1836 if(response === 'sent0') { 1837 jQuery("#contact_ok").html(jQuery('#contact-form').attr('data-ok')); 1838 } 1839 else { 1840 jQuery("#contact_ok").html(response); 1841 } 1842 }); 1843 return false; 1844 } 1845 //BUTTONS FUNCTIONS 1846 //AJAX PORTFOLIO LINKS 1847 jQuery("a.seven_ajax_anchor,.seven_ajax_anchor a").on('click', function(event) { 1848 event.preventDefault(); 1849 if (!jQuery(this).parents('.portfolio_entry_li.hover_trigger').length) { 1850 jQuery(this).parent().parent().addClass('hover_trigger'); 1851 } 1852 else { 1853 var next_page=jQuery(this).attr("href"); 1854 //ARE WE UNDER CLASSIC NAVIGATION 1855 if (jQuery('.single-pirenko_portfolios').length) { 1856 window.location.href=next_page; 1857 } 1858 else { 1859 //IS THE OVERLAY OPEN 1860 ajax_in_pos=parseInt(jQuery(this).attr('data-pos'),10); 1861 if (!jQuery('#seven_ajax_back.seven_tweaked').length) { 1862 jQuery('#seven_ajax_back').css({'z-index':'4'}); 1863 jQuery('#seven_ajax_back').addClass('seven_tweaked'); 1864 jQuery('#prk_responsive_menu').removeClass('prk_first_anim'); 1865 load_ajax_link(next_page,false,true); 1866 } 1867 else { 1868 jQuery("#prk_half_size_single,#after_single_folio,#prk_full_folio").removeClass('prk_first_anim'); 1869 setTimeout(function() { 1870 jQuery('.portfolio_entry_li').removeClass('hover_trigger'); 1871 load_ajax_link(next_page,false,true); 1872 },300); 1873 } 1874 } 1875 } 1876 }); 1877 jQuery("a.blog_hover").on('click', function(event) { 1878 if (!jQuery(this).hasClass('hover_trigger')) { 1879 event.preventDefault(); 1880 jQuery(this).addClass('hover_trigger'); 1881 } 1882 }); 1883 jQuery('.pf_load_more a').on('click', function(e) { 1884 e.preventDefault(); 1885 if (!jQuery(this).hasClass('loading_posts')) { 1886 jQuery(this).parent().removeClass('hover_trigger'); 1887 jQuery(this).parent().addClass('loading_posts'); 1888 if (jQuery('#seven_wrapper').hasClass('solid_buttons')) { 1889 jQuery(this).css({'background-color':theme_options.active_color}); 1890 } 1891 else { 1892 jQuery(this).css({'background-color':'transparent','color':theme_options.active_color,'border-color':theme_options.active_color}); 1893 } 1894 load_more_portfolios(jQuery(this).parent().parent().parent()); 1895 } 1896 }); 1897 jQuery('.blog_load_more a').on('click', function(e) { 1898 e.preventDefault(); 1899 if (!jQuery(this).parent().hasClass('loading_posts')) { 1900 jQuery(this).parent().addClass('loading_posts'); 1901 jQuery('#ajax_spinner.spinner-icon').addClass('prk_first_anim'); 1902 load_more_posts(jQuery('.blog_load_more').parent().parent()); 1903 } 1904 }); 1905 1906 /*if (jQuery('#seven_super_sections>div:first-child').attr('data-top-bottom')!==undefined) { 1907 jQuery('#seven_super_sections>div:first-child').attr('data-0-top-top','background-position: 50% 0px'); 1908 jQuery('#seven_super_sections>div:first-child').attr('data-top-bottom','background-position: 50% 150px'); 1909 }*/ 1910 1911 //VARIOUS THEME FUNCTIONS 1912 init_member(); 1913 init_blog(); 1914 init_portfolio(); 1915 thumbs_roll(); 1916 prk_init_sharrre(); 1917 jQuery('.bordered_buttons .theme_button a,.bordered_buttons .theme_button input').each( function() { 1918 if (jQuery(this).attr('data-color')!==undefined && jQuery(this).attr('data-color')!=="default" && jQuery(this).attr('data-color')!=="") { 1919 jQuery(this).css({'background-color':'transparent','color':jQuery(this).attr('data-color'),'border-color':jQuery(this).attr('data-color')}); 1920 } 1921 }); 1922 1923 //Fire custom event. Useful to initialize plugins 1924 jQuery.event.trigger('seven_init_plugins');
1925 //Here's how you can bind this event - replace plugin_function() with whatever is needed 1926 /*jQuery(document).on("seven_init_plugins", function(event, data) { 1927 plugin_function(); 1928 });*/ 1929 1930 //ADD ARROWS 1931 jQuery('.sitemap_block li a,.widget_rss ul li a, .widget_meta a,.widget_recent_entries a,.widget_categories a,.widget_archive a,.widget_pages a,.widget_links a,.widget_nav_menu a').not('#prk_hidden_bar a').each(function() { 1932 jQuery(this).prepend('<div class="prk_theme_arrows"><div class="tr_wrapper"><div class="seven_fa-angle-double-right"></div></div></div>'); 1933 }); 1934 1935 //VC STUFF 1936 if (jQuery.isFunction(window.vc_twitterBehaviour) && theme_options.active_visual_composer==="true") { 1937 /*var ac_icons = { 1938 header: "seven_fa-plus", 1939 activeHeader: "seven_fa-minus" 1940 }; 1941 jQuery(".prk_accordion").accordion({ 1942 collapsible: true, 1943 active: false , 1944 autoHeight:false, 1945 heightStyle: "content", 1946 icons: ac_icons, 1947 change: function() { 1948 //MAKE SURE THE HOVER STATE IS GONE 1949 jQuery(".prk_accordion h3").each(function(){ 1950 jQuery(this).blur(); 1951 }); 1952 } 1953 });*/ 1954 jQuery('.vc_call_to_action').addClass('prk_inner_block small-12 small-centered columns'); 1955 jQuery('.wpb_row').each(function() { 1956 if (jQuery(this).find('.prk_price_table').length ) {//&& !jQuery(this).find('.wpb_row .prk_price_table').length 1957 jQuery(this).children('.small-12').children('.prk_inner_block').addClass('tables_father'); 1958 } 1959 }); 1960 vc_tabsBehaviour(); 1961 vc_twitterBehaviour(); 1962 vc_toggleBehaviour(); 1963 vc_accordionBehaviour(); 1964 vc_teaserGrid(); 1965 vc_carouselBehaviour(); 1966 vc_slidersBehaviour(); 1967 vc_googleplus(); 1968 vc_pinterest(); 1969 vc_progress_bar(); 1970 vc_waypoints(); 1971 vc_plugin_flexslider(); 1972 vc_google_fonts(); 1973 } 1974 //RETINA IMAGES SIZE CHANGE 1975 jQuery('img.seven_retina,.seven_retina img').each(function() { 1976 var $imager=jQuery(this); 1977 var img_load=imagesLoaded($imager.parent()); 1978 img_load.on('always', function() { 1979 $imager.addClass('prk_first_anim'); 1980 $imager.width($imager.attr('width')/2); 1981 //$imager.height($imager.attr('height')/2); 1982 }); 1983 }); 1984 setTimeout(function() { 1985 jQuery(window).trigger("debouncedresize"); 1986 },50); 1987 if (folio_flag===false) { 1988 setTimeout(function() { 1989 //GO TO HASHTAG IF POSSIBLE 1990 go_hash(15,false); 1991 },200); 1992 setTimeout(function() { 1993 jQuery.waypoints('refresh'); 1994 stop_verification=false; 1995 },450); 1996 //ENSURE THAT EVERYTHING IS PERFECTLY RENDERED 1997 setTimeout(function() { 1998 jQuery.waypoints('refresh'); 1999 stop_verification=false; 2000 },2500); 2001 } 2002 else { 2003 //jQuery('#single_slider,#single_spinner.spinner-icon').addClass('prk_first_anim'); 2004 var img_load=imagesLoaded('.seven_ajax_portfolio'); 2005 img_load.on('always', function() { 2006 jQuery('#folio_nav_wrapper').addClass('prk_first_anim'); 2007 jQuery('.seven_ajax_portfolio').slideDown(250); 2008 jQuery('#multi_spinner').css({'opacity':'0'}); 2009 }); 2010 } 2011 first_load=false; 2012 loading_page=false; 2013 }//ENDED LOADING 2014 //FUNCTIONS EXECUTED ONLY ONCE 2015 var widgets_counter=0; 2016 jQuery('#footer_in>.row>.widget').each(function() { 2017 jQuery(this).addClass(theme_options.widgets_nr); 2018 widgets_counter++; 2019 if (widgets_counter>
20191 && widgets_counter===(12/parseInt(jQuery('#prk_footer').attr('data-layout').replace('small-',''),10))) { 2020 jQuery(this).after('<div class="clearfix"></div>'); 2021 widgets_counter=0; 2022 } 2023 }); 2024 if (menu_mode==="sidy") { 2025 jQuery("#prk_hidden_bar_scroller").mCustomScrollbar({ 2026 scrollInertia:450, 2027 autoHideScrollbar:true, 2028 scrollButtons:{ 2029 enable:false 2030 } 2031 }); 2032 } 2033 jQuery('#menu_section').attr('data-width',jQuery('#menu_section').width()); 2034 jQuery('#seven_close').click(function(e) { 2035 if (loading_page===false) { 2036 if (jQuery('.single-pirenko_portfolios').length) { 2037 window.location.href=jQuery('#content').attr('data-parent'); 2038 } 2039 else { 2040 loading_page=true; 2041 jQuery('#seven_ajax_holder').removeClass('prk_first_anim'); 2042 jQuery('#top_bar_wrapper').removeClass('prk_first_anim'); 2043 setTimeout(function() { 2044 jQuery ('body').removeClass('seven_showing_lightbox'); 2045 jQuery('#prk_responsive_menu').addClass('prk_first_anim'); 2046 jQuery(window).trigger("debouncedresize"); 2047 first_cross=true; 2048 jQuery(window).trigger("smartresize"); 2049 //GO TO HASHTAG IF POSSIBLE 2050 go_hash(150,true); 2051 },260); 2052 setTimeout(function() { 2053 jQuery('#seven_ajax_back').removeClass('seven_tweaked'); 2054 },620); 2055 setTimeout(function() { 2056 jQuery('#seven_ajax_back').css({'z-index':'-1'}); 2057 loading_page=false; 2058 },880); 2059 } 2060 } 2061 }); 2062 jQuery('#seven_left').click(function(e) { 2063 if (loading_page===false) { 2064 if (jQuery('.single-pirenko_portfolios').length) { 2065 window.location.href=jQuery('.navigation_previous_portfolio>a').attr('href'); 2066 } 2067 else { 2068 loading_page=true; 2069 if (ajax_in_pos>0) { 2070 ajax_in_pos=parseInt(ajax_in_pos,10)-1; 2071 } 2072 else { 2073 ajax_in_pos=jQuery('.folio_masonry.iso_folio>div').length-1; 2074 } 2075 jQuery("#prk_half_size_single,#prk_full_folio,#after_single_folio").removeClass('prk_first_anim'); 2076 setTimeout(function() { 2077 load_ajax_link(jQuery('.folio_masonry.iso_folio>div:nth-child('+parseInt((ajax_in_pos+1),10)+') a.seven_ajax_anchor').attr('href'),false,true); 2078 },300); 2079 } 2080 } 2081 }); 2082 jQuery('#seven_right').click(function(e) { 2083 if (loading_page===false) { 2084 if (jQuery('.single-pirenko_portfolios').length) { 2085 window.location.href=jQuery('.navigation_next_portfolio>a').attr('href'); 2086 } 2087 else { 2088 loading_page=true; 2089 if (ajax_in_pos<(jQuery('.folio_masonry.iso_folio>div').length-1)) { 2090 ajax_in_pos=parseInt(ajax_in_pos,10)+1; 2091 } 2092 else { 2093 ajax_in_pos=0; 2094 } 2095 jQuery("#prk_half_size_single,#prk_full_folio,#after_single_folio").removeClass('prk_first_anim'); 2096 setTimeout(function() { 2097 load_ajax_link(jQuery('.folio_masonry.iso_folio>div:nth-child('+parseInt((ajax_in_pos+1),10)+') a.seven_ajax_anchor').attr('href'),false,true); 2098 },300); 2099 } 2100 } 2101 }); 2102 if (!seven_on_mobile) { 2103 var seven_skrollr = skrollr.init({ 2104 forceHeight:true, 2105 smoothScrolling:false, 2106 keyframe: function(element, name, direction) { 2107 setTimeout(function() { 2108 jQuery('#footer_revealer').css({'opacity':jQuery('#footer_mirror').css('opacity')}); 2109 },100); 2110 } 2111 }); 2112 jQuery(window).trigger("debouncedresize"); 2113 } 2114 //HIDDEN SIDEBAR FUNCTIONS 2115 jQuery('#prk_menu_trigger,#dotted_navigation li').hover(function() { 2116 jQuery(this).addClass('hover_trigger'); 2117 }, 2118 function() { 2119 jQuery(this).removeClass('hover_trigger'); 2120 }); 2121 function hasParentClass( e, classname ) { 2122 if(e === document){ 2123 return false; 2124 } 2125 if( classie.has( e, classname ) ) { 2126 return true; 2127 } 2128 return e.parentNode && hasParentClass( e.parentNode, classname ); 2129 } 2130 function click_on_body (evt) { 2131 if (evt==='close_flag' || hasParentClass(evt.target,'hider_flag')) { 2132 if(sidebar_is_open===true) { 2133 prk_toggle_sidebar(); 2134 } 2135 } 2136 }; 2137 function init_sidebar() { 2138 jQuery('#prk_menu_trigger,.seven_fully #prk_hidden_bar_inner').click(function(event) { 2139 if (menu_mode==="sidy" || !jQuery('body').hasClass('prk_shifted') || jQuery(event.target).attr('id')==='prk_hidden_bar_inner' || jQuery(event.target).attr('id')==='prk_blocks_wrapper' || jQuery(event.target).attr('id')==='prk_rotated_back' || jQuery(event.target).parent().attr('id')==='prk_blocks_wrapper') { 2140 prk_toggle_sidebar(); 2141 } 2142 }); 2143 } 2144 function prk_toggle_sidebar() { 2145 2146 if (menu_mode==="fixy") { 2147 if (responsive_menu_is_open===true) { 2148 responsive_menu_is_open=false; 2149 jQuery('#menu_section .sf-menu').stop().slideUp({ 2150 'duration':500, 2151 easing:'easeOutExpo', 2152 complete:function() { 2153 jQuery('body').removeClass('second_anims'); 2154 } 2155 }); 2156 jQuery('body').removeClass('prk_shifted'); 2157 } 2158 else { 2159 responsive_menu_is_open=true; 2160 jQuery('html, body').animate({scrollTop:0}, 0); 2161 jQuery('#menu_section .sf-menu').stop().slideDown({ 2162 'duration':500, 2163 easing:'easeOutExpo', 2164 complete:function() { 2165 jQuery('body').addClass('second_anims'); 2166 } 2167 }); 2168 jQuery('body').addClass('prk_shifted'); 2169 } 2170 } 2171 else { 2172 if (sidebar_is_open===false) { 2173 jQuery('#prk_hidden_bar').css({'display':'block'});
2174 console.log('block'); 2175 jQuery('#prk_menu_trigger').removeClass('hover_trigger'); 2176 sidebar_is_open=true; 2177 jQuery('body').addClass('prk_shifted'); 2178 if (menu_mode==="sidy") { 2179 jQuery('#prk_hidden_bar').css({'opacity':'1'}); 2180 } 2181 setTimeout(function() { 2182 document.addEventListener( 'click', click_on_body ); 2183 jQuery('#body_hider').css({'visibility':'visible'}); 2184 jQuery('#body_hider').addClass('prk_shifted_hider'); 2185 jQuery('body').addClass('showing_hidden_sidebar'); 2186 },delay_1); 2187 setTimeout(function() { 2188 jQuery('body').addClass('second_anims'); 2189 },delay_2); 2190 } 2191 else { 2192 sidebar_is_open=false; 2193 jQuery('#prk_menu_trigger').removeClass('hover_trigger'); 2194 jQuery('body').removeClass('prk_shifted'); 2195 jQuery('body').removeClass('showing_hidden_sidebar'); 2196 jQuery('#body_hider').removeClass('prk_shifted_hider'); 2197 setTimeout(function(){ 2198 document.removeEventListener( 'click', click_on_body ); 2199 if (menu_mode==="sidy") { 2200 jQuery('#prk_hidden_bar').css({'opacity':'0'}); 2201 } 2202 jQuery('#body_hider').css({'visibility':'hidden'}); 2203 },300); 2204 setTimeout(function(){ 2205 console.log('none'); 2206 jQuery('body').removeClass('second_anims'); 2207 jQuery('#prk_hidden_bar').css({'display':'none'}); 2208 },delay_3); 2209 } 2210 } 2211 } 2212 if (seven_on_mobile) { 2213 init_sidebar(); 2214 ended_loading(false); 2215 setTimeout(function(){ 2216 jQuery(window).trigger("debouncedresize"); 2217 jQuery("#wrap,#prk_footer_wrapper").addClass('prk_first_anim'); 2218 jQuery('html').addClass('seven_ready'); 2219 },300); 2220 } 2221 else { 2222 var img_load=imagesLoaded('#prk_ajax_container'); 2223 img_load.on('always', function() { 2224 init_sidebar(); 2225 ended_loading(false); 2226 setTimeout(function(){ 2227 jQuery(window).trigger("debouncedresize"); 2228 jQuery("#wrap,#prk_footer_wrapper").addClass('prk_first_anim'); 2229 jQuery('html').addClass('seven_ready'); 2230 },300); 2231 }); 2232 } 2233 //RESIZE LISTENER 2234 function pirenko_resize() { 2235 height_fix = window.innerHeight ? window.innerHeight : jQuery(window).height(); 2236 if (jQuery('#wpadminbar').length) { 2237 height_fix=height_fix-jQuery('#wpadminbar').height(); 2238 } 2239 if (menu_mode!=="fixy") { 2240 jQuery("#prk_hidden_bar,#prk_hidden_bar_scroller").outerHeight(height_fix); 2241 } 2242 jQuery("#seven_ajax_holder #ajaxed_content").css({'min-height':height_fix}); 2243 } 2244 jQuery(window).resize(function() { 2245 pirenko_resize(); 2246 }); 2247 pirenko_resize(); 2248 //DELAYED RESIZE LISTENTER 2249 jQuery(window).on("debouncedresize", function() { 2250 if (!seven_on_mobile) { 2251 jQuery('.seven_video-bg.parallax_video').each(function() { 2252 var $par_video=jQuery(this); 2253 var scrolly=$par_video.height()-$par_video.parent().outerHeight(); 2254 $par_video.attr('data-top-bottom',"bottom: -"+scrolly+"px;"); 2255 }); 2256 seven_skrollr.refresh(); 2257 } 2258 jQuery('#footer_mirror').css({'height':jQuery('#prk_footer').outerHeight()+mirror_offset}); 2259 if (menu_mode==="fixy"){ 2260 if ((jQuery(window).width()-jQuery('#menu_section').attr('data-width')-jQuery('#prk_logo_image').attr('data-width')-2*parseInt(jQuery('#prk_hidden_bar_scroller').css('padding-left'),10))<60) { 2261 if (!jQuery('body').hasClass('menu_at_top')) { 2262 jQuery('body').addClass('menu_at_top'); 2263 jQuery('#menu_section .sf-menu').css({'display':'none'}); 2264 responsive_menu_is_open=false; 2265 menu_bar_height=47; 2266 } 2267 } 2268 else { 2269 if (jQuery('body').hasClass('menu_at_top')) { 2270 jQuery('body').removeClass('menu_at_top'); 2271 menu_bar_height=theme_options.menu_vertical; 2272 jQuery('#menu_section .sf-menu').css({'display':'block'});
2273 //ENSURE THAT THE MENU IS RIGHT WHEN WE GO FROM SMALL TO BIG 2274 if (jQuery('#menu_section').attr('data-width')!==jQuery('#menu_section').width()) { 2275 jQuery('#menu_section').attr('data-width',jQuery('#menu_section').width()); 2276 jQuery(window).trigger("debouncedresize"); 2277 } 2278 } 2279 } 2280 } 2281 jQuery('.forced_row>.columns,.vertical_forced_row>.columns').each(function() { 2282 jQuery(this).css({'height':jQuery(window).height()-admin_bar_height-menu_bar_height}); 2283 }); 2284 jQuery('#seven_related_grid').find('.centerized_father').each(function() { 2285 jQuery(this).height(jQuery(this).closest(".portfolio_entry_li").innerHeight()); 2286 }); 2287 if (menu_mode==="sidy") { 2288 jQuery("#prk_hidden_bar_scroller").mCustomScrollbar("update"); 2289 } 2290 jQuery(".google_maps").height(jQuery(".google_maps").attr('data-map_height'));
2291 jQuery('.google_maps').css({'max-height':jQuery(window).height()-100}); 2292 jQuery('#dotted_navigation').css({'margin-top':-jQuery('#dotted_navigation').height()/2}); 2293 }); 2294} 2295//MAP FUNCTIONS 2296function init_map() { 2297 "use strict"; 2298 jQuery('.google_maps').each(function() { 2299 var $this_map=jQuery(this); 2300 if ($this_map.attr('data-style')==='subtle_grayscale') { 2301 var mapOptions = { 2302 zoom: parseInt($this_map.attr('data-zoom'),10), 2303 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2304 styles: [{featureType:"landscape",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",stylers:[{saturation:-100},{lightness:51},{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{saturation:-100},{lightness:30},{visibility:"on"}]},{featureType:"road.local",stylers:[{saturation:-100},{lightness:40},{visibility:"on"}]},{featureType:"transit",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]/**/},{featureType:"administrative.locality",stylers:[{visibility:"off"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"on"}]/**/},{featureType:"water",elementType:"labels",stylers:[{visibility:"on"},{lightness:-25},{saturation:-100}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]}], 2305 scrollwheel: false 2306 }; 2307 } 2308 else if ($this_map.attr('data-style')==='almost_gray') { 2309 var mapOptions = { 2310 zoom: parseInt($this_map.attr('data-zoom'),10), 2311 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2312 styles: [{"stylers":[{"saturation":-100},{"gamma":1}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"poi.business","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"poi.business","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi.place_of_worship","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"poi.place_of_worship","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"water","stylers":[{"visibility":"on"},{"saturation":50},{"gamma":0},{"hue":"#50a5d1"}]},{"featureType":"administrative.neighborhood","elementType":"labels.text.fill","stylers":[{"color":"#333333"}]},{"featureType":"road.local","elementType":"labels.text","stylers":[{"weight":0.5},{"color":"#333333"}]},{"featureType":"transit.station","elementType":"labels.icon","stylers":[{"gamma":1},{"saturation":50}]}], 2313 scrollwheel: false 2314 }; 2315 } 2316 else if ($this_map.attr('data-style')==='cobalt') { 2317 var mapOptions = { 2318 zoom: parseInt($this_map.attr('data-zoom'),10), 2319 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2320 styles: [{"featureType":"all","elementType":"all","stylers":[{"invert_lightness":true},{"saturation":10},{"lightness":30},{"gamma":0.5},{"hue":"#435158"}]}], 2321 scrollwheel: false 2322 }; 2323 } 2324 else if ($this_map.attr('data-style')==='midnight') { 2325 var mapOptions = { 2326 zoom: parseInt($this_map.attr('data-zoom'),10), 2327 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2328 styles: [{"featureType":"water","stylers":[{"color":"#021019"}]},{"featureType":"landscape","stylers":[{"color":"#08304b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#0c4152"},{"lightness":5}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#0b434f"},{"lightness":25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#0b3d51"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#000000"},{"lightness":13}]},{"featureType":"transit","stylers":[{"color":"#146474"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#144b53"},{"lightness":14},{"weight":1.4}]}], 2329 scrollwheel: false 2330 }; 2331 } 2332 else if ($this_map.attr('data-style')==='old_timey') { 2333 var mapOptions = { 2334 zoom: parseInt($this_map.attr('data-zoom'),10), 2335 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2336 styles: [{"featureType":"administrative","stylers":[{"visibility":"off"}]},{"featureType":"poi","stylers":[{"visibility":"simplified"}]},{"featureType":"road","stylers":[{"visibility":"simplified"}]},{"featureType":"water","stylers":[{"visibility":"simplified"}]},{"featureType":"transit","stylers":[{"visibility":"simplified"}]},{"featureType":"landscape","stylers":[{"visibility":"simplified"}]}
2336,{"featureType":"road.highway","stylers":[{"visibility":"off"}]},{"featureType":"road.local","stylers":[{"visibility":"on"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"visibility":"on"}]},{"featureType":"water","stylers":[{"color":"#84afa3"},{"lightness":52}]},{"stylers":[{"saturation":-77}]},{"featureType":"road"}], 2337 scrollwheel: false 2338 }; 2339 } 2340 else if ($this_map.attr('data-style')==='green') { 2341 var mapOptions = { 2342 zoom: parseInt($this_map.attr('data-zoom'),10), 2343 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2344 styles: [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#333739"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#2ecc71"}]},{"featureType":"poi","stylers":[{"color":"#2ecc71"},{"lightness":-7}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#2ecc71"},{"lightness":-28}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#2ecc71"},{"visibility":"on"},{"lightness":-15}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#2ecc71"},{"lightness":-18}]},{"elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#2ecc71"},{"lightness":-34}]},{"featureType":"administrative","elementType":"geometry","stylers":[{"visibility":"on"},{"color":"#333739"},{"weight":0.8}]},{"featureType":"poi.park","stylers":[{"color":"#2ecc71"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#333739"},{"weight":0.3},{"lightness":10}]}], 2345 scrollwheel: false 2346 }; 2347 } 2348 else { 2349 var mapOptions = { 2350 zoom: parseInt($this_map.attr('data-zoom'),10), 2351 center: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2352 scrollwheel: false 2353 }; 2354 } 2355 2356 var mapElement = document.getElementById($this_map.attr('id')); 2357 var map = new google.maps.Map(mapElement, mapOptions); 2358 google.maps.event.addListenerOnce(map, 'idle', function() { 2359 2360 }); 2361 if ($this_map.attr('data-marker_image_lat')!="" && $this_map.attr('data-marker_image_long')!=""){ 2362 var marker = new google.maps.Marker({ 2363 position: new google.maps.LatLng($this_map.attr('data-marker_image_lat'), $this_map.attr('data-marker_image_long')), 2364 map: map, 2365 icon: $this_map.attr('data-marker'), 2366 size: new google.maps.Size(40,52), 2367 clickable: false, 2368 }); 2369 } 2370 else { 2371 var marker = new google.maps.Marker({ 2372 position: new google.maps.LatLng($this_map.attr('data-lat'), $this_map.attr('data-long')), 2373 map: map, 2374 icon: $this_map.attr('data-marker'), 2375 size: new google.maps.Size(40,52), 2376 clickable: false, 2377 }); 2378 } 2379 }); 2380} 2381//FUNCTION TO DETECT IF A TOUCH DEVICE IS IN USE 2382function is_mobile() { 2383 "use strict"; 2384 var check = false; 2385 (function(a){ 2386 if((/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())) || /(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a.toLowerCase())||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
2386sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4).toLowerCase())){check = true;}})(navigator.userAgent||navigator.vendor||window.opera); 2387 return check; 2388} 2389//HEXADECIMAL TO RGB:#CCCCCC=>rgb(204,204,204) 2390function hex2rgb(hexStr,alpha) { 2391 "use strict"; 2392 var hex = parseInt(hexStr.substring(1), 16); 2393 var r = (hex & 0xff0000) >> 16; 2394 var g = (hex & 0x00ff00) >> 8; 2395 var b = hex & 0x0000ff; 2396 if (alpha>1) { 2397 alpha=alpha/100; 2398 } 2399 return "rgba("+[r, g, b]+","+alpha+")"; 2400} 2401jQuery(window).bind("pageshow", function(event) { 2402 "use strict"; 2403 if (event.originalEvent.persisted) { 2404 window.location.reload(); 2405 } 2406}); 2407jQuery(document).ready(function() { 2408 if (theme_options.seven_active_skin!==undefined) { 2409 jQuery('html').addClass(theme_options.seven_active_skin); 2410 if (theme_options.seven_current_home!==undefined) { 2411 jQuery('#prk_logos a').attr('href',theme_options.seven_current_home); 2412 } 2413 } 2414 if(theme_options.prk_responsive==="1") { 2415 jQuery('html').addClass('seven_responsive'); 2416 } 2417 var nua = navigator.userAgent; 2418 if ( nua.indexOf("Chrome") != -1 ) { 2419 jQuery('html').addClass('seven_chrome'); 2420 } 2421 else { 2422 2423 if (((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1))) { 2424 jQuery('html').addClass('seven_android'); 2425 } 2426 else { 2427 var msie = nua.indexOf('MSIE '); 2428 var trident = nua.indexOf('Trident/'); 2429 if (msie > 0 || trident > 0) { 2430 jQuery('html').addClass('seven_ie'); 2431 } 2432 else if ( nua.indexOf("Safari") != -1 ) { 2433 jQuery('html').addClass('seven_safari'); 2434 } 2435 else if ( nua.indexOf("Mozilla") != -1 ) { 2436 jQuery('html').addClass('seven_mozilla'); 2437 } 2438 } 2439 } 2440 if (is_mobile()) { 2441 jQuery('#footer_mirror').css({'display':'none'}); 2442 jQuery('#prk_footer_wrapper').css({'position':'relative'}); 2443 } 2444 if (!jQuery('.seven_fixed_menu').length) { 2445 jQuery('#menu_section ul li.active').removeClass('active'); 2446 } 2447 var found_url=false; 2448 //TRY TO HIGHLIGHT PARENT PAGES 2449 if (jQuery('#content').attr('data-parent')!==undefined) { 2450 if (found_url===false) { 2451 jQuery('#menu_section .sf-menu>li>a').each(function() { 2452 if (jQuery(this).attr('href')===jQuery('#content').attr('data-parent')) { 2453 jQuery(this).parent().addClass('active'); 2454 found_url=true; 2455 } 2456 }); 2457 } 2458 if (found_url===false) { 2459 jQuery('#menu_section .sf-menu li a').each(function() { 2460 if (jQuery(this).attr('href')===jQuery('#content').attr('data-parent')) { 2461 jQuery(this).parent().parent().parent().addClass('active'); 2462 found_url=true; 2463 } 2464 }); 2465 } 2466 } 2467 if (found_url===false) { 2468 jQuery('#menu_section .sf-menu li').each(function() { 2469 if (jQuery(this).hasClass('active') && jQuery(this).parent().hasClass('sub-menu')) { 2470 jQuery(this).parent().parent().addClass('active'); 2471 found_url=true; 2472 } 2473 }); 2474 } 2475 if (found_url===false) { 2476 jQuery('#menu_section .sf-menu li a').each(function() { 2477 if (window.location.href===jQuery(this).attr('href')) { 2478 jQuery(this).parent().addClass('active'); 2479 //2ND LEVEL OPEN 2480 if(jQuery(this).parent().parent().hasClass('sub-menu')) { 2481 jQuery(this).parent().parent().slideDown(0); 2482 } 2483 //3RD LEVEL OPEN 2484 if(jQuery(this).parent().parent().parent().parent().hasClass('sub-menu')) { 2485 jQuery(this).parent().parent().parent().parent().slideDown(0); 2486 } 2487 } 2488 }); 2489 } 2490 //jQuery("#menu_section .sf-menu>li.active>.sub-menu").slideDown(0); 2491 jQuery('#prk_responsive_menu').addClass('prk_first_anim'); 2492 jQuery('#body_hider').css({'visibility':'hidden'}); 2493 //CALL MAIN JSCRIPT FUNCTION 2494 seven_init(); 2495}); 2496 2497var _credits = { 2498 author: 'Pirenko', 2499 authorUrl: 'https://www.pirenko.com', 2500 color: { 2501 color1: '#222222', 2502 color2: '#FFFFFF', 2503 color3: '#222222', 2504 bg: '#1d6bdd' 2505 } 2506}; 2507 2508console.log("%c// Coded by %câ " + _credits.author + " â%c " + _credits.authorUrl + " //", "padding:8px 5px; color:" + _credits.color.color1 + "; line-height:25px;", "padding:8px 15px; color:" + _credits.color.color2 + "; background-color:" + _credits.color.bg + "; line-height:25px;", "padding:8px 5px; color:" + _credits.color.color3 + "; line-height:25px;"); 2509 2510/* jshint ignore:end */
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.