// Easy Slider
$(document).ready(function(){	
	$("#slider").easySlider({
		auto: true, 
		continuous: true,
		speed: 800,
		pause: 4500
	});
});	


// Navigation (Fade Effect)
$(function () {
	if ($.browser.msie && $.browser.version < 7) return;
	$('#navigation li')
		.removeClass('highlight')
		.find('a')
		.append('<span class="hover" />').each(function () {
				var $span = $('> span.hover', this).css('opacity', 0);
				$(this).hover(function () {
					// on hover
					$span.stop().fadeTo(200, 1);
				}, function () {
					// off hover
					$span.stop().fadeTo(100, 0);
				});
		});		
});


// Random Quotes
$(function() {
	var randomNum = Math.floor(Math.random()*5);
	$('div#quote-box-text div:eq(' + randomNum + ')').css("display", "block");
	$('div#quote-author div:eq(' + randomNum + ')').css("display", "block");
});


// Smooth Scroll
$(document).ready(
	function(){		
	$('a[href^=#]:not([href=#])').click( function() {
		var x = $(this.hash);
		if( x.length ) {
			$('html,body').animate( { scrollTop: x.offset().top - 20 }, 500 );
				return false;	         
		}
	});

});
