jquery(document).ready(function() { if(jquery('.tp-banner')){ jquery('.tp-banner').show().revolution( { dottedoverlay:"none", delay:10000, startwidth:1140, startheight:530,//570 hidethumbs:200, thumbwidth:100, thumbheight:50, thumbamount:5, navigationtype:"none", navigationarrows:"", touchenabled:"on", onhoverstop:"off", swipe_velocity: 0.7, swipe_min_touches: 1, swipe_max_touches: 1, drag_block_vertical: false, parallax:"mouse", parallaxbgfreeze:"on", parallaxlevels:[7,4,3,2,5,4,3,2,1,0], keyboardnavigation:"off", navigationhalign:"center", navigationvalign:"bottom", navigationhoffset:0, navigationvoffset:60, shadow:0, spinner:"spinner4", stoploop:"off", stopafterloops:-1, stopatslide:-1, shuffle:"off", autoheight:"off", forcefullwidth:"off", hidethumbsonmobile:"off", hidenavdelayonmobile:1500, hidebulletsonmobile:"off", hidearrowsonmobile:"off", hidethumbsunderresolution:0, hideslideratlimit:0, hidecaptionatlimit:0, hideallcaptionatlilmit:0, startwithslide:0, fullscreenoffsetcontainer: ".header" }); } }); /*jshint jquery:true */ /*global $:true */ var $ = jquery.noconflict(); $(document).ready(function($) { "use strict"; /* global google: false */ /*jshint -w018 */ /*-------------------------------------------------*/ /* = portfolio isotope /*-------------------------------------------------*/ var window = $(window); // needed variables var $container=$('.iso-call'); var $filter=$('.filter'); try{ $container.imagesloaded( function(){ $container.trigger('resize'); $container.isotope({ filter:'*', layoutmode:'masonry', animationoptions:{ duration:750, easing:'linear' } }); $('.triggeranimation').waypoint(function() { var animation = $(this).attr('data-animate'); $(this).css('opacity', ''); $(this).addclass("animated " + animation); }, { offset: '75%', triggeronce: true } ); settimeout(resize, 1500); }); } catch(err) { } window.bind('resize', function(){ var selector = $filter.find('a.active').attr('data-filter'); try { $container.isotope({ filter : selector, animationoptions: { duration: 750, easing : 'linear', queue : false, } }); } catch(err) { } return false; }); // isotope filter $filter.find('a').on('click', function(){ var selector = $(this).attr('data-filter'); try { $container.isotope({ filter : selector, animationoptions: { duration: 750, easing : 'linear', queue : false, } }); } catch(err) { } return false; }); var filteritema = $('.filter li a'); filteritema.on('click', function(){ var $this = $(this); if ( !$this.hasclass('active')) { filteritema.removeclass('active'); $this.addclass('active'); } }); $('#container').delay(400).addclass('active'); /*-------------------------------------------------*/ /* = search animation /*-------------------------------------------------*/ var searchtoggle = $('.open-search'), inputanime = $(".form-search"), body = $('body'); searchtoggle.on('click', function(event){ event.preventdefault(); if ( !inputanime.hasclass('active') ) { inputanime.addclass('active'); } else { inputanime.removeclass('active'); } }); body.on('click', function(){ inputanime.removeclass('active'); }); var elembinds = $('.open-search, .form-search'); elembinds.bind('click', function(e) { e.stoppropagation(); }); /*-------------------------------------------------*/ /* = fullwidth carousell /*-------------------------------------------------*/ try { var owlwrap = $('.owl-wrapper'); if (owlwrap.length > 0) { if (jquery().owlcarousel) { owlwrap.each(function(){ var carousel= $(this).find('.owl-carousel'), datanum = $(this).find('.owl-carousel').attr('data-num'), datanum2, datanum3; if ( datanum == 1 ) { datanum2 = 1; datanum3 = 1; } else if ( datanum == 2 ) { datanum2 = 2; datanum3 = datanum - 1; } else { datanum2 = datanum - 1; datanum3 = datanum - 2; } carousel.owlcarousel({ autoplay: 10000, navigation : true, controls: true, items : datanum, itemsdesktop : [1199,datanum2], itemsdesktopsmall : [979,datanum3], itemstablet : [760,2], itemstabletsmall : [479,1] }); }); } } } catch(err) { } /*-------------------------------------------------*/ /* = flexslider /*-------------------------------------------------*/ try { var sliderpost = $('.flexslider'); sliderpost.flexslider({ slideshowspeed: 3000, easing: "swing" }); } catch(err) { } /* ---------------------------------------------------------------------- */ /* contact map /* ---------------------------------------------------------------------- */ /*var contact = {"lat":"27.9198643", "lon":"-82.4601977"}; //change a map coordinate here! try { var mapcontainer = $('#map'); mapcontainer.gmap3({ action: 'addmarker', marker:{ options:{ icon : new google.maps.markerimage('images/marker.png') } }, latlng: [contact.lat, contact.lon], map:{ center: [contact.lat, contact.lon], zoom: 12 }, }, {action: 'setoptions', args:[{scrollwheel:false}]} ); } catch(err) { }*/ /*-------------------------------------------------*/ /* = slider testimonial /*-------------------------------------------------*/ /*var slidertestimonial = $('.bxslider'); try{ slidertestimonial.bxslider({ mode: 'vertical' }); } catch(err) { }*/ /* ---------------------------------------------------------------------- */ /* contact form /* ---------------------------------------------------------------------- */ var submitcontact = $('#submit_contact'), message = $('#msg'); submitcontact.on('click', function(e){ e.preventdefault(); var $this = $(this); $.ajax({ type: "post", url: 'contact.php', datatype: 'json', cache: false, data: $('#contact-form').serialize(), success: function(data) { if(data.info !== 'error'){ $this.parents('form').find('input[type=text],textarea,select').filter(':visible').val(''); message.hide().removeclass('success').removeclass('error').addclass('success').html(data.msg).fadein('slow').delay(5000).fadeout('slow'); } else { message.hide().removeclass('success').removeclass('error').addclass('error').html(data.msg).fadein('slow').delay(5000).fadeout('slow'); } } }); }); /*-------------------------------------------------*/ /* = about tabs /*-------------------------------------------------*/ var tablink = $('.about-post a'), tabcontent = $('.tab-cont'); tablink.on('click', function(event){ event.preventdefault(); var datalink = $(this).attr('data-link'), datatab = $('.tab-cont.active').attr('data-tab'); if(!$(this).hasclass('active')) { $('.about-post a').removeclass('active'); $(this).addclass('active'); } if ( datalink == datatab ) { } else { tabcontent.removeclass('active'); $('.tab-cont[data-tab='+ datalink +']').addclass('active'); } }); /* ---------------------------------------------------------------------- */ /* header animate after scroll /* ---------------------------------------------------------------------- */ (function() { var docelem = document.documentelement, didscroll = false, changeheaderon = 50; document.queryselector( 'header' ); function init() { window.addeventlistener( 'scroll', function() { if( !didscroll ) { didscroll = true; settimeout( scrollpage, 100 ); } }, false ); } function scrollpage() { var sy = scrolly(); if ( sy >= changeheaderon ) { $( 'header' ).addclass('active'); } else { $( 'header' ).removeclass('active'); } didscroll = false; } function scrolly() { return window.pageyoffset || docelem.scrolltop; } init(); })(); }); function resize() { $(window).trigger('resize'); }