// JavaScript Document

$(document).ready(function(){
							   
		
							   
		$("#slider").easySlider({
				auto: true,
				continuous: true
		});
		
		var counter = 7;
		
		for(i=0; i < counter; i++){
			$('.flicker_large_'+i).cycle({
					fx: 'growY', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
					speed:    600, 
					timeout: 7000 + ((i * 100) + 200), 
					pause:  15
			});
		}
		
		function onAfter() { 
			$('#output').html("Scroll complete for:" + this.src);
			$('.flicker_large_'+i);
			alert(this.timeout);
		}	
		
		
		$('.boxgrid.captionfull').hover(
		function(){
			$(".cover", this).stop().animate({right:'90px'},{queue:false,duration:1000});	
			$(".backcolour img", this).stop().fadeTo(400,0.9);
			
		}, 
		function() {
			$(".cover", this).stop().animate({right:'280px'},{queue:false,duration:1000});
			$(".backcolour img", this).stop().fadeTo(400,0);
		});
		
		
		$('.boxgrid_small.captionfull_small').hover(
		function(){
			$(".cover_small", this).stop().animate({right:'10px'},{queue:false,duration:1000});	
			$(".backcolour_small img", this).stop().fadeTo(400,0.8);
		}, 
		function() {
			$(".cover_small", this).stop().animate({right:'280px'},{queue:false,duration:1000});
			$(".backcolour_small img", this).stop().fadeTo(400,0);
		});
		
		
		$('#tabs .tab_background').hover(	
		function(){
			 if ($(".tab_background_home", this).length) { 
			 	// do nothing			
			 } else {
			   $(".tabcolour img", this).stop().fadeTo(400,0.9);
			 }
		}, 
		function() {
			$(".tabcolour img", this).stop().fadeTo(400,0);

		});
		
		
		$(function() {
			$(".news_flicker").corner();
		});
	
		
});
