jQuery(document).ready(function($){ "use strict"; /* ---------------------------------------------------------------------- */ /* Prettyphoto /* ---------------------------------------------------------------------- */ if($("[rel^='prettyPhoto']").length){ $("[rel^='prettyPhoto']").prettyPhoto(); } /* ---------------------------------------------------------------------- */ /* ToolTip /* ---------------------------------------------------------------------- */ if($("[data-toggle='tooltip']").length){ $('[data-toggle="tooltip"]').tooltip(); } /* ---------------------------------------------------------------------- */ /* Owl Slider /* ---------------------------------------------------------------------- */ if($("#owl-demo").length){ var owl = $("#owl-demo"); owl.owlCarousel({ itemsCustom : [ [0, 2], [450, 2], [700, 3], [1000, 5], [1200, 5], [1360, 6], ], navigation : true }); } /* ---------------------------------------------------------------------- */ /* Owl Slider /* ---------------------------------------------------------------------- */ if($(".owl-client").length){ var owl = $(".owl-client"); owl.owlCarousel({ itemsCustom : [ [0, 2], [450, 2], [700, 3], [1000, 4], [1200, 4], [1360, 4], ], navigation : true }); } /* ---------------------------------------------------------------------- */ /* Owl Slider /* ---------------------------------------------------------------------- */ if($(".owl-banner").length){ var owl = $(".owl-banner"); owl.owlCarousel({ itemsCustom : [ [0, 2], [450, 2], [700, 3], [1000, 3], [1200, 3], [1360, 3], ], navigation : true }); } /* ---------------------------------------------------------------------- */ /* Sticky header /* ---------------------------------------------------------------------- */ if($('.header-style-333').length){ // grab the initial top offset of the navigation //var stickyNavTop = $('#mainbanner').offset().top; var stickyNavTop = 40; // our function that decides weather the navigation bar should have "fixed" css position or not. var stickyNav = function(){ var scrollTop = $(window).scrollTop(); // our current vertical position from the top // if we've scrolled more than the navigation, change its position to fixed to stick to top, // otherwise change it back to relative if (scrollTop > stickyNavTop) { $('.header-style-3').addClass('kf_sticky'); } else { $('.header-style-3').removeClass('kf_sticky'); } }; stickyNav(); // and run it again every time you scroll $(window).scroll(function() { stickyNav(); }); } /* ---------------------------------------------------------------------- */ /* Responsive DL Menu /* ---------------------------------------------------------------------- */ if(typeof($.fn.dlmenu) == 'function'){ $('#kode-responsive-navigation').each(function(){ $(this).find('.dl-submenu').each(function(){ if( $(this).siblings('a').attr('href') && $(this).siblings('a').attr('href') != '#' ){ var parent_nav = $('
'); parent_nav.append($(this).siblings('a').clone()); $(this).prepend(parent_nav); } }); $(this).dlmenu(); }); } /* ---------------------------------------------------------------------- */ /* Progress Bar /* ---------------------------------------------------------------------- */ if($('.custom-skills .progress .progress-bar').length){ $('.custom-skills .progress .progress-bar').progressbar({display_text: 'fill'}); } /* ---------------------------------------------------------------------- */ /* Circle Progress /* ---------------------------------------------------------------------- */ if($('.circle-progress').length){ $('.circle-progress').percentcircle({ animate : true, diameter : 1.0, guage: 0.3, coverBg: '#fff', bgColor: '#efefef', fillColor: '#CC3367', percentSize: '10px', }); } /* ---------------------------------------------------------------------- */ /* Scroll To TOp /* ---------------------------------------------------------------------- */ if($("#link").length){ $("#link").click(function() { scrollToAnchor('id3'); }); } /* ---------------------------------------------------------------------- */ /* Accordion Script /* ---------------------------------------------------------------------- */ if($('.accordion').length){ //custom animation for open/close $.fn.slideFadeToggle = function(speed, easing, callback) { return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); }; $('.accordion').accordion({ defaultOpen: '#section2', cookieName: 'nav', speed: 'slow', animateOpen: function (elem, opts) { //replace the standard slideUp with custom function elem.next().stop(true, true).slideFadeToggle(opts.speed); }, animateClose: function (elem, opts) { //replace the standard slideDown with custom function elem.next().stop(true, true).slideFadeToggle(opts.speed); } }); } /* ---------------------------------------------------------------------- */ /* CountDown Script /* ---------------------------------------------------------------------- */ if($('#defaultCountdown').length){ var austDay = new Date(); austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); $('#defaultCountdown').countdown({until: austDay}); $('#year').text(austDay.getFullYear()); } /* ---------------------------------------------------------------------- */ /* Select Menu /* ---------------------------------------------------------------------- */ if($(".select-menu").length){ $(".select-menu").selectbox(); } /* ---------------------------------------------------------------------- */ /* Range Slider /* ---------------------------------------------------------------------- */ if($(".range").length){ $(".range").slider(); $(".range").on("slide", function(slideEvt) { $(".range-slider").text(slideEvt.value); }); } /* ---------------------------------------------------------------------- */ /* Range Slider /* ---------------------------------------------------------------------- */ if($(".range2").length){ $(".range2").slider(); $(".range2").on("slide", function(slideEvt) { $(".range-slider2").text(slideEvt.value); }); } /* ---------------------------------------------------------------------- */ /* Bx Slider /* ---------------------------------------------------------------------- */ if($(".bxslider").length){ $('.bxslider').bxSlider({ auto:true }); } /* ---------------------------------------------------------------------- */ /* Bx Slider Thumbnail /* ---------------------------------------------------------------------- */ if($(".bxslider-thums").length){ $('.bxslider-thums').bxSlider({ auto:true, pagerCustom: '#bx-pager' }); } /* ---------------------------------------------------------------------- */ /* Counter /* ---------------------------------------------------------------------- */ if($('.counter').length) { $('.counter').counterUp({ delay: 10, time: 1000 }); } /* ---------------------------------------------------------------------- */ /* Contact Form /* ---------------------------------------------------------------------- */ if($('#contactform').length) { var $form = $('#contactform'), $loader = '
';
$form.append('