/*callbacks jQuery("button").click(function(){jQuery("#box").animate({height:"300px"});}); */ function navActs(a,b,c,d,e,f,g) {jQuery(a).addClass("nav-act");jQuery(b).removeClass("nav-act");jQuery(c).removeClass("nav-act");jQuery(d).removeClass("nav-act");jQuery(e).removeClass("nav-act");jQuery(f).removeClass("nav-act");jQuery(g).removeClass("nav-act");} function portDesc(a,b,c,d,e,f,g,h,i,j,k,l) {jQuery(a).removeClass("hide");jQuery(b).addClass("hide");jQuery(c).addClass("hide");jQuery(d).addClass("hide");jQuery(e).addClass("hide");jQuery(f).addClass("hide");jQuery(g).addClass("hide");jQuery(h).addClass("hide");jQuery(i).addClass("hide");jQuery(j).addClass("hide");jQuery(k).addClass("hide");jQuery(l).addClass("hide"); jQuery("html, body").animate({scrollTop: jQuery(a).position().top - 50}, "slow");} function portClose(a) {jQuery(a).addClass("hide"); jQuery("html, body").animate({scrollTop: jQuery("#PortDiv").position().top - 50}, "slow");} /*Activate Boostrap Assets*/ jQuery('.popover-point').popover(); /*Menubar*/ jQuery("#FeatLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#FeatDiv").position().top - 50}, "slow"); navActs("#FeatCoverLink","#ServCoverLink","#AboutCoverLink","#PortCoverLink","#TeamCoverLink","#TestiCoverLink","#ContactCoverLink");}); jQuery("#ServLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#ServDiv").position().top - 50}, "slow"); navActs("#ServCoverLink","#FeatCoverLink","#AboutCoverLink","#PortCoverLink","#TeamCoverLink","#TestiCoverLink","#ContactCoverLink");}); jQuery("#AboutLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#AboutDiv").position().top - 50}, "slow"); navActs("#AboutCoverLink","#FeatCoverLink","#ServCoverLink","#PortCoverLink","#TeamCoverLink","#TestiCoverLink","#ContactCoverLink");}); jQuery("#PortLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#PortDiv").position().top - 50}, "slow"); navActs("#PortCoverLink","#FeatCoverLink","#ServCoverLink","#AboutCoverLink","#TeamCoverLink","#TestiCoverLink","#ContactCoverLink");}); jQuery("#TeamLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#TeamDiv").position().top - 50}, "slow"); navActs("#TeamCoverLink","#FeatCoverLink","#ServCoverLink","#AboutCoverLink","#PortCoverLink","#TestiCoverLink","#ContactCoverLink");}); jQuery("#TestiLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#TestiDiv").position().top - 50}, "slow"); navActs("#TestiCoverLink","#FeatCoverLink","#ServCoverLink","#AboutCoverLink","#PortCoverLink","#TeamCoverLink","#ContactCoverLink");}); jQuery("#ContactLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#ContactDiv").position().top - 50}, "slow"); navActs("#ContactCoverLink","#FeatCoverLink","#ServCoverLink","#AboutCoverLink","#PortCoverLink","#TeamCoverLink","#TestiCoverLink");}); /*Buttons*/ jQuery("#FirstServiceLink,#SecondServiceLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#ContactDiv").position().top - 50}, "slow");}); jQuery("#FirstAboutLink,#SecondAboutLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#AboutDiv").position().top - 50}, "slow");}); jQuery("#FirstPortLink,#SecondPortLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#PortDiv").position().top - 50}, "slow");}); jQuery("#FirstTeamLink,#SecondTeamLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#TeamDiv").position().top - 50}, "slow");}); jQuery("#FirstCustomerLink,#SecondCustomerLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#TestiDiv").position().top - 50}, "slow");}); jQuery("#FirstContLink,#SecondContLink,#ThirdContLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#ContactDiv").position().top - 50}, "slow");}); jQuery("#LearnLink").click(function(){jQuery("html, body").animate({scrollTop: jQuery("#FeatDiv").position().top - 50}, "slow");}); jQuery(".archive-icon-border").click(function(){jQuery("html, body").animate({scrollTop: jQuery(".archive-area").position().top + 50}, "slow");}); jQuery(".top-search-item").click(function(){ jQuery(".top-search-box").slideToggle("medium");}); jQuery(".blog-back-bottom,.page-back-bottom,.single-back-bottom,#NavofBlog").click(function(){ jQuery(".top-search-box").slideUp("medium");}); /*Portfolio Images*/ jQuery("#OnePILink").click(function(){portDesc("#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#TwoPILink").click(function(){portDesc("#TwoPIDesc", "#OnePIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#ThreePILink").click(function(){portDesc("#ThreePIDesc", "#OnePIDesc", "#TwoPIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#FourPILink").click(function(){portDesc("#FourPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#FivePILink").click(function(){portDesc("#FivePIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#SixPILink").click(function(){portDesc("#SixPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#SevenPILink").click(function(){portDesc("#SevenPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#EightPILink").click(function(){portDesc("#EightPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#NinePILink").click(function(){portDesc("#NinePIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#TenPIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#TenPILink").click(function(){portDesc("#TenPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#ElevenPIDesc", "#TwelvePIDesc");}); jQuery("#ElevenPILink").click(function(){portDesc("#ElevenPIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#TwelvePIDesc");}); jQuery("#TwelvePILink").click(function(){portDesc("#TwelvePIDesc", "#OnePIDesc", "#TwoPIDesc", "#ThreePIDesc", "#FourPIDesc", "#FivePIDesc", "#SixPIDesc", "#SevenPIDesc", "#EightPIDesc", "#NinePIDesc", "#TenPIDesc", "#ElevenPIDesc");}); /*Portfolio Description Close Icons*/ jQuery("#OneClosePort").click(function(){portClose("#OnePIDesc");}); jQuery("#TwoClosePort").click(function(){portClose("#TwoPIDesc");}); jQuery("#ThreeClosePort").click(function(){portClose("#ThreePIDesc");}); jQuery("#FourClosePort").click(function(){portClose("#FourPIDesc");}); jQuery("#FiveClosePort").click(function(){portClose("#FivePIDesc");}); jQuery("#SixClosePort").click(function(){portClose("#SixPIDesc");}); jQuery("#SevenClosePort").click(function(){portClose("#SevenPIDesc");}); jQuery("#EightClosePort").click(function(){portClose("#EightPIDesc");}); jQuery("#NineClosePort").click(function(){portClose("#NinePIDesc");}); jQuery("#TenClosePort").click(function(){portClose("#TenPIDesc");}); jQuery("#ElevenClosePort").click(function(){portClose("#ElevenPIDesc");}); jQuery("#TwelveClosePort").click(function(){portClose("#TwelvePIDesc");}); /*responsive video*/ jQuery(function($) { var $allVideos = $("iframe[src^='http://player.vimeo.com'], iframe[src^='http://www.youtube.com'], object, embed"), $fluidEl = $("figure"); $allVideos.each(function() { $(this).attr('data-aspectRatio', this.height / this.width).removeAttr('height').removeAttr('width'); }); $(window).resize(function() { var newWidth = $fluidEl.width(); $allVideos.each(function() { var $el = $(this); $el.width(newWidth).height(newWidth * $el.attr('data-aspectRatio')); }); }).resize(); });