(function($){ $(document).ready(function(){ (function() { $(window).on("load resize orientationchange",function(e){ if($(window).width() < 768){ $("#logo").detach().appendTo($(".navbar-static-top")); } else{ $("#logo").detach().appendTo('#menu-bar .container .col-sm-3') } $(".home #header").height($("#header-top").height() + $(".slider_block").height()); }); })(); var abc = $('.vertical-tab .nav-tabs').width(); $('.vertical-tab .tab-content').css("margin-left", abc-1); /* Sticky Header */ if(jQuery.isFunction(jQuery.fn.sticky)){ $(window).load(function(){ $("#menu-bar").sticky({ topSpacing: 0 }); }); } /* Owl Carousel */ if(jQuery.isFunction(jQuery.fn.owlCarousel)){ // preview Slider $("#preview-slider").owlCarousel({ navigation : true, pagination : false, items : 4, itemsDesktop:[1199,4], itemsTablet : [768, 3], itemsDesktopSmall : [992, 3], itemsMobile : [480,1], navigationText : ["",""] }); // Post Slider $("#post-slider").owlCarousel({ navigation : true, pagination : false, items : 4, itemsDesktop:[1199,3], itemsDesktopSmall:[980,2], itemsMobile : [479,1], navigationText : ["",""] }); } $("body").tooltip({ selector: '[data-toggle="tooltip"]' }); /* Swipe Slider */ window.mySwipe = new Swipe(document.getElementById('slider'), { startSlide: 2, speed: 400, auto: 3000, continuous: true, disableScroll: false, stopPropagation: false, callback: function(index, elem) {}, transitionEnd: function(index, elem) {} }); /* Accordians */ $('.accordion').on('shown.bs.collapse', function (e) { $(e.target).parent().addClass('active_acc'); $(e.target).prev().find('.switch').removeClass('fa-plus'); $(e.target).prev().find('.switch').addClass('fa-minus'); }); $('.accordion').on('hidden.bs.collapse', function (e) { $(e.target).parent().removeClass('active_acc'); $(e.target).prev().find('.switch').addClass('fa-plus'); $(e.target).prev().find('.switch').removeClass('fa-minus'); }); /* Toggles */ $('.toggle').on('shown.bs.collapse', function (e) { $(e.target).parent().addClass('active_acc'); $(e.target).prev().find('.switch').removeClass('fa-plus'); $(e.target).prev().find('.switch').addClass('fa-minus'); }); $('.toggle').on('hidden.bs.collapse', function (e) { $(e.target).parent().removeClass('active_acc'); $(e.target).prev().find('.switch').addClass('fa-plus'); $(e.target).prev().find('.switch').removeClass('fa-minus'); }); /* End Document */ }); })(this.jQuery); /** * jQuery Plugin to obtain touch gestures from iPhone, iPod Touch, iPad, and Android mobile phones * Common usage: wipe images (left and right to show the previous or next image) * * @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de) */ (function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(settings)$.extend(config,settings);this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false}function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault()}if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft()}else{config.wipeRight()}}else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown()}else{config.wipeUp()}}}}function onTouchStart(e){if(e.touches.length==1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false)}}if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false)}});return this}})(jQuery);