
function slideSwitch() {
    var $active = $('.slideshow li.active');
    if ( $active.length == 0 ) $active = $('#slideshow li:last');
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next() : $('.slideshow li:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
$(function(){
	$('#recent-scroller').jScrollPane();
	$('#scroller').jScrollPane();
	setInterval( "slideSwitch()", 4000 );
});
$(document).ready(function() {
  $('.title').each(function() {
    var text = $(this).html();
    var first_letter = text.substr(0,1);
    if ( /[a-zA-Z]/.test(first_letter) ) {
      $(this).html('<span class="init-cap">' + first_letter + '</span>' + text.slice(1));
    }
  });
  $(".mobilemenu a").click(function(){
    $("#main-menu").toggle();
    return false;
  });
});

