function slideSwitch(switchSpeed) {
    var $active = $('#slideshow IMG.active');
    
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next('IMG').length ? $active.next('IMG')
        : $('#slideshow IMG:first');

    $active.addClass('last-active');
    
    
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, switchSpeed, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval ( "slideSwitch(1000)", 5000 );    
});

$(function() {
$("#servicesbtn").mouseover( function() {
	$('#portfolio-menu').hide();
    $("#services-menu").animate({height:"show",opacity:"show"},"slow"); return false;
	
  });
$("#services-menu").hover( function() {},
  function() { $("#services-menu").animate({opacity:1.0},1125).slideUp(375); return false;
  });

})

$(function() {
$("#portfoliobtn").mouseover( function() {
	$('#services-menu').hide();
    $("#portfolio-menu").animate({height:"show",opacity:"show"},"slow"); return false;
});
$("#portfolio-menu").hover( function() {},
  function() { $("#portfolio-menu").animate({opacity:1.0},1125).slideUp(375); return false;
  });
})