$( init );

function init(){
  $('#lastweek').hide();
  $('#nextweek').click(function(){
  	var lvalue = parseInt($('#weekholder').css('left'),10);
  	if(lvalue > '-818'){
	  $('#weekholder').animate({ left : "-=273" }, 2000 );
	  $('#lastweek').show();
	}
	else{
		$('#nextweek').hide();
	}    
  });
  
  $('#lastweek').click(function(){
  	var lvalue = parseInt($('#weekholder').css('left'),10);
  	if(lvalue < '0'){
	  $('#weekholder').animate({ left : "+=273"}, 2000 );
	  $('#nextweek').show();
	}
	else{
		$('#lastweek').hide();
	}   
  });
}
$(document).ready(function(){	
	$("#calloutslider").easySlider({
		auto: false,
        speed:1000,
        pause:3000,
		continuous: true 
	});
});

$(document).ready(function(){	
	$("#archiveslider").easySlider({
		auto: false,
        speed:1000,
        pause:3000, 
		continuous: false 
	});
});

$(document).ready(function(){	
	$("#promowrap").hover(
		function(){
		  $(this).css('height', '120px');
		  $("#promoico").css('width', '30px');
		  $("#promoul").css('width', '590px');
		},
		function(){
		  $(this).css('height', '30px');
		  $("#promoico").css('width', '120px');
		  $("#promoul").css('width', '500px');
		}
	);
});

$(document).ready(function(){
	$('.hided')
	.hide()
	.click(function(e) {
		
	});
	$('.unhider').toggle(function(){
		$(this).find('.hided').animate({height: 'show'}, 400, 'linear');
	}, function(){
		$(this).find('.hided').animate({height: 'hide'}, 400, 'linear');
	});
	

	
});

$(document).ready(function(){
	$('.hided2')
	.hide()
	.click(function(e) {
		
	});
	$('.unhider2').toggle(function(){
		$(this).next().animate({height: 'show'}, 400, 'linear');
	}, function(){
		$(this).next().animate({height: 'hide'}, 400, 'linear');
	});
	

	
});
