/* ========================================================================= */ /* Preloader /* ========================================================================= */ $(window).load(function(){ $("#preloader").fadeOut("slow"); }); $(document).ready(function () { //Elements Appear from top $('.item_top').each(function () { $(this).appear(function () { $(this).delay(400).animate({ opacity: 1, top: "0px" }, 1000); }); }); //Elements Appear from bottom $('.item_bottom').each(function () { $(this).appear(function () { $(this).delay(400).animate({ opacity: 1, bottom: "0px" }, 1000); }); }); //Elements Appear from left $('.item_left').each(function () { $(this).appear(function () { $(this).delay(400).animate({ opacity: 1, left: "0px" }, 1000); }); }); //Elements Appear from right $('.item_right').each(function () { $(this).appear(function () { $(this).delay(400).animate({ opacity: 1, right: "0px" }, 1000); }); }); //Elements Appear in fadeIn effect $('.item_fade_in').each(function () { $(this).appear(function () { $(this).delay(400).animate({ opacity: 1, right: "0px" }, 1500); }); }); }); $(function(){ /*================================================================= Animated Header =================================================================*/ $(window).scroll(function () { if ($(window).scrollTop() > 400) { $("#head").addClass("animated"); $(".header-top").slideUp("slow"); $(".nav-three").slideDown(); } else { $("#head").removeClass('animated'); $(".header-top").slideDown("slow"); $(".nav-three").slideUp(); } }); $(".hide-top").on('click', function() { $(this).css('display', 'none'); $(".header-top").slideUp("slow"); $(".show-top").css('display', 'block'); }); $(".show-top").on('click', function() { $(this).css('display', 'none'); $(".hide-top").css('display', 'block'); $(".header-top").slideDown("slow"); }); jQuery('.navbar-nav').onePageNav({ currentClass: 'current', changeHash: false, scrollSpeed: 750, scrollThreshold: 0.5, filter: '', easing: 'easeInOutExpo', begin: function() { //I get fired when the animation is starting }, end: function() { var i = 0; setInterval(function(){ i++; if(i<=25) window.scrollBy(0, -1); },5000) }, scrollChange: function($currentListItem) { //I get fired when you enter a section and I pass the list item of the section } }); // Dropdown nav $(".navbar-nav > li").hover( function () { $(this).children(".dropdown").stop(true,true).slideDown('medium'); }, function () { $(this).children(".dropdown").stop(true,true).slideUp('medium'); } ); jQuery('.navbar-nav li a').on('click', function(e){ e.preventDefault; if($(window).width() <= 767){ jQuery('.navbar-toggle').trigger('click'); }; }); // home slider $("#home-carousel").carousel({ interval: 4000 }); // sequence slider var options = { nextButton: true, prevButton: true, pagination: true, animateStartingFrameIn: true, autoPlay: false, autoPlayDelay: 3000, preloader: true }; var mySequence = $("#sequence").sequence(options).data("sequence"); /*================================================================= Banner section dynamic margin top =================================================================*/ function menuHeightFix(selector, paddingSelector){ var menuSelector = jQuery(selector).innerHeight(); var marginTop = paddingSelector; jQuery(marginTop).css({ 'margin-top': menuSelector }); } menuHeightFix('#head','.home-banner'); menuHeightFix('#head','.banner-2'); menuHeightFix('#head','#blog-section'); /*================================================================= Product Slider =================================================================*/ $(".product-slider").bxSlider({ controls: false }); /*================================================================= Parallax =================================================================*/ /*================================================================= Client Carousel =================================================================*/ $(".client-list").bxSlider({ controls: false, autoHover: true, minSlides: 1, maxSlides: 4, slideWidth: 300, slideMargin: 20, pager: false, moveSlides: 1, auto: true }); /*================================================================= Testimonial Slider =================================================================*/ $(".testimonial-slider").bxSlider({ controls: false, autoHover: true, touchEnabled: false, auto: true }); /*================================================================= Accordion =================================================================*/ jQuery('.panel-heading a').on('click', function() { $('.panel-heading').removeClass('active'); $(this).parents('.panel-heading').addClass('active'); }); $('#faq .panel-heading a').on('click',function(e){ if($(this).parents('.panel').children('.panel-collapse').hasClass('in')){ e.preventDefault(); e.stopPropagation(); } }); /*================================================================= Remove Placeholder On click =================================================================*/ $('input').focusin(function(){ $('input').data('holder',$(this).attr('placeholder')); $(this).attr('placeholder',''); }); $('input').focusout(function(){ $(this).attr('placeholder',$(this).data('holder')); }); $('textarea').focusin(function(){ $('textarea').data('holder',$(this).attr('placeholder')); $(this).attr('placeholder',''); }); $('textarea').focusout(function(){ $(this).attr('placeholder',$(this).data('holder')); }); /*================================================================= Back to top =================================================================*/ $(window).scroll(function () { if ($(window).scrollTop() > 400) { $("#go-top").fadeIn(500) } else { $("#go-top").fadeOut(500) } }); $("#go-top").on('click', function () { $("html, body").stop().animate({ scrollTop: 0 }, 1500, "easeInOutExpo") }); parallaxDesible(); $(window).stellar({ horizontalScrolling: false, verticalScrolling: true, horizontalOffset: 0, verticalOffset:parallaxOffset(), parallaxElements: true, parallaxBackgrounds: true }); }); function parallaxDesible(){ if (jQuery(window).width()<=767) { jQuery('.sc_parallax').removeAttr('data-stellar-background-ratio'); jQuery('.sc_parallax').removeAttr('data-stellar-horizontal-offset'); jQuery('.sc_parallax').removeAttr('data-stellar-vertical-offset'); jQuery('.parallax').removeAttr('data-stellar-background-ratio'); jQuery('.parallax').removeAttr('data-stellar-horizontal-offset'); jQuery('.parallax').removeAttr('data-stellar-vertical-offset'); } } // ========== START GOOGLE MAP ========== // function initialize() { // index 4 var myLatLng = new google.maps.LatLng(23.751510, 90.386137); var mapOptions = { zoom: 14, center: myLatLng, disableDefaultUI: false, scrollwheel: true, navigationControl: true, mapTypeControl: true, scaleControl: true, draggable: true, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'roadatlas'] } }; var map = new google.maps.Map(document.getElementById('map-canvas4'), mapOptions); var marker = new google.maps.Marker({ position: myLatLng, map: map, icon: 'img/location-icon.png', title: '' }); } google.maps.event.addDomListener(window, "load", initialize); google.maps.event.addDomListener(window, "load", function(){ // index all var myLatLng2 = new google.maps.LatLng(23.751510, 90.386137); var mapOptions = { zoom: 14, center: myLatLng2, disableDefaultUI: false, scrollwheel: true, navigationControl: true, mapTypeControl: true, scaleControl: true, draggable: true, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'roadatlas'] } }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var marker = new google.maps.Marker({ position: myLatLng2, map: map, icon: 'img/location-icon.png', title: '' }); }); // ========== END GOOGLE MAP ========== // $(function() { // post thumb slider $("ul.post-thumb").bxSlider({ pager: false, mode: "fade" }); // fitvids //$(".post-media .video").fitVids(); // fun facts counting $(".fact-item").appear(function () { $(".fact-item [data-to]").each(function () { var e = $(this).attr("data-to"); $(this).delay(6e3).countTo({ from: 50, to: e, speed: 3e3, refreshInterval: 50 }) }) }); // fun facts counting $('.pixelcoder_counter').countTo({ speed: 800 }); // flickr feed $('.flickr-widget').jflickrfeed({ limit: 9, qstrings: { id: '37304598@N02' }, itemTemplate: '
  • ' + '' + '{{title}}' + '' + '
  • ' }); // Twitter Feed //$(".latest-tweets").twittie(); // Twitter slider $("ul.tweet-slider").bxSlider({ pager: false, auto: true }); });