1/* ===================================== 2All JavaScript fuctions Start 3======================================*/ 4 5(function ($) { 6 7 'use strict'; 8/*-------------------------------------------------------------------------------------------- 9 document.ready ALL FUNCTION START 10---------------------------------------------------------------------------------------------*/ 11 12 13//________Top Search bar Show Hide function by = custom.js________// 14 15 function site_search(){ 16 jQuery('a[href="#search"]').on('click', function(event) { 17 jQuery('#search').addClass('open'); 18 jQuery('#search > form > input[type="search"]').focus(); 19 }); 20 21 jQuery('#search, #search button.close').on('click keyup', function(event) { 22 if (event.target === this || event.target.className === 'close') { 23 jQuery(this).removeClass('open'); 24 } 25 }); 26 } 27 28 29//________Video responsive function by = custom.js________// 30 31 function video_responsive(){ 32 jQuery('iframe[src*="youtube.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>'); 33 jQuery('iframe[src*="vimeo.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>'); 34 } 35 36 37//________magnificPopup function by = magnific-popup.js________// 38 39 function magnific_popup(){ 40 jQuery('.mfp-gallery').magnificPopup({ 41 delegate: '.mfp-link', 42 type: 'image', 43 tLoading: 'Loading image #%curr%...', 44 mainClass: 'mfp-img-mobile', 45 gallery: { 46 enabled: true, 47 navigateByImgClick: true, 48 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 49 }, 50 image: { 51 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 52 } 53 }); 54 } 55 56 57//________ magnificPopup for video function by = magnific-popup.js________// 58 59 function magnific_video(){ 60 jQuery('.mfp-video').magnificPopup({ 61 type: 'iframe', 62 }); 63 } 64 65 66//________Vertically center Bootstrap modal popup function by = custom.js________// 67 68 function popup_vertical_center(){ 69 jQuery(function() { 70 function reposition() { 71 var modal = jQuery(this), 72 dialog = modal.find('.modal-dialog'); 73 modal.css('display', 'block'); 74 // Dividing by two centers the modal exactly, but dividing by three 75 // or four works better for larger screens. 76 dialog.css("margin-top", Math.max(0, (jQuery(window).height() - dialog.height()) / 2)); 77 } 78 // Reposition when a modal is shown 79 jQuery('.modal').on('show.bs.modal', reposition); 80 // Reposition when the window is resized 81 jQuery(window).on('resize', function() { 82 jQuery('.modal:visible').each(reposition); 83 }); 84 }); 85 } 86 87 88//________Main menu sticky on top when scroll down function by = custom.js ________// 89 90 function sticky_header(){ 91 if(jQuery('.sticky-header').length){ 92 var sticky = new Waypoint.Sticky({ 93 element: jQuery('.sticky-header') 94 }) 95 } 96 } 97 98 99//________page scroll top on button click function by = custom.js________// 100 101 function scroll_top(){ 102 jQuery("button.scroltop").on('click', function() { 103 jQuery("html, body").animate({ 104 scrollTop: 0 105 }, 1000); 106 return false; 107 }); 108 109 jQuery(window).on("scroll", function() { 110 var scroll = jQuery(window).scrollTop(); 111 if (scroll > 900) { 112 jQuery("button.scroltop").fadeIn(1000); 113 } else { 114 jQuery("button.scroltop").fadeOut(1000); 115 } 116 }); 117 } 118 119 120//________graph images moving function by = jquery.bgscroll.js ________// 121 function bg_moving(){ 122 jQuery( function() { 123 jQuery('.bg-moving').bgscroll({scrollSpeed:20 , direction:'h' }); 124 }); 125 } 126 127//________input type file function by = custom.js________// 128 129 function input_type_file_form(){ 130 jQuery(document).on('change', '.btn-file :file', function() { 131 var input = jQuery(this), 132 numFiles = input.get(0).files ? input.get(0).files.length : 1, 133 label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); 134 input.trigger('fileselect', [numFiles, label]); 135 }); 136 137 jQuery('.btn-file :file').on('fileselect', function(event, numFiles, label) { 138 var input = jQuery(this).parents('.input-group').find(':text'), 139 log = numFiles > 10 ? numFiles + ' files selected' : label; 140 if (input.length) { 141 input.val(log); 142 } else { 143 if (log) alert(log); 144 } 145 }); 146 } 147 148 149//________ input Placeholder in IE9 function by = custom.js________// 150 151 function placeholderSupport(){ 152 /* input placeholder for ie9 & ie8 & ie7 */ 153 jQuery.support.placeholder = ('placeholder' in document.createElement('input')); 154 /* input placeholder for ie9 & ie8 & ie7 end*/ 155 /*fix for IE7 and IE8 */ 156 if (!jQuery.support.placeholder) { 157 jQuery("[placeholder]").on('focus', function () { 158 if (jQuery(this).val() === jQuery(this).attr("placeholder")) jQuery(this).val(""); 159 }).blur(function () { 160 if (jQuery(this).val() === "") jQuery(this).val(jQuery(this).attr("placeholder")); 161 }).blur(); 162 163 jQuery("[placeholder]").parents("form").on('submit', function () { 164 jQuery(this).find('[placeholder]').each(function() { 165 if (jQuery(this).val() === jQuery(this).attr("placeholder")) { 166 jQuery(this).val(""); 167 } 168 }); 169 }); 170 } 171 /*fix for IE7 and IE8 end */ 172 } 173 174 175 176//________ footer fixed on bottom function by = custom.js________// 177 178 function footer_fixed() { 179 jQuery('.site-footer').css('display', 'block'); 180 jQuery('.site-footer').css('height', 'auto'); 181 var footerHeight = jQuery('.site-footer').outerHeight(); 182 jQuery('.footer-fixed > .page-wraper').css('padding-bottom', footerHeight); 183 jQuery('.site-footer').css('height', footerHeight); 184 } 185 186 187//________accordion active calss function by = custom.js________// 188 189 function accordion_active() { 190 $('.acod-head a').on('click', function() { 191 $('.acod-head').removeClass('acc-actives'); 192 $(this).parents('.acod-head').addClass('acc-actives'); 193 $('.acod-title').removeClass('acc-actives'); //just to make a visual sense 194 $(this).parent().addClass('acc-actives'); //just to make a visual sense 195 ($(this).parents('.acod-head').attr('class')); 196 }); 197 } 198 199 200//________Nav submenu show hide on mobile by = custom.js________// 201 function mobile_nav(){ 202 jQuery(".sub-menu").parent('li').addClass('has-child'); 203 jQuery(".mega-menu").parent('li').addClass('has-child'); 204 jQuery("<div class='fa fa-angle-right submenu-toogle'></div>").insertAfter(".has-child > a"); 205 jQuery('.has-child a+.submenu-toogle').on('click',function(ev) {
206 jQuery(this).next(jQuery('.sub-menu')).slideToggle('fast', function(){ 207 jQuery(this).parent().toggleClass('nav-active'); 208 }); 209 ev.stopPropagation(); 210 }); 211 212// jQuery('.has-child').on('click',function(ev) { 213// jQuery(this).find(jQuery('.sub-menu')).slideToggle('fast', function(){ 214// jQuery(this).parent().toggleClass('nav-active'); 215// }); 216// }); 217 218 } 219 220 221//________Home page testimonial function by = owl.carousel.js________// 222 223 function testimonial_home(){ 224 jQuery('.testimonial-home').owlCarousel({ 225 loop:true, 226 autoplay:true, 227 margin:30, 228 nav:false, 229 dots: true, 230 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 231 responsive:{ 232 0:{ 233 items:1 234 }, 235 991:{ 236 items:2 237 } 238 } 239 }); 240 } 241//________Home page testimonial function by = owl.carousel.js________// 242 function testimonial_home_2(){ 243 jQuery('.testimonial-home-2').owlCarousel({ 244 loop:true, 245 autoplay:true, 246 margin:30, 247 nav:false, 248 dots: true, 249 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 250 responsive:{ 251 0:{ 252 items:1 253 }, 254 991:{ 255 items:1 256 } 257 } 258 }); 259 } 260//________Inner page testimonial function by = owl.carousel.js________// 261 262 function inner_testimonial(){ 263 jQuery('.inner-testimonial').owlCarousel({ 264 loop:true, 265 autoplay:true, 266 margin:30, 267 nav:false, 268 dots: true, 269 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 270 responsive:{ 271 0:{ 272 items:1 273 }, 274 991:{ 275 items:1 276 } 277 } 278 }); 279 } 280//________Home page testimonial function by = owl.carousel.js________// 281 282 function about_home(){ 283 jQuery('.about-home').owlCarousel({ 284 loop:true, 285 autoplay:true, 286 margin:30, 287 nav:false, 288 dots: true, 289 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 290 responsive:{ 291 0:{ 292 items:1 293 }, 294 991:{ 295 items:1 296 } 297 } 298 }); 299 } 300 301//________home_client_carouse function by = owl.carousel.js ________// 302 303 function home_client_carousel(){ 304 jQuery('.home-client-carousel').owlCarousel({ 305 loop:true, 306 margin:10, 307 nav:true, 308 dots: false, 309 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 310 responsive:{ 311 0:{ 312 items:2 313 }, 314 480:{ 315 items:3 316 }, 317 767:{ 318 items:4 319 }, 320 1000:{ 321 items:5 322 } 323 } 324 }); 325 } 326 327 328//________home_client_carouse function by = owl.carousel.js________// 329 330 function home_client_carousel_2(){ 331 jQuery('.home-client-carousel-2').owlCarousel({ 332 loop:true, 333 margin:0, 334 autoplay:true, 335 nav:false, 336 dots: true, 337 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 338 responsive:{ 339 0:{ 340 items:2 341 }, 342 480:{ 343 items:3 344 }, 345 767:{ 346 items:4 347 }, 348 1000:{ 349 items:6 350 } 351 } 352 }); 353 } 354 355 356//________ work carousel function by = owl.carousel.js________// 357 358 function work_carousel(){ 359 jQuery('.work-carousel').owlCarousel({ 360 loop:true, 361 autoplay:false, 362 center: false, 363 items:3, 364 margin:40, 365 nav:true, 366 dots: false, 367 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 368 responsive:{ 369 0:{ 370 items:1 371 }, 372 768:{ 373 items:2 374 }, 375 991:{ 376 items:3 377 }, 378 1200:{ 379 items:4 380 } 381 382 } 383 }); 384 } 385 386//________ Similar Projects function by = owl.carousel.js________// 387 388 function similar_projects(){ 389 jQuery('.similar-projects').owlCarousel({ 390 loop:true, 391 autoplay:true, 392 center: false, 393 items:3, 394 margin:40, 395 nav:true, 396 dots: false, 397 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 398 responsive:{ 399 0:{ 400 items:1 401 }, 402 768:{ 403 items:2 404 }, 405 991:{ 406 items:3 407 }, 408 1200:{ 409 items:4 410 } 411 412 } 413 }); 414 } 415 416 417 function contact_slide(){ 418 jQuery('.contact-slide-show').on('click', function () { 419 jQuery('.contact-slide-hide').animate({'right': '0px'}); 420 }); 421 jQuery('.contact_close').on('click', function () { 422 jQuery('.contact-slide-hide').animate({'right': '-500px'}); 423 }); 424 }; 425 426 427 428//________Fade slider for home function by = owl.carousel.js________// 429 430 function aboutus_carousel(){ 431 jQuery('.about-us-carousel').owlCarousel({ 432 loop:true, 433 autoplay:true, 434 autoplayTimeout:7000, 435 margin:30, 436 nav:false, 437 navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'], 438 items:1, 439 dots: true, 440 }); 441 } 442 443 444 445//________ Login Signup Form function by = custom.js ________// 446 function Get_in_touch(){ 447 $(".input input , .input textarea").focus(function() { 448 449 $(this).parent(".input").each(function() { 450 $("label", this).css({ 451 "line-height": "18px", 452 "font-size": "12px", 453 "font-weight": "500",
454 "top": "0px" 455 }) 456 $(".spin", this).css({ 457 "width": "100%" 458 }) 459 }); 460 }).blur(function() { 461 $(".spin").css({ 462 "width": "0px" 463 }) 464 if ($(this).val() == "") { 465 $(this).parent(".input").each(function() { 466 $("label", this).css({ 467 "line-height": "40px", 468 "font-size": "12px", 469 "font-weight": "500", 470 "top": "10px" 471 }) 472 }); 473 474 } 475 }); 476 } 477/*-------------------------------------------------------------------------------------------- 478 Window on load ALL FUNCTION START 479---------------------------------------------------------------------------------------------*/ 480 481//________equal each box function by = custom.js________// 482 483 function equalheight(container) { 484 var currentTallest = 0, 485 currentRowStart = 0, 486 rowDivs = new Array(), 487 $el, topPosition = 0, 488 currentDiv = 0; 489 490 jQuery(container).each(function() { 491 $el = jQuery(this); 492 jQuery($el).height('auto'); 493 var topPostion = $el.position().top; 494 if (currentRowStart != topPostion) { 495 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 496 rowDivs[currentDiv].height(currentTallest); 497 } 498 rowDivs.length = 0; // empty the array 499 currentRowStart = topPostion; 500 currentTallest = $el.height(); 501 rowDivs.push($el); 502 } else { 503 504 rowDivs.push($el); 505 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); 506 } 507 508 for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { 509 rowDivs[currentDiv].height(currentTallest); 510 } 511 }); 512 } 513 514 515 516 517//________masonry function function by = isotope.pkgd.min.js________// 518 519 function masonryBox() { 520 if ( jQuery().isotope ) { 521 var $container = jQuery('.portfolio-wrap'); 522 $container.isotope({ 523 itemSelector: '.masonry-item', 524 transitionDuration: '1s', 525 originLeft: true, 526 stamp: '.stamp', 527 }); 528 529 jQuery('.masonry-filter li').on('click',function() { 530 var selector = jQuery(this).find("a").attr('data-filter'); 531 jQuery('.masonry-filter li').removeClass('active'); 532 jQuery(this).addClass('active'); 533 $container.isotope({ filter: selector }); 534 return false; 535 }); 536 }; 537 } 538 539 540//________background image parallax function by = stellar.js ________// 541 function bg_image_stellar(){ 542 jQuery(function(){ 543 jQuery.stellar({ 544 horizontalScrolling: false, 545 verticalOffset:100 546 }); 547 }); 548 } 549 550 551//________page loader function by = custom.js________// 552 553 function page_loader() { 554 $('.loading-area').fadeOut(1000) 555 }; 556 557 558//________skills bar function function by = custom.js ________// 559 560 561 /* 2.1 skills bar tooltips*/ 562 function progress_bar_tooltips() { 563 jQuery(function () { 564 jQuery('[data-toggle="tooltips"]').tooltip({trigger: 'manual'}).tooltip('show'); 565 }); 566 } 567 568 /* 2.2 skills bar widths*/ 569 570 function progress_bar_width() { 571 jQuery( window ).on('scroll', function() { 572 jQuery(".progress-bar").each(function(){ 573 progress_bar_width = jQuery(this).attr('aria-valuenow'); 574 jQuery(this).width(progress_bar_width + '%'); 575 }); 576 }); 577 } 578 579 580/*-------------------------------------------------------------------------------------------- 581 Window on scroll ALL FUNCTION START 582---------------------------------------------------------------------------------------------*/ 583 584 function color_fill_header() { 585 var scroll = $(window).scrollTop(); 586 if(scroll >= 100) { 587 $(".is-fixed").addClass("color-fill"); 588 } else { 589 $(".is-fixed").removeClass("color-fill"); 590 } 591 }; 592 593/*-------------------------------------------------------------------------------------------- 594 document.ready ALL FUNCTION START 595---------------------------------------------------------------------------------------------*/ 596 jQuery(document).ready(function() { 597 //________Top Search bar Show Hide function by = custom.js ________// 598 site_search(), 599 contact_slide() 600 //________graph images moving function by = jquery.bgscroll.js ________//
601 bg_moving() 602 //________Video responsive function by = custom.js ________// 603 video_responsive(), 604 //________magnificPopup function by = magnific-popup.js________// 605 magnific_popup(), 606 //________magnificPopup for video function by = magnific-popup.js________// 607 magnific_video(), 608 //________Vertically center Bootstrap modal popup function by = custom.js________// 609 popup_vertical_center(); 610 //________Main menu sticky on top when scroll down function by = custom.js ________// 611 sticky_header(), 612 //________page scroll top on button click function by = custom.js________// 613 scroll_top(), 614 //________input type file function by = custom.js ________// 615 input_type_file_form(), 616 //________ input Placeholder in IE9 function by = custom.js ________// 617 placeholderSupport(), 618 //________footer fixed on bottom function by = custom.js________// 619 footer_fixed(), 620 //________accordion active calss function by = custom.js ________// 621 accordion_active(), 622 //________ Nav submenu on off function by = custome.js________// 623 mobile_nav(), 624 //________Home page testimonial function by = owl.carousel.js________// 625 testimonial_home(), 626 //________Home page testimonial function by = owl.carousel.js________// 627 testimonial_home_2(), 628 //________Inner page testimonial function by = owl.carousel.js________// 629 inner_testimonial(), 630 //________Home page2 testimonial function by = owl.carousel.js________// 631 about_home(), 632 //________Client logo Carousel function by = owl.carousel.js________// 633 home_client_carousel(), 634 //________Client logo Carousel function by = owl.carousel.js________// 635 home_client_carousel_2(), 636 aboutus_carousel(), 637 //________ Login Signup Form function by = custom.js ________// 638 Get_in_touch() 639 640 641 }); 642 643/*-------------------------------------------------------------------------------------------- 644 Window Load START 645---------------------------------------------------------------------------------------------*/ 646 jQuery(window).on('load', function () { 647 //________equal each box function by = custom.js________// 648 equalheight(".equal-wraper .equal-col"), 649 //________masonry function function by = isotope.pkgd.min.js________// 650 masonryBox(), 651 //________background image parallax function by = stellar.js ________// 652 bg_image_stellar(), 653 //________page loader function by = custom.js________// 654 page_loader(), 655 //________work carousel function by = owl.carousel.js________// 656 work_carousel() 657 //________ Similar Projects function by = owl.carousel.js________// 658 similar_projects() 659 //________skills bar function function by = custom.js________// 660 progress_bar_tooltips(), 661 //________skills bar function function by = custom.js________// 662 progress_bar_width() 663}); 664 665 /*=========================== 666 Window Scroll ALL FUNCTION START 667===========================*/ 668 669 jQuery(window).on('scroll', function () { 670//________Window on scroll header color fill________// 671 color_fill_header() 672 673 }); 674 675/*=========================== 676 Window Resize ALL FUNCTION START 677===========================*/ 678 679 jQuery(window).on('resize', function () { 680//________ footer fixed on bottom function by = custom.js ________// 681 footer_fixed(), 682 equalheight(".equal-wraper .equal-col") 683 }); 684 685/*=========================== 686 Document on Submit FUNCTION START 687===========================*/ 688 689//________ Contact form function by = custom.js________// 690 jQuery(document).on('submit', 'form.cons-contact-form', function(e){ 691 e.preventDefault(); 692 var form = jQuery(this); 693 /* sending message */ 694 jQuery.ajax({ 695 url: 'http://7xtheme.com/shapen/form-handler.php', 696 data: form.serialize() + "&action=contactform", 697 type: 'POST', 698 dataType: 'JSON', 699 beforeSend: function() { 700 jQuery('.loading-area').show(); 701 }, 702 703 success:function(data){ 704 jQuery('.loading-area').hide(); 705 if(data['success']){ 706 jQuery("<div class='alert alert-success'>"+data['message']+"</div>").insertBefore('form.cons-contact-form'); 707 }else{ 708 jQuery("<div class='alert alert-danger'>"+data['message']+"</div>").insertBefore('form.cons-contact-form'); 709 } 710 } 711 }); 712 jQuery('.cons-contact-form').trigger("reset"); 713 return false; 714 }); 715 716 717 718 719//________ Contact form home page function by = custom.js________// 720 721 jQuery(document).on('submit', 'form.cons-contact-form2', function(e){
722 e.preventDefault(); 723 var form = jQuery(this); 724 /* sending message */ 725 726 jQuery.ajax({ 727 url: 'http://7xtheme.com/shapen/form-handler2.php', 728 data: form.serialize() + "&action=contactform", 729 type: 'POST', 730 dataType: 'JSON', 731 beforeSend: function() { 732 jQuery('.loading-area').show(); 733 734 }, 735 736 success:function(data){ 737 jQuery('.loading-area').hide(); 738 if(data['success']){ 739 jQuery("<div class='alert alert-success'>"+data['message']+"</div>").insertBefore('form.cons-contact-form2'); 740 }else{ 741 jQuery("<div class='alert alert-danger'>"+data['message']+"</div>").insertBefore('form.cons-contact-form2'); 742 } 743 } 744 }); 745 jQuery('.cons-contact-form2').trigger("reset"); 746 return false; 747 }); 748 749 750/*=========================== 751 Document on Submit FUNCTION END 752===========================*/ 753 754 755//________Switcher panal slide function END ________// 756 757 758 759 760})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.