$(document).ready(function(){
	$('.content-nav .active').children('a').addClass('current');
	if($('.notice-container').length > 0){
		var width;
		var timer = setInterval(function(){
			$('.notice-container p:first').css({ marginTop: 20, width: $('.notice-container').outerWidth() - $('.notice-container img:first').outerWidth() - 20 });
			width = $('.notice-container p:first').outerWidth();
			$('.notice-container img:first').css({ float: 'right', marginBottom: 10 });
			if($('.notice-container p:first').outerWidth() == width){
				clearInterval(timer);
				$('.notice-container').animate({ opacity: 1 });
			}
		},500);
	}
	$('.headernav ul li').live('mouseover', function(){
		$(this).addClass('clicked').children('ul').fadeIn(100);
	}).live('mouseleave', function(){
		$(this).removeClass('clicked').children('ul').fadeOut(100);
	});
});
