//Drop Down Nav Fade In

(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);

$(document).ready(function() {
$("#nav > li").hover(function() {
		$(this).children("ul").css("display","none");
  		$(this).children("ul").customFadeIn(800);
		}, function () {
			$(this).children("ul").customFadeOut(100);
		});
});

//Home Page Rotation Script

$(function() {
	$('.items').cycle({ 
		fx:     'fade', 
		speed:  1000, 
		timeout: 5000, 
		next:   '.next', 
		prev:   '.prev',
		pager:  '#fadenav',
		pause:   1  
	});
});
