jQuery(function($) {
	$('.menu .sub').css('display', 'none');
	var don;	
	if (Modernizr.touch){
		$('.donate').click(function(){
			don = $(this).parent('form').attr('action');
		});
		$('.menu li.ddm').toggle(function() {
			$(this).find('.sub').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.sub').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});
		//ribbon functions
	   $('.alumni_login .ribbon_title').toggle(function() {
			$(this).find('.login_expand').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.login_expand').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});
		$('.donations .ribbon_title').toggle(function() {
			$(this).find('.donate_expand').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.donate_expand').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});
	} else {
		//submenu functions	
		$('.menu .sub').css('display', 'none');
		
		$('.menu li').hover(function() {
			$(this).find('.sub').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.sub').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});
	 
		//ribbon functions
	   $('.alumni_login').hover(function() {
			$(this).find('.login_expand').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.login_expand').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});

		$('.donations').hover(function() {
			$(this).find('.donate_expand').hide().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		}, function() {
			$(this).find('.donate_expand').show().stop(true, true).animate({
				height: 'toggle'
			}, {
				duration: 200
			});
		});
	}

});

