jQuery.noConflict()(function($){ $(document).ready(function($) { /*STICKY NAVIGATION*/ var aboveHeight = $('#copyrights').outerHeight(); $(window).scroll(function(){ if ($(window).scrollTop() > aboveHeight && $(window).width() > 959 ) { $('#main-navigation.fixed').addClass('sticky'); } else { $('#main-navigation.fixed').removeClass('sticky'); } }); /*STICKY NAVIGATION*/ /*TWIITER*/ $.getJSON('twitter.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=trendyWebStar&count=1'), function(tweets){ //Put your username here $("#twitter").html(tz_format_twitter(tweets)); }); /*PORTFOLIO HOVER*/ $('.portfolio-item-link').hover(function() { $(this).find('span.portfolio-item-hover').animate({opacity:1}, 200); }, function() { $(this).find('span.portfolio-item-hover').stop(0,0).animate({opacity: 0}, 200); }); /*----------------------------------------------------------*/ /*ISOTOPE JS */ /*----------------------------------------------------------*/ if ( $( '#portfolio-container' ).length && jQuery() ) { (function() { var $container = $('#portfolio-container'); if( $container.length ) { var $itemsFilter = $('#filterable'); $('.isotope-item', $container).each(function(i) { var $this = $(this); $this.addClass( $this.attr('data-categories') ); }); $(window).on('load', function() { $container.isotope({ itemSelector : '.isotope-item', layoutMode : 'fitRows' }); }); $itemsFilter.on('click', 'a', function(e) { var $this = $(this), currentOption = $this.attr('data-categories'); $itemsFilter.find('a').removeClass('active'); $this.addClass('active'); if( currentOption ) { if( currentOption !== '*' ) currentOption = currentOption.replace(currentOption, '.' + currentOption) $container.isotope({ filter : currentOption }); } e.preventDefault(); }); $itemsFilter.find('a').first().addClass('active'); } })(); } /*----------------------------------------------------------*/ /*RESPONSIVE NAVIGATION JS */ /*----------------------------------------------------------*/ var $menu_select = $(""); $("", {"selected": "selected", "value": "", "text": "Main Navigation"}).appendTo($menu_select); $menu_select.appendTo("#main-navigation"); $("#main-navigation ul li a").each(function(){ var menu_url = $(this).attr("href"); var menu_text = $(this).text(); if ($(this).parents("li").length == 2) { menu_text = '- ' + menu_text; } if ($(this).parents("li").length == 3) { menu_text = "-- " + menu_text; } if ($(this).parents("li").length > 3) { menu_text = "--- " + menu_text; } $("", {"value": menu_url, "text": menu_text}).appendTo($menu_select) }) field_id = "#main-navigation select"; $(field_id).change(function() { value = $(this).attr('value'); window.location = value; }); /*----------------------------------------------------------*/ /*MAIN NAVIGATION DROPDOWN JS */ /*----------------------------------------------------------*/ $('ul.main-menu').superfish({ delay: 100, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation speed: 'fast', // faster animation speed autoArrows: false // disable generation of arrow mark-up }); /*----------------------------------------------------------*/ /*LAYER SLIDER JS */ /*----------------------------------------------------------*/ if ( $( '#layerslider' ).length && jQuery() ) { $('#layerslider').layerSlider({ width : '100%', height : '450px', responsive : true, responsiveUnder : 940, sublayerContainer : 1020, autoStart : true, pauseOnHover : true, firstLayer : 1, animateFirstLayer : true, randomSlideshow : false, twoWaySlideshow : true, loops : 0, forceLoopNum : true, autoPlayVideos : false, autoPauseSlideshow : 'auto', keybNav : true, touchNav : true, navButtons: false, navStartStop: false, skin : 'fullwidth', skinsPath : 'images/layer-slider/skins/', }); } /*----------------------------------------------------------*/ /*PROJECTS CAROUSEL JS */ /*----------------------------------------------------------*/ (function() { var $carousel = $('#projects-carousel'); if( $carousel.length ) { var scrollCount; if( $(window).width() < 480 ) { scrollCount = 1; } else if( $(window).width() < 768 ) { scrollCount = 1; } else if( $(window).width() < 960 ) { scrollCount = 3; } else { scrollCount = 4; } $carousel.jcarousel({ animation : 600, easing : 'easeOutCirc', scroll : scrollCount }); } })(); /*----------------------------------------------------------*/ /*FLICKR WIDGET JS */ /*----------------------------------------------------------*/ $('.flickr-widget').jflickrfeed({ limit: 6, qstrings: { id: '52617155@N08' }, itemTemplate: '
Please enter '+labelText+'
You entered an invalid '+labelText+'
Your email was successfully sent. We will contact you as soon as possible.