$(document).ready(function() {

	$(".mouseoverfade").mouseover(function () {
		$(this).fadeTo("fast", .60);
	});
	$(".mouseoverfade").mouseout(function () {
		$(this).fadeTo("fast", 1);
	});
	
	// Effects for main navigation menu including IE fix
	$("#nav li").hover(
		function() { 
			$('ul', this).slideDown(1);
			$(this).addClass("iehover"); 
		},
		function() { 
			$('ul', this).slideUp(1);
			$(this).removeClass("iehover");
			
	});

	// Add rounded corner on bottom of main navigation menu
	DD_roundies.addRule('.rounded', '0 0 0 25px', true);
});





/*******

	***	Anchor Slider  ***
	
	Never have an anchor jumping your content, slide it.
	
*****/
		


$(document).ready(function() {
	$("a.anchorLink").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}
