1(function($) { 2 "use strict"; 3 4 $.fn.vc_translate_row = function() { 5 var window_scroll = $(window).scrollTop(); 6 var window_height = $(window).height(); 7 $(this).each(function(index, element) { 8 var mobile_disable = $(element).attr('data-row-effect-mobile-disable'); 9 if(typeof mobile_disable == "undefined") 10 mobile_disable = 'false'; 11 else 12 mobile_disable = mobile_disable.toString(); 13 if(! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) 14 var is_mobile = 'false'; 15 else 16 var is_mobile = 'true'; 17 if(is_mobile == 'true' && mobile_disable == 'true') 18 var disable_row_effect = 'true'; 19 else 20 var disable_row_effect = 'false'; 21 22 if(disable_row_effect == 'false') 23 { 24 var percentage = 0 25 26 var row_height = $(element).outerHeight(); 27 var row_top = $(element).offset().top; 28 var position = row_top - window_scroll; 29 var row_visible = position+row_height; 30 var pcsense = $(element).attr('data-parallax-content-sense'); 31 var sense = (pcsense/100); 32 var translate = 0; 33 34 var cut = window_height - (window_height * (percentage/100)); 35 36 if(row_visible <= cut && position <= 0) 37 { 38 if(row_height > window_height) 39 { 40 var translate = (window_height - row_visible)*sense; 41 } 42 else 43 { 44 var translate = -(position*sense); 45 } 46 if(translate < 0) 47 translate = 0; 48 } 49 else 50 { 51 translate = 0; 52 } 53 var find_class = '.upb_row_bg,.upb_video-wrapper,.ult-vc-seperator'; 54 $(element).find('.vc-row-translate-wrapper').children().each(function(index, child) { 55 if(!jQuery(child).is(find_class)) 56 { 57 $(child).css({'transform':'translate3d(0,'+translate+'px,0)', '-webkit-transform':'translate3d(0,'+translate+'px,0)', '-ms-transform':'translate3d(0,'+translate+'px,0)'}); 58 } 59 }); 60 } 61 }); 62 } //end translate function 63 64 $.fn.vc_fade_row = function() { 65 var window_scroll = $(window).scrollTop(); 66 var window_height = $(window).height(); 67 $(this).each(function(index, element) { 68 var mobile_disable = $(element).attr('data-row-effect-mobile-disable'); 69 if(typeof mobile_disable == "undefined") 70 mobile_disable = 'false'; 71 else 72 mobile_disable = mobile_disable.toString(); 73 if(! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) 74 var is_mobile = 'false'; 75 else 76 var is_mobile = 'true'; 77 if(is_mobile == 'true' && mobile_disable == 'true') 78 var disable_row_effect = 'true'; 79 else 80 var disable_row_effect = 'false'; 81 82 if(disable_row_effect == 'false') 83 { 84 var min_opacity = 0; 85 86 var percentage = $(element).data('fadeout-percentage'); 87 percentage = 100 - percentage; 88 89 var no_class = ''; 90 91 var row_height = $(element).outerHeight(); 92 var row_top = $(element).offset().top; 93 var position = row_top - window_scroll; 94 var row_bottom = position+row_height; 95 var opacity = 1; 96 97 var cut = window_height - (window_height * (percentage/100)); 98 99 var newop = (((cut-row_bottom)/cut)*(1-min_opacity)); 100 if(newop > 0) 101 opacity = 1-newop; 102 103 if(row_bottom <= cut) 104 { 105 if(opacity < min_opacity) 106 opacity = min_opacity; 107 else if(opacity > 1) 108 opacity = 1; 109 $(element).children().each(function(rindex, row_child) { 110 var find_class = '.upb_row_bg,.upb_video-wrapper,.ult-vc-seperator'; 111 if(!$(row_child).is(find_class)) 112 { 113 $(row_child).css({ 114 'opacity' : opacity 115 }); 116 } 117 }); 118 } 119 else 120 { 121 $(element).children().each(function(rindex, row_child) { 122 $(row_child).css({ 123 'opacity' : opacity 124 }); 125 }); 126 } 127 } 128 }); 129 } // end fade function 130 131 //Common documen ready event 132 jQuery(document).ready(function(){ 133 init_ultimate_spacer(); 134 }); 135 136 //Common on window scroll event 137 jQuery(window).scroll(function(){ 138 var $hideOnMobile = jQuery('.ult-no-mobile').length; 139 if(! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){ 140 animate_block(); 141 } else { 142 if($hideOnMobile >= 1) 143 jQuery(".ult-animation").css("opacity",1); 144 else 145 animate_block(); 146 } 147 $('.vc-row-fade').vc_fade_row(); 148 $('.vc-row-translate').vc_translate_row(); 149 }); 150 151 jQuery(window).load(function(){ 152 153 jQuery('.ult-banner-block-custom-height').each(function(index, element) { 154 var $blockimg = jQuery(this).find('img'); 155 var block_width = jQuery(this).width(); 156 var block_height = jQuery(this).height(); 157 var img_width = $blockimg.width(); 158 if(block_width > block_height) 159 $blockimg.css({'width':'100%','height':'auto'}); 160 }); 161 162 var flip_resize_count=0, flip_time_resize=0; 163 var flip_box_resize = function(){ 164 jQuery('.ifb-jq-height').each(function(){ 165 jQuery(this).find('.ifb-back').css('height','auto'); 166 jQuery(this).find('.ifb-front').css('height','auto');
167 var fh = parseInt(jQuery(this).find('.ifb-front > div').outerHeight(true)); 168 var bh = parseInt(jQuery(this).find('.ifb-back > div').outerHeight(true)); 169 var gr = (fh>bh)?fh:bh; 170 jQuery(this).find('.ifb-front').css('height',gr+'px'); 171 jQuery(this).find('.ifb-back').css('height',gr+'px'); 172 if(jQuery(this).hasClass('vertical_door_flip')) { 173 jQuery(this).find('.ifb-flip-box').css('height',gr+'px'); 174 } 175 else if(jQuery(this).hasClass('horizontal_door_flip')) { 176 jQuery(this).find('.ifb-flip-box').css('height',gr+'px'); 177 } 178 else if(jQuery(this).hasClass('style_9')) { 179 jQuery(this).find('.ifb-flip-box').css('height',gr+'px'); 180 } 181 }) 182 jQuery('.ifb-auto-height').each(function(){ 183 if( (jQuery(this).hasClass('horizontal_door_flip')) || (jQuery(this).hasClass('vertical_door_flip')) ){ 184 var fh = parseInt(jQuery(this).find('.ifb-front > div').outerHeight()); 185 var bh = parseInt(jQuery(this).find('.ifb-back > div').outerHeight()); 186 var gr = (fh>bh)?fh:bh; 187 jQuery(this).find('.ifb-flip-box').css('height',gr+'px'); 188 } 189 }) 190 } 191 if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1){ 192 setTimeout(function() { 193 flip_box_resize(); 194 }, 500); 195 } 196 else{ 197 flip_box_resize(); 198 } 199 jQuery(document).on('ultAdvancedTabClicked',function(event, nav){ 200 flip_box_resize(); 201 }); 202 jQuery(window).resize(function(){ 203 flip_resize_count++; 204 setTimeout(function() { 205 flip_time_resize++; 206 if(flip_resize_count == flip_time_resize){ 207 flip_box_resize(); 208 } 209 }, 500); 210 }); 211 var tiid=0; 212 var mason_des=0; 213 jQuery(window).resize(function(){ 214 ib_responsive(); 215 jQuery('.csstime.smile-icon-timeline-wrap').each(function(){ 216 timeline_icon_setting(jQuery(this)); 217 }); 218 $('.jstime .timeline-wrapper').each(function(){ 219 timeline_icon_setting(jQuery(this)); 220 }); 221 if(jQuery('.smile-icon-timeline-wrap.jstime .timeline-line').css('display')=='none'){ 222 if(mason_des===0){ 223 $('.jstime .timeline-wrapper').masonry('destroy'); 224 mason_des=1; 225 } 226 }else{ 227 if(mason_des==1){ 228 jQuery('.jstime .timeline-wrapper').masonry({ 229 "itemSelector": '.timeline-block', 230 }); 231 setTimeout(function() { 232 jQuery('.jstime .timeline-wrapper').masonry({ 233 "itemSelector": '.timeline-block', 234 }); 235 jQuery(this).find('.timeline-block').each(function(){ 236 if(jQuery(this).css('left')=='0px'){ 237 jQuery(this).addClass('timeline-post-left'); 238 } 239 else{ 240 jQuery(this).addClass('timeline-post-right'); 241 } 242 }); 243 mason_des=0; 244 }, 300); 245 } 246 } 247 }); 248 $('.smile-icon-timeline-wrap').each(function(){ 249 var cstm_width = jQuery(this).data('timeline-cutom-width'); 250 if(cstm_width){ 251 jQuery(this).css('width',((cstm_width*2)+40)+'px'); 252 } 253 var width = parseInt(jQuery(this).width()); 254 var b_wid = parseInt(jQuery(this).find('.timeline-block').width()); 255 var l_pos = (b_wid/width)*100; 256 var time_r_margin = (width - (b_wid*2) - 40); 257 time_r_margin = (time_r_margin/width)*100; 258 $('.jstime .timeline-wrapper').each(function(){ 259 jQuery(this).masonry({ 260 "itemSelector": '.timeline-block', 261 }); 262 }); 263 setTimeout(function() { 264 $('.jstime .timeline-wrapper').each(function(){ 265 jQuery(this).find('.timeline-block').each(function(){ 266 if(jQuery(this).css('left')=='0px'){ 267 jQuery(this).addClass('timeline-post-left'); 268 } 269 else{ 270 jQuery(this).addClass('timeline-post-right'); 271 } 272 timeline_icon_setting(jQuery(this)); 273 }); 274 jQuery('.timeline-block').each(function(){ 275 var div=parseInt(jQuery(this).css('top'))-parseInt(jQuery(this).next().css('top')); 276 if((div < 14 && div > 0)|| div==0) { 277 jQuery(this).next().addClass('time-clash-right'); 278 } 279 else if(div > -14){ 280 jQuery(this).next().addClass('time-clash-left'); 281 } 282 }) 283 jQuery('.smile-icon-timeline-wrap').each(function(){ 284 var block_bg =jQuery(this).data('time_block_bg_color'); 285 jQuery(this).find('.timeline-block').css('background-color',block_bg); 286 jQuery(this).find('.timeline-post-left.timeline-block l').css('border-left-color',block_bg); 287 jQuery(this).find('.timeline-post-right.timeline-block l').css('border-right-color',block_bg); 288 jQuery(this).find('.feat-item').css('background-color',block_bg); 289 if(jQuery(this).find('.feat-item').find('.feat-top').length > 0) 290 jQuery(this).find('.feat-item l').css('border-top-color',block_bg); 291 else 292 jQuery(this).find('.feat-item l').css('border-bottom-color',block_bg); 293 }) 294 jQuery('.jstime.timeline_preloader').remove(); 295 jQuery('.smile-icon-timeline-wrap.jstime').css('opacity','1'); 296 }); 297 jQuery('.timeline-post-right').each(function(){ 298 var cl = jQuery(this).find('.timeline-icon-block').clone(); 299 jQuery(this).find('.timeline-icon-block').remove(); 300 jQuery(this).find('.timeline-header-block').after(cl); 301 }) 302 }, 1000); 303 jQuery(this).find('.timeline-wrapper').each(function(){ 304 if(jQuery(this).text().trim()===''){ 305 jQuery(this).remove(); 306 } 307 }); 308 if( ! jQuery(this).find('.timeline-line ').next().hasClass('timeline-separator-text')){ 309 jQuery(this).find('.timeline-line').prepend('<o></o>'); 310 } 311 var sep_col = jQuery(this).data('time_sep_color'); 312 var sep_bg =jQuery(this).data('time_sep_bg_color'); 313 var line_color = jQuery('.smile-icon-timeline-wrap .timeline-line').css('border-right-color'); 314 jQuery(this).find('.timeline-dot').css('background-color',sep_bg); 315 jQuery(this).find('.timeline-line z').css('background-color',sep_bg); 316 jQuery(this).find('.timeline-line o').css('background-color',sep_bg); 317 jQuery(this).find('.timeline-separator-text').css('color',sep_col); 318 jQuery(this).find('.timeline-separator-text .sep-text').css('background-color',sep_bg); 319 jQuery(this).find('.ult-timeline-arrow s').css('border-color','rgba(255, 255, 255, 0) '+line_color); 320 jQuery(this).find('.feat-item .ult-timeline-arrow s').css('border-color',line_color+' rgba(255, 255, 255, 0)'); 321 jQuery(this).find('.timeline-block').css('border-color',line_color); 322 jQuery(this).find('.feat-item').css('border-color',line_color); 323 }); 324 // jQuery('.timeline-block').each(function(){ 325 // var link_b = $(this).find('.link-box').attr('href'); 326 // var link_t = $(this).find('.link-title').attr('href'); 327 // if(link_b){ 328 // jQuery(this).wrap('<a href='+link_b+'></a>') 329 // } 330 // if(link_t){ 331 // jQuery(this).find('.ult-timeline-title').wrap('<a href='+link_t+'></a>') 332 // } 333 // }); 334 // jQuery('.feat-item').each(function(){ 335 // var link_b = $(this).find('.link-box').attr('href'); 336 // if(link_b){ 337 // jQuery(this).wrap('<a href='+link_b+'></a>') 338 // } 339 // }); 340 }); // end window load event 341 342 jQuery(document).ready(function($) { 343 var $hideOnMobile = jQuery('.ult-no-mobile').length; 344 345 if(! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) 346 { 347 animate_block(); 348 } else { 349 if($hideOnMobile >= 1) 350 jQuery(".ult-animation").css("opacity",1); 351 else 352 animate_block(); 353 } 354 ib_responsive(); 355 356 jQuery(".ubtn").hover( 357 function(){ 358 var $this = jQuery(this); 359 $this.find(".ubtn-text").css("color",$this.data('hover')); 360 $this.find(".ubtn-hover").css("background",$this.data('hover-bg')).addClass('ubtn-hover-active'); 361 var hover_bg = ($this.data('hover-bg') != '') ? $this.data('hover-bg') : false;
362 setTimeout(function(){ 363 if(hover_bg !== false) { 364 if($this.hasClass('.ubtn-fade-bg')) { 365 $this.css("background",$this.data('hover-bg')); 366 } 367 } 368 },150); 369 var old_style = $this.attr('style'); 370 if($this.data('shadow-hover') != ''){ 371 var old_shadow = $this.css('box-shadow'); 372 //console.log(old_shadow); 373 old_style += 'box-shadow:'+$this.data('shadow-hover'); 374 } 375 $this.attr('style', old_style); 376 if($this.data('border-hover') != '') 377 { 378 $this.css("border-color",$this.data('border-hover')); 379 } 380 if($this.data('shadow-click') != 'none') 381 { 382 var temp_adj = $this.data('shd-shadow')-3; 383 if($this.is('.shd-left') != '') 384 $this.css({ 'right':temp_adj}); 385 else if($this.is('.shd-right') != '') 386 $this.css({ 'left':temp_adj }); 387 else if($this.is('.shd-top') != '') 388 $this.css({ 'bottom':temp_adj }); 389 else if($this.is('.shd-bottom') != '') 390 $this.css({ 'top':temp_adj }); 391 } 392 }, 393 function(){ 394 var $this = jQuery(this); 395 $this.find(".ubtn-text").removeAttr('style'); 396 $this.find(".ubtn-hover").removeClass('ubtn-hover-active'); 397 //$this.find(".ubtn-hover").removeAttr('style'); 398 $this.css("background",$this.data('bg')); 399 var border_color = $this.data('border-color'); 400 var old_style = $this.attr('style'); 401 if($this.data('shadow-hover') != '') 402 old_style += 'box-shadow:'+$this.data('shadow'); 403 $this.attr('style', old_style); 404 if($this.data('border-hover') != '') 405 { 406 $this.css("border-color",border_color); 407 } 408 if($this.data('shadow-click') != 'none') 409 { 410 $this.removeClass('no-ubtn-shadow'); 411 if($this.is('.shd-left') != '') 412 $this.css({ 'right':'auto'}); 413 else if($this.is('.shd-right') != '') 414 $this.css({ 'left':'auto' }); 415 else if($this.is('.shd-top') != '') 416 $this.css({ 'bottom':'auto' }); 417 else if($this.is('.shd-bottom') != '') 418 $this.css({ 'top':'auto' }); 419 } 420 } 421 ); 422 423 jQuery(".ubtn").on("focus blur mousedown mouseup", function(e) { 424 var $this = jQuery(this); 425 if($this.data('shadow-click') != 'none') 426 { 427 setTimeout(function() { 428 if($this.is( ":focus" )) 429 { 430 $this.addClass("no-ubtn-shadow"); 431 if($this.is('.shd-left') != '') 432 $this.css({ 'right':$this.data('shd-shadow')+'px'}); 433 else if($this.is('.shd-right') != '') 434 $this.css({ 'left':$this.data('shd-shadow')+'px' }); 435 else if($this.is('.shd-top') != '') 436 $this.css({ 'bottom':$this.data('shd-shadow')+'px' }); 437 else if($this.is('.shd-bottom') != '') 438 $this.css({ 'top':$this.data('shd-shadow')+'px' }); 439 } 440 else 441 { 442 $this.removeClass("no-ubtn-shadow"); 443 if($this.is('.shd-left') != '') 444 $this.css({ 'right':'auto'}); 445 else if($this.is('.shd-right') != '') 446 $this.css({ 'left':'auto' }); 447 else if($this.is('.shd-top') != '') 448 $this.css({ 'bottom':'auto' }); 449 else if($this.is('.shd-bottom') != '') 450 $this.css({ 'top':'auto' }); 451 } 452 }, 0 ); 453 } 454 }); 455 jQuery(".ubtn").focusout(function(){ 456 var $this = jQuery(this); 457 $this.removeClass("no-ubtn-shadow"); 458 if($this.is('.shd-left') != '') 459 $this.css({ 'right':'auto'}); 460 else if($this.is('.shd-right') != '') 461 $this.css({ 'left':'auto' }); 462 else if($this.is('.shd-top') != '') 463 $this.css({ 'bottom':'auto' }); 464 else if($this.is('.shd-bottom') != '') 465 $this.css({ 'top':'auto' }); 466 }); 467 468 469 jQuery('.smile-icon-timeline-wrap.jstime').css('opacity','0'); 470 jQuery('.jstime.timeline_preloader').css('opacity','1'); 471 jQuery('.smile-icon-timeline-wrap.csstime .timeline-wrapper').each(function(){ 472 jQuery('.csstime .timeline-block:even').addClass('timeline-post-left'); 473 jQuery('.csstime .timeline-block:odd').addClass('timeline-post-right'); 474 }) 475 jQuery('.csstime .timeline-post-right').each(function(){ 476 jQuery(this).css('float','right'); 477 jQuery("<div style='clear:both'></div>").insertAfter(jQuery(this)); 478 }) 479 jQuery('.csstime.smile-icon-timeline-wrap').each(function(){ 480 var block_bg =jQuery(this).data('time_block_bg_color'); 481 jQuery(this).find('.timeline-block').css('background-color',block_bg); 482 jQuery(this).find('.timeline-post-left.timeline-block l').css('border-left-color',block_bg); 483 jQuery(this).find('.timeline-post-right.timeline-block l').css('border-right-color',block_bg); 484 jQuery(this).find('.feat-item').css('background-color',block_bg); 485 if(jQuery(this).find('.feat-item').find('.feat-top').length > 0) 486 jQuery(this).find('.feat-item l').css('border-top-color',block_bg); 487 else 488 jQuery(this).find('.feat-item l').css('border-bottom-color',block_bg); 489 timeline_icon_setting(jQuery(this)); 490 }) 491 // CSS3 Transitions. 492 jQuery('.aio-icon, .aio-icon-img, .flip-box, .ultb3-info, .icon_list_icon, .ult-banner-block, .uavc-list-icon, .ult_tabs, .icon_list_connector').each(function(){ 493 if(jQuery(this).attr('data-animation')) { 494 var animationName = jQuery(this).attr('data-animation'), 495 animationDelay = "delay-"+jQuery(this).attr('data-animation-delay'); 496 if(typeof animationName === 'undefined' || animationName === '') 497 return false;
498 $(this).bsf_appear(function() { 499 var $this = jQuery(this); 500 //$this.css('opacity','0'); 501 //setTimeout(function(){ 502 $this.addClass('animated').addClass(animationName); 503 $this.addClass('animated').addClass(animationDelay); 504 //$this.css('opacity','1'); 505 //},1000); 506 }); 507 } 508 }); 509 // Icon Tabs 510 // Stats Counter 511 jQuery('.stats-block').each(function() { 512 $(this).bsf_appear(function() { 513 var endNum = parseFloat(jQuery(this).find('.stats-number').data('counter-value')); 514 var Num = (jQuery(this).find('.stats-number').data('counter-value'))+' '; 515 var speed = parseInt(jQuery(this).find('.stats-number').data('speed')); 516 var ID = jQuery(this).find('.stats-number').data('id'); 517 var sep = jQuery(this).find('.stats-number').data('separator'); 518 var dec = jQuery(this).find('.stats-number').data('decimal'); 519 var dec_count = Num.split("."); 520 if(dec_count[1]){ 521 dec_count = dec_count[1].length-1; 522 } else { 523 dec_count = 0; 524 } 525 var grouping = true; 526 if(dec == "none"){ 527 dec = ""; 528 } 529 if(sep == "none"){ 530 grouping = false; 531 } else { 532 grouping = true; 533 } 534 var settings = { 535 useEasing : true, 536 useGrouping : grouping, 537 separator : sep, 538 decimal : dec 539 } 540 var counter = new countUp(ID, 0, endNum, dec_count, speed, settings); 541 setTimeout(function(){ 542 counter.start(); 543 },500); 544 }); 545 }); 546 // Flip-box 547 if(! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) 548 var is_touch_device = false; 549 else 550 var is_touch_device = true; 551 552 jQuery('#page').click(function(){ 553 jQuery('.ifb-hover').removeClass('ifb-hover'); 554 }); 555 if(!is_touch_device){ 556 jQuery('.ifb-flip-box').hover(function(event){ 557 event.stopPropagation(); 558 jQuery(this).addClass('ifb-hover'); 559 },function(event){ 560 event.stopPropagation(); 561 jQuery(this).removeClass('ifb-hover'); 562 }); 563 } 564 jQuery('.ifb-flip-box').each(function(index, element) { 565 if(jQuery(this).parent().hasClass('style_9')) { 566 jQuery(this).hover(function(){ 567 jQuery(this).addClass('ifb-door-hover'); 568 }, 569 function(){ 570 jQuery(this).removeClass('ifb-door-hover'); 571 }) 572 jQuery(this).on('click',function(){ 573 jQuery(this).toggleClass('ifb-door-right-open'); 574 jQuery(this).removeClass('ifb-door-hover'); 575 }); 576 } 577 }); 578 jQuery('.ifb-flip-box').click(function(event){ 579 event.stopPropagation(); 580 jQuery(document).trigger('ultFlipBoxClicked', jQuery(this)); 581 if(jQuery(this).hasClass('ifb-hover')){ 582 jQuery(this).removeClass('ifb-hover'); 583 } 584 else{ 585 jQuery('.ifb-hover').removeClass('ifb-hover'); 586 jQuery(this).addClass('ifb-hover'); 587 } 588 }); 589 590 //Flipbox 591 //Vertical Door Flip 592 jQuery('.vertical_door_flip .ifb-front').each(function() { 593 jQuery(this).wrap('<div class="v_door ifb-multiple-front ifb-front-1"></div>'); 594 jQuery(this).parent().clone().removeClass('ifb-front-1').addClass('ifb-front-2').insertAfter(jQuery(this).parent()); 595 }); 596 //Reverse Vertical Door Flip 597 jQuery('.reverse_vertical_door_flip .ifb-back').each(function() { 598 jQuery(this).wrap('<div class="rv_door ifb-multiple-back ifb-back-1"></div>'); 599 jQuery(this).parent().clone().removeClass('ifb-back-1').addClass('ifb-back-2').insertAfter(jQuery(this).parent()); 600 }); 601 //Horizontal Door Flip 602 jQuery('.horizontal_door_flip .ifb-front').each(function() { 603 jQuery(this).wrap('<div class="h_door ifb-multiple-front ifb-front-1"></div>'); 604 jQuery(this).parent().clone().removeClass('ifb-front-1').addClass('ifb-front-2').insertAfter(jQuery(this).parent()); 605 }); 606 //Reverse Horizontal Door Flip 607 jQuery('.reverse_horizontal_door_flip .ifb-back').each(function() { 608 jQuery(this).wrap('<div class="rh_door ifb-multiple-back ifb-back-1"></div>'); 609 jQuery(this).parent().clone().removeClass('ifb-back-1').addClass('ifb-back-2').insertAfter(jQuery(this).parent()); 610 }); 611 //Stlye 9 front 612 jQuery('.style_9 .ifb-front').each(function() { 613 jQuery(this).wrap('<div class="new_style_9 ifb-multiple-front ifb-front-1"></div>'); 614 jQuery(this).parent().clone().removeClass('ifb-front-1').addClass('ifb-front-2').insertAfter(jQuery(this).parent()); 615 }); 616 //Style 9 back 617 jQuery('.style_9 .ifb-back').each(function() { 618 jQuery(this).wrap('<div class="new_style_9 ifb-multiple-back ifb-back-1"></div>'); 619 jQuery(this).parent().clone().removeClass('ifb-back-1').addClass('ifb-back-2').insertAfter(jQuery(this).parent()); 620 }); 621 var is_safari = /^((?!chrome).)*safari/i.test(navigator.userAgent); 622 if( is_safari ){ 623 jQuery('.vertical_door_flip').each(function(index, element) { 624 var safari_link = jQuery(this).find('.flip_link').outerHeight(); 625 jQuery(this).find('.flip_link').css('top', - safari_link/2 +'px'); 626 jQuery(this).find('.ifb-multiple-front').css('width', '50.2%'); 627 }); 628 jQuery('.horizontal_door_flip').each(function(index, element) { 629 var safari_link = jQuery(this).find('.flip_link').outerHeight(); 630 jQuery(this).find('.flip_link').css('top', - safari_link/2 +'px'); 631 jQuery(this).find('.ifb-multiple-front').css('height','50.2%'); 632 }); 633 jQuery('.reverse_vertical_door_flip').each(function(index, element) { 634 var safari_link = jQuery(this).find('.flip_link').outerHeight(); 635 jQuery(this).find('.flip_link').css('top', - safari_link/2 +'px'); 636 }); 637 jQuery('.reverse_horizontal_door_flip').each(function(index, element) { 638 var safari_link = jQuery(this).find('.flip_link').outerHeight(); 639 jQuery(this).find('.flip_link').css('top', - safari_link/2 +'px'); 640 jQuery(this).find('.ifb-back').css('position', 'inherit'); 641 }); 642 } 643 //Info Box 644 jQuery('.square_box-icon').each(function(index, element) { 645 var $box = jQuery(this); 646 if(jQuery(this).find('.aio-icon-img').length > 0) 647 { 648 var $icon = jQuery(this).find('.aio-icon-img'); 649 info_box_adjust_icon($box, $icon, 'img'); 650 $icon.find('.img-icon').load(function(){ 651 info_box_adjust_icon($box, $icon, 'icon'); 652 }); 653 } 654 else 655 { 656 var $icon = jQuery(this).find('.aio-icon'); 657 info_box_adjust_icon($box, $icon, 'icon'); 658 jQuery(window).load(function(){ 659 info_box_adjust_icon($box, $icon, 'icon'); 660 }); 661 } 662 }); 663 664 }); //end document ready event 665 666 function info_box_adjust_icon($box, $icon, icon_type) { 667 if(icon_type === 'img') 668 { 669 var ib_box_style_icon_height = parseInt($icon.outerHeight()); 670 var ib_padding = ib_box_style_icon_height/2; 671 $box.css('padding-top', ib_padding+'px'); 672 $box.parent().css('margin-top', ib_padding+20+'px'); 673 $icon.css('top', - ib_box_style_icon_height+'px'); 674 } 675 else 676 { 677 var ib_box_style_icon_height = parseInt($icon.outerHeight()); 678 var ib_padding = ib_box_style_icon_height/2; 679 $box.css('padding-top', ib_padding+'px'); 680 $box.parent().css('margin-top', ib_padding+20+'px'); 681 $icon.css('top', - ib_box_style_icon_height+'px'); 682 } 683 } 684 685 function timeline_icon_setting(ele) //setting to est icon if any 686 { 687 if(ele.find('.timeline-icon-block').length > 0) 688 { 689 $('.timeline-block').each(function(index, element) { 690 var $hbblock = $(this).find('.timeline-header-block'); 691 var $icon = $(this).find('.timeline-icon-block'); 692 $icon.css({'position':'absolute'}); 693 var icon_height = $icon.outerHeight(); 694 var icon_width = $icon.outerWidth(); 695 var diff_pos = -(icon_width/2); 696 var padding_fixer = parseInt($hbblock.find('.timeline-header').css('padding-left').replace ( /[^\d.]/g, '' )); 697 if($(this).hasClass('timeline-post-left')) 698 { 699 $icon.css({'left':diff_pos,'right':'auto'}); 700 $hbblock.css({'padding-left':((icon_width/2)+padding_fixer)+'px'}); 701 } 702 else if($(this).hasClass('timeline-post-right')) 703 { 704 $icon.css({'left':'auto','right':diff_pos}); 705 $hbblock.css({'padding-right':((icon_width/2)+padding_fixer)+'px'}); 706 } 707 var blheight = $hbblock.height(); 708 var blmidheight = blheight/2; 709 var icon_mid_height = icon_height/2; 710 var diff = blmidheight - icon_mid_height; 711 $icon.css({'top':diff}); 712 var tleft = $icon.offset().left; 713 var winw = $(window).width(); 714 715 if(0 > tleft || winw < (tleft+icon_width)) 716 { 717 $icon.css({'position':'relative','top':'auto','left':'auto','right':'auto','text-align':'center'}); 718 $icon.children().children().css({'margin':'10px auto'}); 719 $hbblock.css({'padding':'0'}); 720 } 721 }); 722 } 723 } 724 725 // CSS3 Transitions. 726 function animate_block(){ 727 jQuery('.ult-animation').each(function(){ 728 if(jQuery(this).attr('data-animate')) { 729 //var child = jQuery(this).children('div'); 730 var child2 = jQuery(this).children('*'); 731 //var child = jQuery('.ult-animation > *'); 732 //console.log(child); 733 var animationName = jQuery(this).attr('data-animate'), 734 animationDuration = jQuery(this).attr('data-animation-duration')+'s', 735 animationIteration = jQuery(this).attr('data-animation-iteration'), 736 animationDelay = jQuery(this).attr('data-animation-delay'), 737 animationViewport = jQuery(this).attr('data-opacity_start_effect'); 738 var style = 'opacity:1;-webkit-animation-delay:'+animationDelay+'s;-webkit-animation-duration:'+animationDuration+';-webkit-animation-iteration-count:'+animationIteration+'; -moz-animation-delay:'+animationDelay+'s;-moz-animation-duration:'+animationDuration+';-moz-animation-iteration-count:'+animationIteration+'; animation-delay:'+animationDelay+'s;animation-duration:'+animationDuration+';animation-iteration-count:'+animationIteration+';'; 739 var container_style = 'opacity:1;-webkit-transition-delay: '+(animationDelay)+'s; -moz-transition-delay: '+(animationDelay)+'s; transition-delay: '+(animationDelay)+'s;'; 740 741 if(isAppear(jQuery(this))){ 742 //jQuery(this).css('opacity','1'); 743 var p_st = jQuery(this).attr('style'); 744 if(typeof(p_st) == 'undefined'){ 745 p_st = 'test'; 746 } 747 p_st = p_st.replace(/ /g,''); 748 if(p_st == 'opacity:0;'){ 749 if( p_st.indexOf(container_style) !== 0 ){ 750 jQuery(this).attr('style',container_style); 751 } 752 } 753 jQuery.each(child2,function(index,value){ 754 var $this = jQuery(value); 755 var prev_style = $this.attr('style'); 756 if(typeof(prev_style) == 'undefined'){ 757 prev_style = 'test'; 758 } 759 var new_style = ''; 760 if( prev_style.indexOf(style) == 0 ){ 761 new_style = prev_style; 762 } else { 763 new_style = style+prev_style; 764 } 765 $this.attr('style',new_style); 766 if(isAppear($this)){ 767 $this.addClass('animated').addClass(animationName); 768 } 769 }); 770 } 771 } 772 }); 773 } 774 775 function isAppear(id){ 776 var window_scroll = jQuery(window).scrollTop(); 777 var window_height = jQuery(window).height(); 778 779 if(jQuery(id).hasClass('ult-animate-viewport')) 780 var start_effect = jQuery(id).data('opacity_start_effect'); 781 782 if(typeof(start_effect) === 'undefined' || start_effect == '') 783 var percentage = 2; 784 else 785 var percentage = 100 - start_effect; 786 787 var element_height = jQuery(id).outerHeight(); 788 var element_top = jQuery(id).offset().top; 789 var position = element_top - window_scroll; 790 791 var cut = window_height - (window_height * (percentage/100)); 792 if(position <= cut) 793 return true; 794 else 795 return false;
796 }; 797 798 // function for IB responsive 799 function ib_responsive(){ 800 var new_ib = jQuery(".ult-new-ib"); 801 new_ib.each(function(index, element) { 802 var $this = jQuery(this); 803 if($this.hasClass("ult-ib-resp")){ 804 var w = jQuery(document).width(); 805 var ib_min = $this.data("min-width"); 806 var ib_max = $this.data("max-width"); 807 if(w <= ib_max && w >= ib_min){ 808 $this.find(".ult-new-ib-content").hide(); 809 } else { 810 $this.find(".ult-new-ib-content").show(); 811 } 812 } 813 }); 814 } 815 816 //function for resize spacer 817 function init_ultimate_spacer() 818 { 819 var css = ''; 820 $('.ult-spacer').each(function(i,spacer){ 821 var uid = $(spacer).data('id'); 822 var body_width = $("body").width(); 823 var height_on_mob = $(spacer).data('height-mobile'); 824 var height_on_mob_landscape = $(spacer).data('height-mobile-landscape'); 825 var height_on_tabs = $(spacer).data('height-tab'); 826 var height_on_tabs_portrait = $(spacer).data('height-tab-portrait'); 827 var height = $(spacer).data('height'); 828 829 if(height != '') 830 { 831 css += ' .spacer-'+uid+' { height:'+height+'px } '; 832 } 833 if(height_on_tabs != '' || height_on_tabs == '0' || height_on_tabs == 0) 834 { 835 css += ' @media (max-width: 1199px) { .spacer-'+uid+' { height:'+height_on_tabs+'px } } '; 836 } 837 if(typeof height_on_tabs_portrait != 'undefined' && (height_on_tabs_portrait != '' || height_on_tabs_portrait == '0' || height_on_tabs_portrait == 0)) 838 { 839 css += ' @media (max-width: 991px) { .spacer-'+uid+' { height:'+height_on_tabs_portrait+'px } } '; 840 } 841 if(typeof height_on_mob_landscape != 'undefined' && (height_on_mob_landscape != '' || height_on_mob_landscape == '0' || height_on_mob_landscape == 0)) 842 { 843 css += ' @media (max-width: 767px) { .spacer-'+uid+' { height:'+height_on_mob_landscape+'px } } '; 844 } 845 if(height_on_mob != '' || height_on_mob == '0' || height_on_mob == 0) 846 { 847 css += ' @media (max-width: 479px) { .spacer-'+uid+' { height:'+height_on_mob+'px } } '; 848 } 849 }); 850 if(css != '') 851 { 852 css = '<style>'+css+'</style>'; 853 $('head').append(css); 854 } 855 } 856 857})(jQuery); 858//ready 859/* Interactive Banner 2 */ 860jQuery(document).ready(function(){ 861 interactive_banner2(); 862 jQuery(window).load(function(){ 863 interactive_banner2(); 864 }); 865 jQuery(window).resize(function(){ 866 interactive_banner2(); 867 }); 868 869 function interactive_banner2() { 870 jQuery(".ult-new-ib").each(function(index, element) { 871 //var w_width = jQuery(window).width(); 872 //if(w_width>=768) { 873 var banner_min_height = jQuery(this).data('min-height') || ''; 874 var img_min_height = jQuery(this).find(".ult-new-ib-img").data('min-height') || ''; 875 var img_max_height = jQuery(this).find(".ult-new-ib-img").data('max-width') || ''; 876 if(banner_min_height != '') { 877 jQuery(this).addClass('ult-ib2-min-height'); 878 jQuery(this).css('height', banner_min_height); 879 jQuery(this).find(".ult-new-ib-img").removeClass('ult-ib2-toggle-size'); 880 var img_width = jQuery(this).find(".ult-new-ib-img").width(); 881 var img_height = jQuery(this).find(".ult-new-ib-img").height(); 882 var b_width = jQuery(this).width(); 883 884 if(b_width <= banner_min_height || img_height < banner_min_height) 885 jQuery(this).find(".ult-new-ib-img").addClass('ult-ib2-toggle-size'); 886 //if(banner_min_height < img_width) 887 //jQuery(this).find(".ult-new-ib-img")[0].style.setProperty( 'max-width', '100%', 'important' ); 888 //jQuery(this).find(".ult-new-ib-img").css('max-width', '100%'); 889 890 //jQuery(this).find(".ult-new-ib-img").css('min-height', img_min_height); 891 //jQuery(this).find(".ult-new-ib-img").css('max-width', img_max_height); 892 } 893 //} else { 894 // jQuery(this).removeClass('ult-ib2-min-height'); 895 // jQuery(this).css('min-height', 'initial'); 896 //jQuery(this).find(".ult-new-ib-img").css('min-height', 'initial'); 897 //jQuery(this).find(".ult-new-ib-img").css('max-width', '100%'); 898 //} 899 900 jQuery(this).hover( 901 function(){ 902 jQuery(this).find(".ult-new-ib-img").css("opacity", jQuery(this).data('hover-opacity') ); 903 }, 904 function(){ 905 jQuery(this).find(".ult-new-ib-img").css("opacity", jQuery(this).data('opacity') ); 906 } 907 ); 908 }); 909 } 910}); 911//resize map 912jQuery(document).ready(function(){ 913 function resize_uvc_map() 914 { 915 jQuery('.ultimate-map-wrapper').each(function(i,wrapelement){ 916 917 var wrap = jQuery(wrapelement).attr('id'); 918 919 if(typeof wrap === 'undefined' || wrap === '') 920 return false;
921 922 var map = jQuery(wrapelement).find('.ultimate_google_map').attr('id'); 923 var map_override = jQuery('#'+map).attr('data-map_override'); 924 925 var is_relative = 'true'; 926 927 jQuery('#'+map).css({'margin-left' : 0 }); 928 929 var ancenstor = jQuery('#'+wrap).parent(); 930 var parent = ancenstor; 931 if(map_override=='full'){ 932 ancenstor= jQuery('body'); 933 is_relative = 'false'; 934 } 935 if(map_override=='ex-full'){ 936 ancenstor= jQuery('html'); 937 is_relative = 'false'; 938 } 939 if( ! isNaN(map_override)){ 940 for(var i=0;i<map_override;i++){ 941 if(ancenstor.prop('tagName')!='HTML'){ 942 ancenstor = ancenstor.parent(); 943 }else{ 944 break; 945 } 946 } 947 } 948 949 if(map_override == 0 || map_override == '0') 950 var w = ancenstor.width(); 951 else 952 var w = ancenstor.outerWidth(); 953 954 var a_left = ancenstor.offset().left; 955 var left = jQuery('#'+map).offset().left; 956 var calculate_left = a_left - left; 957 958 jQuery('#'+map).css({'width':w}); 959 if(map_override != 0 || map_override != '0') { 960 jQuery('#'+map).css({'margin-left' : calculate_left }); 961 } 962 }); 963 } 964 resize_uvc_map(); 965 jQuery(window).load(function(){ 966 resize_uvc_map(); 967 }); 968 jQuery(window).resize(function(){ 969 resize_uvc_map(); 970 }); 971 jQuery('.ui-tabs').bind('tabsactivate', function(event, ui) { 972 if(jQuery(this).find('.ultimate-map-wrapper').length > 0) 973 { 974 resize_uvc_map(); 975 } 976 }); 977 jQuery('.ui-accordion').bind('accordionactivate', function(event, ui) { 978 if(jQuery(this).find('.ultimate-map-wrapper').length > 0) 979 { 980 resize_uvc_map(); 981 } 982 }); 983 jQuery(document).on('onUVCModalPopupOpen', function(){ 984 resize_uvc_map(); 985 }); 986 jQuery(document).on('UVCMapResize',function(){ 987 resize_uvc_map(); 988 }); 989});
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.