$(document).ready( function() {
	$('a.home_news_title').click(function() {
		$('a.home_news_title.active').removeClass('active');
		$('.home_news_details').hide();
		$(this).toggleClass('active');
		$(this).next().fadeToggle();
	});


	$('.business_click').click(function()  {
		$(this).toggleClass('active');
		$('.project_click, .finance_click').removeClass('active');
		
		$('.company_project').hide();
		$('.company_finance').hide();
		$('.company_business').fadeToggle();
	});
	
	$('.project_click').click(function()  {
		$(this).toggleClass('active');
		$('.business_click, .finance_click').removeClass('active');
		
		$('.company_business').hide();
		$('.company_finance').hide();
		$('.company_project').fadeToggle();
	});
	
	$('.finance_click').click(function()  {
		$(this).toggleClass('active');
		$('.business_click, .project_click').removeClass('active');
		
		$('.company_project').hide();
		$('.company_business').hide();
		$('.company_finance').fadeToggle();
	});


/*
	$('.slideshow').cycle({
		fx: 'fade',
		speed:  800,
		timeout: 4000,
		prev: '#prev',
		next: '#next',
		pager:  '#nav',
		slideExpr: 'div.home_feat_item'
	});	
*/

$('.slideshow').each(function(index) {
        $(this).cycle({
			fx: index ? 'fade' : 'scrollRight',
			timeout: 10000,
			speed:   800,
			sync:    true,
			prev: '#prev',
			next: '#next',
			pager:  '#nav',
			cleartype: false,
			pagerAnchorBuilder: function(i) {
				if (index == 0)
					// for first slideshow, return a new anchro
					return '<a href="#">'+(i+1)+'</a>';
				// for 2nd slideshow, select the anchor created previously
				return '#nav a:eq('+i+')';
        	}
		});
    });
	
});
