/* ============================================== Page Loader =============================================== */ // $(window).load(function(){ // 'use strict'; // $(".loader-item").delay(700).fadeOut(); // $("#pageloader").delay(1200).fadeOut("slow"); // }); /* ============================================== Portfolio Sorting =============================================== */ $(window).load(function () { $(function () { $('#Grid').mixitup({ targetSelector: '.mix', filterSelector: '.filter', sortSelector: '.sort', buttonEvent: 'click', effects: ['fade', 'scale'], listEffects: null, easing: 'smooth', layoutMode: 'grid', targetDisplayGrid: 'inline-block', targetDisplayList: 'block', gridClass: '', listClass: 'selected', transitionSpeed: 600, showOnLoad: 'all', sortOnLoad: false, multiFilter: false, filterLogic: 'or', resizeContainer: true, minHeight: 0, failClass: 'fail', perspectiveDistance: '3000', perspectiveOrigin: '50% 50%', animateGridList: true, onMixLoad: null, onMixStart: null, onMixEnd: null }); }); }); /* ============================================== Parallax Scrolling =============================================== */ $(window).load(function(){ 'use strict'; $.stellar({ responsive: true, horizontalScrolling: false, verticalOffset: 40 }); }); /* ============================================== Flexslider =============================================== */ jQuery(window).load(function () { 'use strict'; $('#home-slider').flexslider({ animation: "slide", controlNav: false, smoothHeight: true, directionNav: true, slideshowSpeed: 5000, animationDuration: 5000, nextText:"", prevText:"", keyboardNav: true, easing: 'easeInOutBack', useCSS: true, controlsContainer: ".flex-container", before: function(){ $('.flex-caption').animate({'left':'0px','opacity':'0'},0,'easeOutBack'); }, after: function(){ $('.flex-caption').animate({'left':'50px','opacity':'1'},800,'easeOutBack'); }, }); $('.flexslider').flexslider({ animation: "slide", controlNav: false, startAt: 1, directionNav: true, prevText: "", nextText: "", }); }); /* ============================================== Isotope Masonary =============================================== */ $(window).load(function(){ $(function(){ 'use strict'; var container = jQuery('#bloglist'); container.masonry({ layoutMode: 'fitRows' }); }); }); /* ============================================== Scrolling Navigation =============================================== */ $(document).ready(function () { 'use strict'; // $('.scroll-link').on('click', function (event) { // event.preventDefault(); // var sectionID = $(this).attr("data-id"); // scrollToID('#' + sectionID, 750); // }); $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); // scroll body to 0px on click $('#back-top a').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); // mobile nav toggle $('#nav-toggle').on('click', function (event) { event.preventDefault(); $('#main-nav').toggleClass("open"); }); // $('ul.nav li a').click(function () { // $('ul.nav li a').removeClass('selected'); // $(this).addClass('selected'); // return false; // }); // $('a.logo, #back-top a').click(function () { // $('ul.nav li a').removeClass('selected'); // $('ul.nav li.home a').addClass('selected'); // return false; // }); // scroll function function scrollToID(id, speed) { var offSet = 50; var targetOffset = $(id).offset().top - offSet; var mainNav = $('#main-nav'); $('html,body').animate({ scrollTop: targetOffset }, speed); if (mainNav.hasClass("open")) { mainNav.css("height", "1px").removeClass("in").addClass("collapse"); mainNav.removeClass("open"); } } }); /* ============================================== Responsive Videos =============================================== */ $(document).ready(function () { 'use strict'; $(".media.video").fitVids(); }); /* ============================================== Fancybox Lightbox =============================================== */ $(document).ready(function () { 'use strict'; $(".fancybox").fancybox({ helpers: { overlay: { locked: false, // try changing to true and scrolling around the page title: { type: 'outside' }, thumbs: { width: 50, height: 50 } } } }); }); /* ============================================== Owl Carousel =============================================== */ $(document).ready(function () { 'use strict'; //For Testimonial Slider $("#owl-home-slider").owlCarousel({ items: 1, //10 items above 1000px browser width itemsDesktop: [1000, 1], //5 items between 1000px and 901px itemsDesktopSmall: [900, 1], // betweem 900px and 601px itemsTablet: [600, 1], //2 items between 600 and 0; itemsMobile: false, // itemsMobile disabled - inherit from itemsTablet option autoPlay: true, navigation: false, responsive: true, pagination: true, lazyLoad: true, lazyFollow: true, lazyEffect: "backSlide", transitionStyle: "backSlide", responsiveRefreshRate: 200, responsiveBaseWidth: window, stopOnHover: true, navigationText: ["", ""], }); //For Testimonial Slider $("#testimonial-slider").owlCarousel({ items: 1, //10 items above 1000px browser width itemsDesktop: [1000, 1], //5 items between 1000px and 901px itemsDesktopSmall: [900, 1], // betweem 900px and 601px itemsTablet: [600, 1], //2 items between 600 and 0; itemsMobile: false, // itemsMobile disabled - inherit from itemsTablet option autoPlay: true, navigation: false, responsive: true, pagination: true, lazyLoad: true, lazyFollow: true, lazyEffect: "backSlide", transitionStyle: "goDown", responsiveRefreshRate: 200, responsiveBaseWidth: window, stopOnHover: true, navigationText: ["", ""], }); //For Client Slider $("#client-slider").owlCarousel({ items: 4, //10 items above 1000px browser width itemsDesktop: [1000, 4], //5 items between 1000px and 901px itemsDesktopSmall: [900, 3], // betweem 900px and 601px itemsTablet: [600, 2], //2 items between 600 and 0; itemsMobile: false, // itemsMobile disabled - inherit from itemsTablet option autoPlay: true, navigation: true, responsive: true, autoHeight: true, pagination: false, lazyLoad: true, lazyFollow: true, lazyEffect: "goDown", transitionStyle: "goDown", responsiveRefreshRate: 200, stopOnHover: true, navigationText: ["", ""], }); //For Portfolio Slider $("#portfolio-slider").owlCarousel({ items: 5, //10 items above 1000px browser width itemsDesktop: [1000, 4], //5 items between 1000px and 901px itemsDesktopSmall: [900, 3], // betweem 900px and 601px itemsTablet: [600, 1], //2 items between 600 and 0; itemsMobile: false, // itemsMobile disabled - inherit from itemsTablet option autoPlay: true, navigation: true, responsive: true, autoHeight: true, pagination: false, lazyLoad: true, lazyFollow: true, lazyEffect: "goDown", transitionStyle: "goDown", responsiveRefreshRate: 200, stopOnHover: true, navigationText: ["", ""], }); }); /* ============================================== Portfolio Hover Zoom =============================================== */ $(document).ready(function () { 'use strict'; // IN AND OUT EFFECT FOR CAROUSEL // $('.item-on-hover, .item-on-hover-white').hover(function () { $(this).animate({ opacity: 1 }, 500); //$(this).children('.hover-link, .hover-image, .hover-video').animate({ opacity: 1 }, 500); }, function () { $(this).animate({ opacity: 0 }, 500); //$(this).children('.hover-link, .hover-image, .hover-video').animate({ opacity: 0 }, 500); }); }); /* ============================================== Portfolio Hover Zoom =============================================== */ $(document).ready(function () { 'use strict'; $('.skillbar').appear(); $('.skillbar').on('appear', function () { $(this).find('.skillbar-bar').animate({ width: $(this).attr('data-percent') }, 6000); }); /* Flickr Photostream */ if ($.fn.jflickrfeed) $(".flickr-stream ul").jflickrfeed({ qstrings: { id: "52617155@N08" }, limit: 12, itemTemplate: '
  • {{title}}
  • ' }); }); /* ============================================== Animated Items =============================================== */ jQuery(document).ready(function($) { 'use strict'; $('.animated').appear(); $('.animated').on('appear', function() { var elem = $(this); var animation = elem.data('animation'); if ( !elem.hasClass('visible') ) { var animationDelay = elem.data('animation-delay'); if ( animationDelay ) { setTimeout(function(){ elem.addClass( animation + " visible" ); }, animationDelay); } else { elem.addClass( animation + " visible" ); } } }); }); /* ============================================== Revolution Slider =============================================== */ // $(window).load(function() { // 'use strict'; // var revolutionSlider = $("#page-slider"); // var pageSlider, // startwidth = (revolutionSlider.parents("body.boxed").length) ? 960 : 1170; // pageSlider = revolutionSlider.revolution({ // delay : 9000, // startheight : 615, // hideThumbs : 10, // touchenabled : "on", // onHoverStop : "on", // startwidth : startwidth, // navOffsetHorizontal : 0, // navOffsetVertical : 0, // stopAtSlide : -1, // stopAfterLoops : -1, // fullWidth : "on" // }); // pageSlider.bind("revolution.slide.onloaded",function (e,data) { // $(this).parent().css({ // background : "transparent", // height : "auto", // overflow : "visible" // }).children().animate({'opacity':1},500); // }); // }); /* ============================================== Back To Top =============================================== */ $(document).ready(function () { 'use strict'; $("#back-top").hide(); // fade in #back-top $(function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); }); }); $(document).ready(function () { $(".switch-button").click(function () { if ($(this).is(".open")) { $(this).addClass("closed"); $(this).removeClass("open"); $(".styleswitcher").animate({ "left": "-202px" }) } else { $(this).addClass("open"); $(this).removeClass("closed"); $(".styleswitcher").animate({ "left": "0px" }) } }) }); $(document).ready(function () { if($.cookie("css")) { $("link.alt").attr("href",$.cookie("css")); } $(".color-scheme a").click(function () { $("link.alt").attr("href", $(this).attr("rel")); $.cookie("css",$(this).attr('rel'), {expires: 365, path: '/'}); return false }); });