/* Menu Page Scroller */
jQuery(function(){
    jQuery('#menu li a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = jQuery(this.hash);
            $target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                jQuery('html,body').animate({scrollTop: targetOffset}, 750);
                return false;
            }
        }
    });
});

/* Slider */

function slideSwitch() {
    var $active = jQuery('#slider IMG.active');
    if ( $active.length == 0 )
	$active = jQuery('#slider IMG:last');
	var $next =  $active.next().length ? $active.next() : jQuery('#slider IMG:first');
	$active.addClass('last-active');
	$next.css({opacity: 0.0})
	.addClass('active')
	.animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); });
	}

jQuery(function() { 
	setInterval( "slideSwitch()", 4000 );
	});
