Cufon.replace('#news h1', {fontFamily: 'FranklinGothic_DemiCnd'} );

(function($){
$(document).ready( function()
{
	activeCss =  {
		'width': '44px',
		'height': '44px',
		'marginTop': '0',
		'marginLeft': '3px'
	};	
	
	inactiveCss = {
		'width': '30px',
		'height': '30px',
		'marginTop': '7px',
		'marginLeft': '10px'
	};
	
	$('#thumbs .color').hide();
	var activeThumb = $('#thumbs li:first');
	activeThumb.find('img').css( activeCss );
	activeThumb.find('.color').show();
	
	$('#thumbs li').hover( function()
	{
		if (!$(this).find('a').hasClass(activeThumb.find('a').attr('class'))) {
			$(this).find('.grey').hide();
			$(this).find('.color').show();
			$(this).find('img').animate(activeCss, {
				duration: 250
			});
		}
	},
	function()
	{
		if (!$(this).find('a').hasClass(activeThumb.find('a').attr('class'))) {
			$(this).find('.grey').show();
			$(this).find('.color').hide();			
			$(this).find('img').animate(inactiveCss, {
				duration: 250
			});
		}
	} );
	
	$('#thumbs li').click( function()
	{
		if (!$(this).find('a').hasClass(activeThumb.find('a').attr('class'))) {
			
			$('#thumbs .color').hide();
			$('#thumbs .grey').show();
			$(this).find('.grey').hide();
			$(this).find('.color').show();
			
			var fma = '.' + $(this).find('a').attr('class');
			$('#fma .message').hide();
			$('#fma ' + fma).fadeIn( 'slow' );
			
			
			activeThumb.find('img').animate(inactiveCss, {
				duration: 250
			});
			
			activeThumb = $('#thumbs li ' + fma).parent();
			activeThumb.find('img').css(activeCss);
		}
	} );
	
	$('.around').click( function()
	{
		$('#tab-news').css( 'display', 'none' );
		$('#tab-web').css( 'display', 'block' );

		$(this).removeClass( 'tab' ).removeClass( 'active' ).addClass( 'active' );
		$('.uja').removeClass( 'active' ).removeClass( 'tab' ).addClass( 'tab' );
	} );
	
	$('.uja').click( function()
	{
		$('#tab-web').css( 'display', 'none' );
		$('#tab-news').css( 'display', 'block' );

		$(this).removeClass( 'tab' ).removeClass( 'active' ).addClass( 'active' );
		$('.around').removeClass( 'active' ).removeClass( 'tab' ).addClass( 'tab' );	
	} );
});
})(jQuery);