1jQuery(document).ready(function ($) { 2"use strict"; 3 // remove empty p 4 $('p') 5 .filter(function() { 6 return $.trim($(this).text()) === '' && $(this).children().length == 0 7 }) 8 .remove(); 9 10// Drop Down menu 11 $(".mom_dropdown ul.nav a, .top_bar ul.top_nav a").removeAttr('title'); 12 $(" .mom_dropdown ul.nav ul, .top_bar ul.top_nav ul").css({display: "none"}); // Opera Fix 13 $(".mom_dropdown ul.nav li, .top_bar ul.top_nav li").each(function() 14 { 15 var $submeun = $(this).find('ul:first'); 16 $(this).hover(function() 17 { 18 $submeun.stop().css({overflow:"hidden", height:"auto", display:"none", paddingTop:0}).slideDown(250, function() 19 { 20 $(this).css({overflow:"visible", height:"auto"}); 21 }); 22 }, 23 function() 24 { 25 $submeun.stop().slideUp(250, function() 26 { 27 $(this).css({overflow:"hidden", display:"none"}); 28 }); 29 }); 30 }); 31 32 33//main Nav 34var orgbd = $('#navigation ul.nav > li:not(.current-menu-item):not(.current-menu-ancestor) a').css('border-left-color'); 35$('#navigation ul.nav > li:not(.current-menu-item):not(.current-menu-ancestor)').hover( function() { 36 $(this).next('li').children('a').css({borderColor:'transparent'}); 37 }, function () { 38 $(this).next('li').children('a').css({borderColor:orgbd}); 39 }); 40$('#navigation ul.nav > li.current-menu-item, #navigation ul.nav > li.current-menu-ancestor').next().children('a').css('border-color', 'transparent'); 41 42$('.mom_dropdown ul.sub-menu').prevAll('a').append('<span class="subarrow"></span>'); 43if ($('#megaMenu').length) { 44 $('#navigation ul.megaMenu > li > a').append('<span class="ubm_arr"></span>'); 45} 46//Pricing table 47 $('.pricing-table .plan .plan-content ul li').wrapInner('<span></span>'); 48 $('.pricing-table .pricetable-featured').next().children('.plan_container').css('border-left', 'none'); 49 50//Accordion 51$('.accordion').each( function() { 52 var acc = $(this); 53 if (acc.hasClass('toggle_acc')) { 54 acc.find('li:first .acc_title').addClass('active'); 55 acc.find('.acc_toggle_open').addClass('active'); 56 acc.find('.acc_toggle_open').next('.acc_content').show(); 57 acc.find('.acc_toggle_close').removeClass('active'); 58 acc.find('.acc_toggle_close').next('.acc_content').hide(); 59 acc.find('.acc_title').click(function() { 60 $(this).toggleClass('active'); 61 $(this).next('.acc_content').slideToggle(); 62 }); 63 } else { 64 acc.find('li:first .acc_title').addClass('active'); 65 acc.find('.acc_title').click(function() { 66 if(!$(this).hasClass('active')) { 67 acc.find('.acc_title').removeClass('active'); 68 acc.find('.acc_content').slideUp(); 69 $(this).addClass('active'); 70 $(this).next('.acc_content').slideDown(); 71 } 72 }); 73 } 74}); 75$(".accordion").each(function () { 76 $(this).find('.acc_title').each(function(i) { 77 $(this).find('.acch_numbers').text(i+1); 78 }); 79}); 80// social icons 81if ($('.social_icons_wrap').length) { 82 $('.social_icons_wrap').each(function () { 83 var $tip_width = parseFloat($(this).find('.social_icon_tip').css('width'))/2+10; 84 $(this).find('.social_icon_tip').css('margin-left', '-'+$tip_width+'px'); 85 }); 86} 87 88//Tabs 89 if ($("ul.mom_tabs").length) { $("ul.mom_tabs").tabs("div.mom_tabs_wrap > .mom_tabs_content", { effect: 'fade'}); } 90 91//callitout 92if ($('.mom_callout').length) { 93 $('.mom_callout').each( function () { 94 if ($(this).find('.cobtr').length) { 95 var btwidth = parseFloat($(this).find('.cobtr').css('width'))+30; 96 $(this).find('.callout_content').css('margin-right',btwidth+'px'); 97 } 98 }); 99} 100/*----------------------------------------- 101* Shortcode 102*-----------------------------------------*/ 103 jQuery('.mom_button').hover( 104 function(){ 105 var $hoverbg = jQuery(this).attr('data-hoverbg'); 106 var $texthcolor = jQuery(this).attr('data-texthover'); 107 var $borderhover = jQuery(this).attr('data-borderhover'); 108 jQuery(this).css("background-color",$hoverbg); 109 jQuery(this).css("color",$texthcolor); 110 jQuery(this).css("border-color",$borderhover); 111 },function() { 112 var $bgcolor = jQuery(this).attr('data-bg'); 113 var $textColor = jQuery(this).attr('data-text'); 114 var $bordercolor = jQuery(this).attr('data-border'); 115 if($bgcolor!==undefined){ 116 jQuery(this).css("background-color",$bgcolor); 117 }else { 118 jQuery(this).css("background-color",''); 119 } 120 if($textColor!==undefined){ 121 jQuery(this).css("color",$textColor); 122 }else { 123 jQuery(this).css("color",''); 124 } 125 if($bordercolor !== undefined){ 126 jQuery(this).css("border-color",$bordercolor); 127 }else { 128 jQuery(this).css("border-color",''); 129 } 130 }); 131// Tab Current icon 132if (('ul.mom_tabs li a i').length) { 133 $('.mom_tabs_container').each(function () { 134 var $this = $(this);
135 var current_tab = $this.find('.mom_tabs li a.current i[class^="momizat-icon"]'); 136 current_tab.css('color', current_tab.attr('data-current')); 137 $this.find('.mom_tabs li a').click(function () { 138 if ($(this).hasClass('current')) { 139 var $current = $(this).find('[class^="momizat-icon"]').attr('data-current'); 140 var $orig = $(this).find('[class^="momizat-icon"]').attr('data-color'); 141 142 $this.find('.mom_tabs li a i[class^="momizat-icon"]').css('color',$orig); 143 $('[class^="momizat-icon"]', this).css('color', $current); 144 } 145 }); 146 }); 147} 148// Accordion Current icon 149if (('h2.acc_title i').length) { 150 $('.accordion').each(function () { 151 var $this = $(this); 152 var current_acc = $this.find('h2.active i[class^="momizat-icon"]'); 153 current_acc.css('color', current_acc.attr('data-current')); 154 $this.find('h2.acc_title').click(function () { 155 if ($(this).hasClass('active')) { 156 var $current = $(this).find('[class^="momizat-icon"]').attr('data-current'); 157 var $orig = $(this).find('[class^="momizat-icon"]').attr('data-color'); 158 159 $this.find('h2.acc_title i[class^="momizat-icon"]').css('color',$orig); 160 $('[class^="momizat-icon"]', this).css('color', $current); 161 } 162 }); 163 }); 164} 165 166//team members 167 var tm_cols = 2; 168 var tm_2_i = 0; 169 $(".team_member2").each(function(){ 170 tm_2_i++; 171 tm_cols = 2; 172 if (tm_2_i % tm_cols === 0) {$(this).addClass("last");} 173 }); 174 var tm_3_i = 0; 175 $(".team_member3").each(function(){ 176 tm_3_i++; 177 tm_cols = 3; 178 if (tm_3_i % tm_cols === 0) {$(this).addClass("last");} 179 }); 180 var tm_4_i = 0; 181 $(".team_member4").each(function(){ 182 tm_4_i++; 183 tm_cols = 4; 184 if (tm_4_i % tm_cols === 0) {$(this).addClass("last");} 185 }); 186 var tm_5_i = 0; 187 $(".team_member5").each(function(){ 188 tm_5_i++; 189 tm_cols = 5; 190 if (tm_5_i % tm_cols === 0) {$(this).addClass("last");} 191 }); 192$('.team_member').each( function () { 193 var socials = $(this).find('.member_social ul li'); 194 var width = 100/socials.length; 195 socials.css('width',width+'%'); 196}); 197//teaser boxes 198 var tb_cols = 2; 199 var tb_2_i = 0; 200 $(".teaser_box2").each(function(){ 201 tb_2_i++; 202 tb_cols = 2; 203 if (tb_2_i % tb_cols === 0) {$(this).addClass("last");} 204 }); 205 var tb_3_i = 0; 206 $(".teaser_box3").each(function(){ 207 tb_3_i++; 208 tb_cols = 3; 209 if (tb_3_i % tb_cols === 0) {$(this).addClass("last");} 210 }); 211 212 var tb_4_i = 0; 213 $(".teaser_box4").each(function(){ 214 tb_4_i++; 215 tb_cols = 4; 216 if (tb_4_i % tb_cols === 0) {$(this).addClass("last");} 217 }); 218 219 var tb_5_i = 0; 220 $(".teaser_box5").each(function(){ 221 tb_5_i++; 222 tb_cols = 5; 223 if (tb_5_i % tb_cols === 0) {$(this).addClass("last");} 224 }); 225 226//Mom Columns 227 var mom_cols = 2; 228 var mc_2_i = 0; 229 $(".mom_columns2").each(function(){ 230 mc_2_i++; 231 mom_cols = 2; 232 if (mc_2_i % mom_cols === 0) {$(this).addClass("last");} 233 }); 234 var mc_3_i = 0; 235 $(".mom_columns3").each(function(){ 236 mc_3_i++; 237 mom_cols = 3; 238 if (mc_3_i % mom_cols === 0) {$(this).addClass("last");} 239 }); 240 241 var mc_4_i = 0; 242 $(".mom_columns4").each(function(){ 243 mc_4_i++; 244 mom_cols = 4; 245 if (mc_4_i % mom_cols === 0) {$(this).addClass("last");} 246 }); 247 248 var mc_5_i = 0; 249 $(".mom_columns5").each(function(){ 250 mc_5_i++; 251 mom_cols = 5; 252 if (mc_5_i % mom_cols === 0) {$(this).addClass("last");} 253 }); 254 255 256//Icon Colors in hover 257jQuery('.mom_iconbox').hover( 258 function(){ 259 var icon = $(this).find('[class^="momizat-icon"]'); 260 var icon_wrap = $(this).find('.iconb_wrap'); 261 262 var $hover = icon.attr('data-hover'); 263 var $bghover = icon_wrap.attr('data-hover'); 264 var $bdhover = icon_wrap.attr('data-border_hover'); 265 266 icon.css("color",$hover); 267 icon_wrap.css("background",$bghover); 268 icon_wrap.css("border-color",$bdhover); 269},function() { 270 var icon = $(this).find('[class^="momizat-icon"]'); 271 var icon_wrap = $(this).find('.iconb_wrap'); 272 273 var $color = icon.attr('data-color'); 274 var $origcolor = icon.css('color'); 275 var $bgcolor = icon_wrap.attr('data-color'); 276 var $origbg = icon_wrap.css('background-color'); 277 var $bdcolor = icon_wrap.attr('data-border_color'); 278 var $origbd = icon_wrap.css('border-color'); 279 if($color!==undefined){ 280 icon.css("color",$color); 281 }else { 282 icon.css("color",$origcolor); 283 } 284 if($bgcolor!==undefined){ 285 icon_wrap.css("background",$bgcolor); 286 }else { 287 icon_wrap.css("background",$origbg); 288 } 289 if($bdcolor!==undefined){ 290 icon_wrap.css("border-color",$bdcolor); 291 }else { 292 } 293}); 294 295//icona 296jQuery('.mom_icona').hover( 297 function(){ 298 var icon = $(this).find('[class^="momizat-icon"]'); 299 var icon_wrap = $(this); 300 var $hover = icon.attr('data-hover'); 301 var $bghover = icon_wrap.attr('data-hover'); 302 var $bdhover = icon_wrap.attr('data-border_hover'); 303 icon.css("color",$hover); 304 icon_wrap.css("background",$bghover); 305 icon_wrap.css("border-color",$bdhover); 306},function() { 307 var icon = $(this).find('[class^="momizat-icon"]'); 308 var icon_wrap = $(this); 309 var $color = icon.attr('data-color'); 310 var $origcolor = icon.css('color'); 311 var $bgcolor = icon_wrap.attr('data-color'); 312 var $origbg = icon_wrap.css('background-color'); 313 var $bdcolor = icon_wrap.attr('data-border_color'); 314 var $origbd = icon_wrap.css('border-color'); 315 if($color!==undefined){ 316 icon.css("color",$color); 317 }else { 318 icon.css("color",$origcolor); 319 } 320 if($bgcolor!==undefined){ 321 icon_wrap.css("background",$bgcolor); 322 }else { 323 icon_wrap.css("background",$origbg); 324 } 325 if($bdcolor!==undefined){ 326 icon_wrap.css("border-color",$bdcolor); 327 }else { 328 } 329}); 330//Porfolio filter 331$('.protfolio_filter ul').each( function() { 332 var $this = $(this); 333 $this.find('li a').click(function() { 334 $this.find('li').removeClass('current'); 335 $(this).parent().addClass('current'); 336 }); 337}); 338 339//heighest col 340/* 341var highestCol = Math.max($('.bothsides_content').height(),$('.sideb').height()); 342$('.bothsides_content, .sideb').height(highestCol); 343*/ 344 345// comment form 346if($('#commentform').length) { 347$('#commentform input').each(function() { 348$(this).data('holder',$(this).attr('placeholder')); 349 350$('#commentform input').focusin(function(){ 351 $(this).attr('placeholder',''); 352}); 353$('#commentform input').focusout(function(){ 354 $(this).attr('placeholder',$(this).data('holder')); 355}); 356 }); 357$('#commentform #comment').data('holder',$('#commentform #comment').attr('placeholder')); 358 359$('#commentform #comment').focusin(function(){ 360 $(this).attr('placeholder',''); 361}); 362$('#commentform #comment').focusout(function(){ 363 $(this).attr('placeholder',$(this).data('holder')); 364}); 365} 366 367// Contact form 368if($('.mom_contact_form').length) { 369$('.mom_contact_form input').each(function() { 370 $(this).data('holder',$(this).attr('placeholder')); 371 372 $('.mom_contact_form input').focusin(function(){ 373 $(this).attr('placeholder',''); 374 }); 375 $('.mom_contact_form input').focusout(function(){ 376 $(this).attr('placeholder',$(this).data('holder')); 377 }); 378}); 379 380$('.mom_contact_form textarea').each(function() { 381 $(this).data('holder',$(this).attr('placeholder')); 382 $('.mom_contact_form textarea').focusin(function(){ 383$(this).attr('placeholder',''); 384 }); 385 $('.mom_contact_form textarea').focusout(function(){ 386$(this).attr('placeholder',$(this).data('holder')); 387 }); 388}); 389 390}
391//share 392if ($('.mom_share_buttons').length) { 393 $('.mom_share_buttons').data('height',$('.mom_share_buttons').css('height')); 394 var curHeight = $('.mom_share_buttons').height(); 395 $('.mom_share_buttons').css('height', 'auto'); 396 var autoHeight = $('.mom_share_buttons').height(); 397 $('.mom_share_buttons').css('height', curHeight); 398 $('.mom_share_it .sh_arrow').toggle(function () { 399 $('.mom_share_buttons').stop().animate({height: autoHeight}, 300); 400 $(this).find('i').removeClass(); 401 $(this).find('i').addClass('momizat-icon-193'); 402 }, function () { 403 $('.mom_share_buttons').stop().animate({height: $('.mom_share_buttons').data('height')}, 300); 404 $(this).find('i').removeClass(); 405 $(this).find('i').addClass('momizat-icon-194'); 406 }); 407} 408 409//toggles 410jQuery("h4.toggle_title").click(function () { 411 $(this).next(".toggle_content").slideToggle(); 412 $(this).toggleClass("active_toggle"); 413 $(this).parent().toggleClass("toggle_active"); 414}); 415 416$("h4.toggle_min").click(function () { 417 $(this).next(".toggle_content_min").slideToggle(); 418 $(this).toggleClass("active_toggle_min"); 419}); 420 421//scroll to top 422$('.scrollTo_top').hide(); 423 $(window).scroll(function () { 424 if( $(this).scrollTop() > 100 ) { 425 $('.scrollTo_top').fadeIn(300); 426 } 427 else { 428 $('.scrollTo_top').fadeOut(300); 429 } 430 }); 431 432 $('.scrollTo_top').click(function(){ 433 $('html, body').animate({scrollTop:0}, 500 ); 434 return false; 435 }); 436 437//lightbox 438if ($('.mom_lightbox').length) { 439$(".mom_lightbox > a").prettyPhoto({animation_speed:'fast',slideshow:10000, deeplinking: false}); 440} 441// Mobile 442if ($('.top_menu_handle').length) { 443 $('.top_menu_handle').toggle( function () { 444 $(this).next('.mobile_top_nav').show(); 445 $(this).addClass('tmh_close'); 446 }, function () { 447 $(this).next('.mobile_top_nav').hide(); 448 $(this).removeClass('tmh_close'); 449 }); 450} 451 452if ($('.mobile_main_nav_handle').length) { 453 $('.mobile_main_nav_handle').toggle( function () { 454 $(this).next('.mom_mobile_main_nav .nav').slideDown(); 455 }, function () { 456 $(this).next('.mom_mobile_main_nav .nav').slideUp(); 457 }); 458 459} 460 461$(window).resize(function() { 462 if ($(window).width() < 940) { 463 $('.video_wrap').fitVids(); 464 } 465}); 466 467 if ($(window).width() < 940) { 468 $('.video_wrap').fitVids(); 469 } 470 471 472//$("html").niceScroll(); 473 474/* 475 $('a').click(function(){ 476 $('html, body').animate({ 477 scrollTop: $('[name="' + $.attr(this, 'href').substr(1) + '"]').offset().top 478 }, 500); 479 return false; 480 }); 481 */ 482$('.animator.animated, .iconb_wrap.animated').each( function() { 483 var $this = $(this); 484 var animation = $(this).attr('data-animate'); 485 486$this.bind('inview', function(event, isInView, visiblePartX, visiblePartY) { 487 if (isInView) { 488 $(this).addClass(animation); 489 if(animation.indexOf('fade') === -1) 490 { 491 $(this).css('opacity', '1'); 492 } 493 if (visiblePartY == 'top') { 494 // top part of element is visible 495 } else if (visiblePartY == 'bottom') { 496 // bottom part of element is visible 497 } else { 498 // whole part of element is visible 499 } 500 } else { 501 // element has gone out of viewport 502 } 503}); 504 505}); 506if ($('.progress_outer').length) { 507 $('.progress_outer').each( function() { 508 var $this = $(this); 509 $this.bind('inview', function(event, isInView, visiblePartX, visiblePartY) { 510 if (isInView) { 511 $(this).find('.parograss_inner').show(); 512 $(this).find('.parograss_inner').addClass('ani-bar'); 513 if (visiblePartY == 'top') { 514 // top part of element is visible 515 } else if (visiblePartY == 'bottom') { 516 // bottom part of element is visible 517 } else { 518 // whole part of element is visible 519 } 520 } else { 521 // element has gone out of viewport 522 } 523 }); 524 525 }); 526} 527//responsive headings 528 if ($(window).width() < 767) { 529 $('h1,h2,h3,h4,h5,h6, span, .mom_google_font').each(function() { 530 var fs = parseFloat($(this).css('font-size')); 531 if (fs > 24) { 532 $(this).css('font-size','23px'); 533 } 534 }); 535 } 536 $(window).resize(function() { 537 if ($(window).width() < 767) { 538 $('h1,h2,h3,h4,h5,h6, span, .mom_google_font').each(function() { 539 var fs = parseFloat($(this).css('font-size')); 540 if (fs > 24) { 541 $(this).addClass('responsive_resize'); 542 } 543 }); 544 545 } else { 546 $('h1,h2,h3,h4,h5,h6, span, .mom_google_font').each(function() { 547 $(this).removeClass('responsive_resize'); 548 }); 549 } 550 551 }); 552//prallax bg 553if ($('.mom_custom_background').length) { 554 $('.mom_custom_background').each(function() { 555 var $this = $(this); 556 $(window).scroll(function () { 557 var speed = 8.0; 558 $this.css({backgroundPosition:(-window.pageXOffset / speed) + "px " + (-window.pageYOffset / speed) + "px"}); 559 //document.body.style.backgroundPosition = (-window.pageXOffset / speed) + "px " + (-window.pageYOffset / speed) + "px"; 560 }); 561 }); 562} 563}); //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.