//This is the script for the NewsBoxes on the opening page
//It was taken from code created by Sam Dunn. You can find the his code and how to implement here: http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery
//Thanks Sam!


			$(document).ready(function(){
				//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
				//Vertical Sliding for news items on opening page
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'200px'},{queue:false,duration:500});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:800});
				});
				
				//For news items on opening page:
				$('.boxgridSector.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:800});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:800});
				});
				
				//Caption Sliding (Partially Hidden to Visible)
//				$('.boxgridSector.caption').hover(function(){
//					$(".cover", this).stop().animate({top:'200px'},{queue:false,duration:500});
//				}, function() {
//					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:800});
//				});

				//Full Caption Sliding (Hidden to Visible) ONE box high.
				$('.boxgridSector.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'106px'},{queue:false,duration:700});
				});

				//Full Caption Sliding (Hidden to Visible) TWO boxes high.
				$('.boxgridSector.captionfull2').hover(function(){
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'206px'},{queue:false,duration:700});
				});
	





				//Horizontal Sliding
	//			$('.boxgrid.slideright').hover(function(){
	//				$(".cover", this).stop().animate({left:'-200px'},{queue:false,duration:300});
	//			}, function() {
	//				$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
	//			});
				
	
	//			//Diagnal Sliding
	//			$('.boxgrid.thecombo').hover(function(){
	//				$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
	//			}, function() {
	//				$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
	//			});
	
				//Partial Sliding (Only show some of background)
	//			$('.boxgrid.peek').hover(function(){
	//				$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
	//			}, function() {
	//				$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
	//			});
	
	

	
			});
		

