$(function() {
		   
	$('#nav').supafly();
	
	$('#nav li:first-child').css("border-left", "none");
	$('#nav li:last-child').css("border-right", "none");
	$('.content-boxes .box:last').css("margin-right", "0");
	$('.box-content .icon-list li:first-child').find('span').css("border-top", "none");
	$('.box-content .icon-list li:last-child').find('span').css("border-bottom", "none");
	$('.box-content .post:not(:first-child)').css("padding-top", "10px");
	$('#left-col .section:first-child').css("border-top", "none");
	$('#left-col .section:last-child').css("border-bottom", "none");
	$('.left-col-list li:first-child').css("border-top", "none");
	$('.left-col-list li:last-child').css("border-bottom", "none");
	$('.box ul li:first-child').css("border-top", "none");
	$('.box ul li:last-child').css("border-bottom", "none");
	$('<div class="box-bottom"></div>').appendTo('#left-col');
	$('#middle-col img[align="left"]').css("margin-right", "25px");
	$('#middle-col img[align="right"]').css("margin-left", "25px");
	$('a.btn').wrapInner('<span>');
	
/*initial*/
$('.newsitem').eq(0).animate({'top' : '7px'},500);
$('.newsitem').eq(1).animate({'top' : '59px'},700);
$('.newsitem').eq(2).animate({'top' : '112px'},900);
$('.morenews').fadeIn(100);

/*starts loop*/
$('.morenews').click(function() {
$('.newsitem').animate({'top' : '165px'},0);
$('.morenews').fadeOut(100);
$('.morenews1').fadeIn(100);
$('.newsitem').eq(3).animate({'top' : '7px'},500);
$('.newsitem').eq(4).animate({'top' : '59px'},700);
$('.newsitem').eq(5).animate({'top' : '112px'},900);
});

$('.morenews1').click(function() {
$('.newsitem').animate({'top' : '165px'},0);
$('.morenews1').fadeOut(100);
$('.morenews2').fadeIn(100);
$('.newsitem').eq(6).animate({'top' : '7px'},500);
$('.newsitem').eq(7).animate({'top' : '59px'},700);
$('.newsitem').eq(8).animate({'top' : '112px'},900);
});

/*returns to first 3 entrries here 0,1,2*/
$('.morenews2').click(function() {
$('.newsitem').animate({'top' : '165px'},0);
$('.morenews2').fadeOut(100);
$('.morenews').fadeIn(100);
$('.newsitem').eq(0).animate({'top' : '7px'},500);
$('.newsitem').eq(1).animate({'top' : '59px'},700);
$('.newsitem').eq(2).animate({'top' : '112px'},900);
});

var newPhoto = new Image();
  newPhoto.src = '/images/navtp-arrow2.jpg';

//$('#nav li a.nv2').parent().css({'width' : '123px' , 'text-align' : 'center'});
	
});
