$(document).ready(function(){
	
	$('#nojs').remove();

	$('#top-nav a').hover(
		function(){$(this).stop().animate({'color' : '#cc0000'}, 50);},
		function(){$(this).stop().animate({'color' : '#666'}, 300);	
	});	
	
	$('#nav li').hover(
		function(){$(this).find('a').stop().animate({'color' : '#333'}, 50);},
		function(){$(this).find('a').stop().animate({'color' : '#888'}, 300);	
	});		
	
	$('#f-nav a').hover(
		function(){$(this).stop().animate({'color' : '#252525'}, 50);},
		function(){$(this).stop().animate({'color' : '#999'}, 300);	
	});			
	
	$('#ogk').hover(
		function(){$(this).stop().animate({'color': '#cc0000' }, 200);},
		function(){$(this).stop().animate({'color': '#252525' }, 400);
	});	
	$('#btn-back').hover(
		function(){$(this).stop().animate({'color': '#cc0000' }, 200);},
		function(){$(this).stop().animate({'color': '#252525' }, 400);
	});				
	$('#btn-view').hover(
		function(){
			$(this).stop().animate({ backgroundColor: '#fff' }, 200);
		
		},
		function(){
			$(this).stop().animate({ backgroundColor: '#cc0000' }, 400);
	});	
	$('#quote a').hover(
		function(){$(this).stop().animate({ backgroundColor: '#252525' }, 200);},
		function(){$(this).stop().animate({ backgroundColor: '#cc0000' }, 400);
	});						

	$('#nav li ul li a').prepend('<em></em>');
	$('#nav li ul li a').hover(
		function(){$(this).find('em').stop().fadeTo(25, 1);}, 
		function(){$(this).find('em').stop().fadeTo(500, 0);}
	);				
	$('#footer ol a').hover(
		function(){$(this).stop().fadeTo(100, 0);}, 
		function(){$(this).stop().fadeTo(500, 1);}
	);	
	
	$('.blank').click(function(){ window.open(this.href);return false });

	$('.fix').fadeOut(900);
	
    $('.fw').cycle({
			fx: 'fade',
            random: 1,
			speed: 1000,
            delay: 0,
			timeout: 6000,
	        prev:    '#prev',
	        next:    '#next',
      		pagerAnchorBuilder: pagerFactory
    });
    function pagerFactory(idx, slide) {
        var s = idx > 2 ? ' style="display:none"' : '';
        return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';
    };
		


 $('noscript').remove();
 
 	if($('.home').length)
	{
		$('#home-ss ul').fadeIn(2400);			
	}
 	if($('#newsletterform').length)
	{
		$("#newsletterform").validate();	
	}		

});

