1jQuery(function($){ 2 3var TENTERED = window.TENTERED || {}; 4 5/* ================================================== 6 Contact Form Validations 7================================================== */ 8 TENTERED.ContactForm = function(){ 9 $('.contact-form').each(function(){ 10 var formInstance = $(this); 11 formInstance.submit(function(){ 12 13 var action = $(this).attr('action'); 14 15 $("#message").slideUp(750,function() { 16 $('#message').hide(); 17 18 $('#submit') 19 .after('<img src="images/ajax-loader.gif" class="loader" />') 20 .attr('disabled','disabled'); 21 22 $.post(action, { 23 name: $('#name').val(), 24 email: $('#email').val(), 25 phone: $('#phone').val(), 26 subject: $('#subject').val(), 27 comments: $('#comments').val() 28 }, 29 function(data){ 30 document.getElementById('message').innerHTML = data; 31 $('#message').slideDown('slow'); 32 $('.contact-form img.loader').fadeOut('slow',function(){$(this).remove()}); 33 $('#submit').removeAttr('disabled'); 34 if(data.match('success') != null) $('.contact-form').slideUp('slow'); 35 36 } 37 ); 38 }); 39 return false; 40 }); 41 }); 42 } 43 44/* ================================================== 45 Search Bar 46================================================== */ 47 TENTERED.SearchBar = function(){ 48 $(".search-icon #open").click(function(){ 49 $(".search-icon #open").hide(); 50 $(".search-icon #close").css("display","block"); 51 $("#search-box").show(); 52 return false; 53 }); 54 $(".search-icon #close").click(function(){ 55 $(".search-icon #close").hide(); 56 $(".search-icon #open").css("display","block"); 57 $("#search-box").hide(); 58 return false; 59 }); 60 } 61 62/* ================================================== 63 Responsive Nav Menu 64================================================== */ 65 TENTERED.navMenu = function() { 66 // Responsive Menu Events 67 $("#main-menu").clone().appendTo(".mobile-menu > div > div"); 68 $(".mmenu-toggle").click(function(){ 69 $(".mobile-menu").slideToggle(); 70 $(".site-header").toggleClass("sticktr"); 71 }); 72 } 73/* ================================================== 74 Sticky Animated Nav Menu 75================================================== */ 76 TENTERED.stickyanimated = function() { 77 } 78/* ================================================== 79 Scroll to Top 80================================================== */ 81 TENTERED.scrollToTop = function(){ 82 var windowWidth = $(window).width(), 83 didScroll = false; 84 85 var $arrow = $('#back-to-top'); 86 87 $arrow.click(function(e) { 88 $('body,html').animate({ scrollTop: "0" }, 750, 'easeOutExpo' ); 89 e.preventDefault(); 90 }) 91 92 $(window).scroll(function() { 93 didScroll = true; 94 }); 95 96 setInterval(function() { 97 if( didScroll ) { 98 didScroll = false; 99 100 if( $(window).scrollTop() > 800 ) { 101 $arrow.fadeIn(); 102 } else { 103 $arrow.fadeOut(); 104 } 105 } 106 }, 250); 107 } 108/* ================================================== 109 Accordion 110================================================== */ 111 TENTERED.accordion = function(){ 112 var accordion_trigger = $('.accordion-heading.accordionize'); 113 114 accordion_trigger.delegate('.accordion-toggle','click', function(event){ 115 if($(this).hasClass('active')){ 116 $(this).removeClass('active'); 117 $(this).addClass('inactive'); 118 } 119 else{ 120 accordion_trigger.find('.active').addClass('inactive'); 121 accordion_trigger.find('.active').removeClass('active'); 122 $(this).removeClass('inactive'); 123 $(this).addClass('active'); 124 } 125 event.preventDefault(); 126 }); 127 } 128/* ================================================== 129 Toggle 130================================================== */ 131 TENTERED.toggle = function(){ 132 var accordion_trigger_toggle = $('.accordion-heading.togglize'); 133 134 accordion_trigger_toggle.delegate('.accordion-toggle','click', function(event){ 135 if($(this).hasClass('active')){ 136 $(this).removeClass('active'); 137 $(this).addClass('inactive'); 138 } 139 else{ 140 $(this).removeClass('inactive'); 141 $(this).addClass('active'); 142 } 143 event.preventDefault(); 144 }); 145 } 146/* ================================================== 147 Tooltip 148================================================== */ 149 TENTERED.toolTip = function(){ 150 $('a[data-toggle=tooltip]').tooltip(); 151 } 152/* ================================================== 153 Pricing Tables 154================================================== */ 155 var $tallestCol; 156 TENTERED.pricingTable = function(){ 157 $('.pricing-table').each(function(){ 158 $tallestCol = 0; 159 $(this).find('> div .features').each(function(){ 160 ($(this).height() > $tallestCol) ? $tallestCol = $(this).height() : $tallestCol = $tallestCol; 161 }); 162 if($tallestCol == 0) $tallestCol = 'auto'; 163 $(this).find('> div .features').css('height',$tallestCol); 164 }); 165 } 166 167/* ================================================== 168 IsoTope Portfolio 169================================================== */
170 TENTERED.IsoTope = function() { 171 172 $("ul.sort-source").each(function() { 173 var source = $(this); 174 var destination = $("ul.sort-destination[data-sort-id=" + $(this).attr("data-sort-id") + "]"); 175 176 if(destination.get(0)) { 177 178 var minParagraphHeight = 0; 179 var paragraphs = $("span.thumb-info-caption p", destination); 180 181 paragraphs.each(function() { 182 if($(this).height() > minParagraphHeight) 183 minParagraphHeight = ($(this).height() + 10); 184 }); 185 186 paragraphs.height(minParagraphHeight); 187 188 $(window).load(function() { 189 190 $(".portfolio-item").show(); 191 destination.isotope({ 192 itemSelector: "li", 193 layoutMode: 'sloppyMasonry' 194 }); 195 196 source.find("a").click(function(e) { 197 198 e.preventDefault(); 199 200 var $this = $(this), 201 filter = $this.parent().attr("data-option-value"); 202 203 source.find("li.active").removeClass("active"); 204 $this.parent().addClass("active"); 205 206 destination.isotope({ 207 filter: filter 208 }); 209 210 self.location = "#" + filter.replace(".",""); 211 212 return false; 213 214 }); 215 216 $(window).bind("hashchange", function(e) { 217 218 var hashFilter = "." + location.hash.replace("#",""), 219 hash = (hashFilter == "." || hashFilter == ".*" ? "*" : hashFilter); 220 221 source.find("li.active").removeClass("active"); 222 source.find("li[data-option-value='" + hash + "']").addClass("active"); 223 224 destination.isotope({ 225 filter: hash 226 }); 227 228 }); 229 230 var hashFilter = "." + (location.hash.replace("#","") || "*"); 231 232 var initFilterEl = source.find("li[data-option-value='" + hashFilter + "'] a"); 233 234 if(initFilterEl.get(0)) { 235 source.find("li[data-option-value='" + hashFilter + "'] a").click(); 236 } else { 237 source.find("li:first-child a").click(); 238 } 239 240 }); 241 242 } 243 244 }); 245 246 } 247 248/* ================================================== 249 IsoTope Full Width 250================================================== */ 251 TENTERED.IsoTopeFull = function() { 252 $('.isotope').each(function(){ 253 var isotopeInstance = $(this); 254 var container = $(isotopeInstance).find('.portfolio-container'); 255 isotopeColumns = container.attr("data-columns") ? container.attr("data-columns") : "1" 256 container.addClass('portfolio-wrap-' + isotopeColumns); 257 $(window).load(function() { 258 $(".portfolio-item").show(); 259 $('.portfolio-filter a').click(function(){ 260 $('.portfolio-filter a').parent("li").removeClass('active'); 261 $(this).parent("li").addClass('active'); 262 var selector = $(this).attr('data-filter'); 263 container.isotope({ filter: selector }); 264 setProjects(); 265 return false; 266 }); 267 268 function splitColumns() { 269 var winWidth = $(window).width(), 270 columnNumb = 1; 271 272 273 if (winWidth > 1024) { 274 columnNumb = isotopeColumns; 275 } else if (winWidth > 900) { 276 columnNumb = isotopeColumns; 277 } else if (winWidth > 479) { 278 columnNumb = 2; 279 } else if (winWidth < 479) { 280 columnNumb = 1; 281 } 282 283 return columnNumb; 284 } 285 286 function setColumns() { 287 var winWidth = $(window).width(), 288 columnNumb = splitColumns(), 289 postWidth = Math.floor(winWidth / columnNumb); 290 291 container.find('.portfolio-item').each(function () { 292 $(this).css( { 293 width : postWidth + 'px' 294 }); 295 }); 296 } 297 298 function setProjects() { 299 setColumns(); 300 container.isotope('reLayout'); 301 } 302 303 container.imagesLoaded(function () { 304 setColumns(); 305 }); 306 container.isotope({ 307 animationEngine : 'best-available', 308 animationOptions: { 309 duration: 200, 310 queue: false 311 }, 312 layoutMode: 'fitRows' 313 }); 314 315 $(window).bind('resize', function () { 316 setProjects(); 317 }); 318 }); 319 }); 320 if ($(".blog-masonry").length > 0){ 321 var $container_blog = $('.blog-masonry'); 322 $container_blog.isotope({ 323 itemSelector : '.blog-masonry-item' 324 }); 325 326 $(window).resize(function() { 327 var $container_blog = $('.blog-masonry'); 328 $container_blog.isotope({ 329 itemSelector : '.blog-masonry-item' 330 }); 331 }); 332 } 333 } 334/* ================================================== 335 Flickr Widget 336================================================== */ 337 TENTERED.FlickrWidget = function() { 338 $('.flickr-widget').each(function(){ 339 var flickrInstance = $(this); 340 flickrImages = flickrInstance.attr("data-images-count") ? flickrInstance.attr("data-images-count") : "1", 341 flickrUserid = flickrInstance.attr("data-flickr-userid") ? flickrInstance.attr("data-flickr-userid") : "1" 342 flickrInstance.jflickrfeed({ 343 limit: flickrImages, 344 qstrings: { 345 id: flickrUserid 346 }, 347 itemTemplate: '<a href="{{image_b}}"><li><img alt="{{title}}" src="{{image_s}}" /></li></a>' 348 }); 349 }); 350 } 351 352/* ================================================== 353 Twitter Widget 354================================================== */ 355 TENTERED.TwitterWidget = function() { 356 $('.twitter-widget').each(function(){ 357 var twitterInstance = $(this); 358 twitterTweets = twitterInstance.attr("data-tweets-count") ? twitterInstance.attr("data-tweets-count") : "1" 359 twitterInstance.twittie({ 360 dateFormat: '%b. %d, %Y', 361 template: '<li>{{tweet}} <span class="date">{{date}}</span></li>', 362 count: twitterTweets, 363 hideReplies: true 364 }); 365 }); 366 } 367/* ==================================================
368 Owl Carousel 369================================================== */ 370 TENTERED.OwlCarousel = function() { 371 $('.owl-carousel').each(function(){ 372 var carouselInstance = $(this); 373 var carouselColumns = carouselInstance.attr("data-columns") ? carouselInstance.attr("data-columns") : "1"; 374 var carouselAutoplay = carouselInstance.attr("data-autoplay") === 'yes' ? true : false; 375 var carouselAutoplayTime = carouselInstance.attr("data-autoplay-timeout") ? carouselInstance.attr("data-autoplay-timeout") : '5000'; 376 var carouselPagination = carouselInstance.attr("data-pagination") === 'yes' ? true : false; 377 var carouselArrows = carouselInstance.attr("data-arrows") === 'yes' ? true : false; 378 var carouselAutoHeight = carouselInstance.attr("data-auto-height") === 'yes' ? true : false; 379 var carouselRTL = carouselInstance.attr("data-rtl") === 'yes' ? true : false; 380 var carouselLoop = carouselInstance.attr("data-loop") === 'yes' ? true : false; 381 var carouselMargin = carouselInstance.attr("data-margin") ? carouselInstance.attr("data-margin") : 25; 382 var carouselPadding = carouselInstance.attr("data-padding") ? carouselInstance.attr("data-padding") : 0; 383 384 carouselInstance.owlCarousel({ 385 loop: carouselLoop, 386 items: carouselColumns, 387 autoWidth: false, 388 margin: parseInt(carouselMargin), 389 stagePadding: parseInt(carouselPadding), 390 autoplay : carouselAutoplay, 391 autoplayTimeout: parseInt(carouselAutoplayTime), 392 nav : carouselArrows, 393 dots : carouselPagination, 394 mergeFit: false, 395 navText: ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"], 396 autoplayHoverPause: true, 397 lazyLoad: true, 398 rtl: carouselRTL, 399 video: true, 400 autoHeight: carouselAutoHeight, 401 responsive:{ 402 0:{ 403// items:1, 404// dots:false, 405// nav:false, 406 stagePadding:0, 407 items:carouselColumns 408 }, 409 768:{ 410// items:1, 411// nav:false 412 items:carouselColumns 413 }, 414 1000:{ 415 items:carouselColumns 416 }, 417 1200:{ 418 items:carouselColumns 419 } 420 } 421 }); 422 }); 423 } 424/* ================================================== 425 Stellar Parallax 426================================================== */ 427 TENTERED.Stellar = function() { 428 if(!Modernizr.touch) { 429 $.stellar({ 430 horizontalScrolling: false 431 }); 432 } 433 } 434/* ================================================== 435 Back to Top 436================================================== */ 437 TENTERED.BackToTop = function() { 438 $(function() { 439 $('a#back-top').click(function () { 440 $('html, body').stop().animate({ 441 scrollTop: 0 442 }, 1500,'easeInOutExpo'); 443 }); 444 }); 445 } 446/* ================================================== 447 PrettyPhoto 448================================================== */ 449 TENTERED.PrettyPhoto = function() { 450 $(function(){ 451 $("a[data-rel^='prettyPhoto']").prettyPhoto({ 452 opacity: 0.5, 453 social_tools: "", 454 deeplinking: false 455 }); 456 }); 457 } 458/* ================================================== 459 SuperFish menu 460================================================== */ 461 TENTERED.SuperFish = function() { 462 $('.sf-menu').superfish({ 463 delay: 200, 464 animation: {opacity:'show', height:'show'}, 465 speed: 'fast',
466 cssArrows: false, 467 disableHI: true 468 }); 469 } 470 471/* ================================================== 472 Animated Counters 473================================================== */ 474 TENTERED.Counters = function() { 475 $('.counters').each(function () { 476 $(".timer .count").appear(function() { 477 var counter = $(this).html(); 478 $(this).countTo({ 479 from: 0, 480 to: counter, 481 speed: 2000, 482 refreshInterval: 60, 483 }); 484 }); 485 }); 486 } 487/* ================================================== 488 Sticky Navigation 489================================================== */ 490 TENTERED.StickyNav = function() { 491 var windowWidth = $(window).width(), 492 didScroll = false; 493 494 var $menu = $('.site-header'); 495 var $menu2 = $('.secondary-nav'); 496 var $menu3 = $('.topbar'); 497 498 $(window).scroll(function() { 499 didScroll = true; 500 }); 501 502 setInterval(function() { 503 504 if( $(window).scrollTop() > 20 ) { 505 $menu2.css('top',112); 506 } else { 507 $menu2.css('top',112); 508 } 509 }, 250); 510 setInterval(function() { 511 512 if( $(window).scrollTop() > 20 ) { 513 $menu.addClass('sticky-header'); 514 } else { 515 $menu.removeClass('sticky-header'); 516 } 517 }, 250); 518 setInterval(function() { 519 520 if( $(window).scrollTop() > 120 ) { 521 $menu.addClass('tranlucent'); 522 } else { 523 $menu.removeClass('tranlucent'); 524 } 525 }, 250); 526 } 527/* ================================================== 528 Header Functions 529================================================== */ 530 TENTERED.StickyHeader = function() { 531 $(".topbar").sticky({topSpacing:0}); 532 $(".site-header").sticky({topSpacing:44}); 533 $(".secondary-nav").sticky({topSpacing:107}); 534 } 535/* ================================================== 536 Init Functions 537================================================== */ 538$(document).ready(function(){ 539 TENTERED.ContactForm(); 540 TENTERED.scrollToTop(); 541 TENTERED.accordion(); 542 TENTERED.toggle(); 543 TENTERED.toolTip(); 544 TENTERED.pricingTable(); 545 TENTERED.navMenu(); 546 TENTERED.StickyHeader(); 547 TENTERED.stickyanimated(); 548 TENTERED.SearchBar(); 549 TENTERED.FlickrWidget(); 550 TENTERED.TwitterWidget(); 551 TENTERED.OwlCarousel(); 552 TENTERED.Stellar(); 553 TENTERED.BackToTop(); 554 TENTERED.PrettyPhoto(); 555 TENTERED.SuperFish(); 556 TENTERED.Counters(); 557 TENTERED.IsoTope(); 558 TENTERED.IsoTopeFull(); 559 //TENTERED.StickyNav(); 560 $('.selectpicker').selectpicker({container:'body'}); 561 $(".action-arrow").click(function(){ 562 $(this).parents("tr").find(".hidden-description").slideToggle(); 563 // Added by Rusty 564 $(this).parents("tr").find(".shown-description").slideToggle(); 565 $(this).parents("tr").find(".action-arrow").toggleClass("active"); 566 $(this).parents("tr").toggleClass("active"); 567 return false; 568 }); 569 570 571 572 573 574 $('.filter-menu').each(function(){ 575 $(this).find('.filter-menu-icon').click(function(){ 576 $(this).toggleClass('active'); 577 $(this).parents('.filter-menu').find('.filter-section').slideToggle(); 578 }); 579 }); 580}); 581 582// FITVIDS 583$(".content").fitVids(); 584 585// Nav Arrows 586$(".main-menu > ul > li > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-right'></i>"); 587 588// Animation Appear 589$("[data-appear-animation]").each(function() { 590 591 var $this = $(this); 592 593 $this.addClass("appear-animation"); 594 595 if(!$("html").hasClass("no-csstransitions") && $(window).width() > 767) { 596 597 $this.appear(function() { 598 599 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 600 601 if(delay > 1) $this.css("animation-delay", delay + "ms"); 602 $this.addClass($this.attr("data-appear-animation")); 603 604 setTimeout(function() { 605 $this.addClass("appear-animation-visible"); 606 }, delay); 607 608 }, {accX: 0, accY: -150}); 609 610 } else { 611 612 $this.addClass("appear-animation-visible"); 613 614 } 615 616}); 617// Animation Progress Bars 618$("[data-appear-progress-animation]").each(function() { 619 620 var $this = $(this); 621 622 $this.appear(function() { 623 624 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 625 626 if(delay > 1) $this.css("animation-delay", delay + "ms"); 627 $this.addClass($this.attr("data-appear-animation")); 628 629 setTimeout(function() { 630 631 $this.animate({ 632 width: $this.attr("data-appear-progress-animation") 633 }, 1500, "easeOutQuad", function() { 634 $this.find(".progress-bar-tooltip").animate({ 635 opacity: 1 636 }, 500, "easeOutQuad"); 637 }); 638 639 }, delay); 640 641 }
641, {accX: 0, accY: -50}); 642 643}); 644 645/* Circular Bars */ 646if(typeof($.fn.knob) != "undefined") { 647 $(".knob").knob({}); 648} 649 650//Parallax 651if(!Modernizr.touch) { 652 $(window).bind('load', function () { 653 parallaxInit(); 654 }); 655} 656 657 function parallaxInit() { 658 $('.parallax1').parallax("50%", 0.1); 659 $('.parallax2').parallax("50%", 0.1); 660 $('.parallax3').parallax("50%", 0.1); 661 $('.parallax4').parallax("50%", 0.1); 662 $('.parallax5').parallax("50%", 0.1); 663 $('.parallax6').parallax("50%", 0.1); 664 $('.parallax7').parallax("50%", 0.1); 665 $('.parallax8').parallax("50%", 0.1); 666 /*add as necessary*/ 667 } 668 669 670 671/* One Page Navigation */ 672$('.moveto-sec1').bind('click', function(){ 673 pageScroller.goTo(1); 674}); 675$('.moveto-sec2').bind('click', function(){ 676 pageScroller.goTo(2); 677}); 678$('.moveto-sec3').bind('click', function(){ 679 pageScroller.goTo(3); 680}); 681$('.moveto-sec4').bind('click', function(){ 682 pageScroller.goTo(4); 683}); 684$('.moveto-sec5').bind('click', function(){ 685 pageScroller.goTo(5); 686}); 687$('.moveto-sec6').bind('click', function(){ 688 pageScroller.goTo(6); 689}); 690$('.moveto-sec7').bind('click', function(){ 691 pageScroller.goTo(7); 692}); 693 694 695$(".pdf-pro-plugin").click(function(){ 696 $(".overlay-form").show(); 697}); 698 699$(".pdf-pro-close").on('click',function(){ 700 $(".overlay-form").hide(); 701}); 702 703 704/* List Styles */ 705$('ul.checks li').prepend('<i class="fa fa-check"></i> '); 706$('ul.hearts li').prepend('<i class="fa fa-heart"></i> '); 707$('ul.inline li').prepend('<i class="fa fa-check-circle-o"></i> '); 708$('ul.chevrons li').prepend('<i class="fa fa-chevron-right"></i> '); 709$('ul.nav-list-primary li a').prepend('<i class="fa fa-caret-right"></i> '); 710$('ul.carets li, #recent_posts.footer-widget ul li').prepend('<i class="fa fa-caret-right"></i> '); 711 712/* Window Height Getter Class */ 713 wheighter = $(window).height(); 714 $(".wheighter").css("height",wheighter); 715 $(window).resize(function(){ 716 wheighter = $(window).height(); 717 $(".wheighter").css("height",wheighter); 718 }); 719/* Any Button Scroll to section */ 720 $('.scrollto').click(function(){ 721 $.scrollTo( this.hash, 800, { easing:'easeOutQuint' }); 722 return false; 723 }); 724 725 726 $(window).load(function(){ 727 $(".portfolio-item").show(); 728 }); 729 $(window).resize(function(){ 730 if ($(window).width() > 992) 731 { 732 $(".mobile-menu").hide(); 733 } 734 }); 735 $(window).resize(function(){ 736 if ($(window).width() > 992) 737 { 738 $("#main-menu").show(); 739 } 740 }); 741});
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.