jQuery.fn.wait = function(time, type) {
	time = time || 1000;
	type = type || "fx";
	return this.queue(type, function() {
		var self = this;
        setTimeout(function() {
        	jQuery(self).dequeue();
        }, time);
    });
};

$(document).ready(function() {
	$("#secondary-links ul li").wait().hover(
		function() {
			$('ul', this).show();
			$(this).addClass('over');
		},
		function() {
			$('ul', this).hide();
			$(this).removeClass('over');
		}
	);	
	
	$("#search-box input#edit-submit").hover(
		function() {
			$(this).attr('src', 'http://www.oneonta.edu/home/images/search-button_over.jpg');
		},
		function() {
			$(this).attr('src', 'http://www.oneonta.edu/home/images/search-button.jpg');
		}
	);		
});
