// Auto-Adjust column heights in row using class .auto-height // ---------------------------------------------------------- $( document ).ready(function() { if ( $( ".auto-height" ).length ) { var heights = $(".auto-height").map(function() { return $(this).height(); }).get(), maxHeight = Math.max.apply(null, heights); $(".auto-height").height(maxHeight); } }); // Slider // ------ $(document).ready(function() { if ( $( ".slider-container" ).length ) { var options = { nextButton: true, prevButton: true, pagination: true, animateStartingFrameIn: true, autoPlay: true, autoPlayDelay: 30000, preloader: true, preloadTheseFrames: [1] }; var mySequence = $("#sequence").sequence(options).data("sequence"); } }); // Radial Progress // --------------- $(document).ready(function() { $('.radial-progress').waypoint(function(direction) { $(this).attr('data-progress', $(this).attr('data-finish')); } , { offset: function() { return $.waypoints('viewportHeight') - $(this).height(); } }); }); // Expand content header $(document).ready(function() { $("#link_content-header").click(function () { var container = $(this); $('#content-header').slideToggle("fast"); }); }); /** * This code changes the default behavior of the navbar: * now the submenu pops in when the user rolls his mouse * over the parent level menu entry. * Many tanks to Hanzi for this idea and code! */ jQuery(document).ready(function($) { $('ul.nav li.dropdown, ul.nav li.dropdown-submenu').hover(function() { $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeIn(); }, function() { $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeOut(); }); }); //ThemeWit Twitter widget slider $(document).ready(function(){ $('#tw-tweet-slider div:gt(0)').hide(); setInterval(function(){ $('#tw-tweet-slider div:first-child').fadeOut(0) .next('div').fadeIn(1000) .end().appendTo('#tw-tweet-slider');}, 10000); }); // Sticky header $(window).scroll(function() { if ($(this).scrollTop() > 50){ $('.main-menu').addClass("sticky"); } else{ $('.main-menu').removeClass("sticky"); } });