function menuListener()
{
	jQuery('#mainNav>li').hover(
		function(){
			jQuery(this).find('ul').show();
		},
		function(){
			jQuery(this).find('ul').hide();		
		}
	);
} 

function comboListener()
{
   jQuery('.news_combo .redlink a:eq(1)').hide();
	jQuery('.news_combo .content:eq(0)').show();
	jQuery('.news_combo .head h2').click(
		function(){
			var idx = jQuery('.news_combo .head h2').index(jQuery(this));
         jQuery('.news_combo .head h2 a').removeClass('active');
			jQuery(this).find('a').addClass('active');
			jQuery('.news_combo .body>div').not('.bl').not('.br').hide();
			jQuery('.news_combo .body .content:eq('+idx+')').show();
         jQuery('.news_combo .redlink a:eq(2)').hide();
		}
	);
} 


function toTopLink() {
   jQuery('#toTop a').attr('href', location.href + '#top');
}


function init()
{
	menuListener();	
	toTopLink();
	if(jQuery('.news_combo').length > 0)
    comboListener();
	 
	if(jQuery('#imageFlow').length > 0)
	{
		var iFlow = new ImageFlow();
		iFlow.init({ ImageFlowID: 'imageFlow' });

	}
}

jQuery(init);