//boxes
$(document).ready(function(){
	//Full Caption Sliding (Hidden to Visible)
	$('.boxgrid.captionfull').hover(function(){
		$(".cover", this).stop().animate({top:'80px'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
	});
});


//banner
$(function(){
	$('#slides').slides({
		preload: true,
		preloadImage: 'img/loading.gif',
		play: 5000,
		pause: 2500,
		hoverPause: true,
		animationStart: function(){
			$('.caption').animate({
				bottom:-35
			},100);
		},
		animationComplete: function(current){
			$('.caption').animate({
				bottom:0
			},200);
			if (window.console && console.log) {
				// example return of current slide number
				console.log(current);
			};
		}
	});
});


$(function() {
// OPACITY OF TEXTPIC-IMAGE SET TO 50%
$(".csc-textpic-image").css("opacity","0.5");
		
// ON MOUSE OVER
$(".csc-textpic-image").hover(function () {									  
	// SET OPACITY TO 100%
	$(this).stop().animate({
		opacity: 1.0
		}, "normal");
		},
		// ON MOUSE OUT
		function () {		
			// SET OPACITY BACK TO 50%
			$(this).stop().animate({
			opacity: 0.5
		}, "normal");
	});
});

$(function() {
// OPACITY OF TEXTPIC-IMAGE SET TO 50%
$(".subnavi_link").css("opacity","0.5");
		
// ON MOUSE OVER
$(".subnavi_link").hover(function () {									  
	// SET OPACITY TO 100%
	$(this).stop().animate({
		opacity: 0
		}, "normal");
		},
		// ON MOUSE OUT
		function () {		
			// SET OPACITY BACK TO 50%
			$(this).stop().animate({
			opacity: 0.5
		}, "normal");
	});
});
