// JavaScript Document
$(document).ready(function() {
//random homepage image via ajax
	/*$("#home_slider span").load("lib/random_image.php");*/
/**************************************************
	Sliding captions over images
**************************************************/
	//Preload image, center image, fade in image
	
	$('.boxgrid img').load(function() {
		$(this).css({
			top: ($('.boxgrid').height() - $(this).height()) / 2,
			left: ($('.boxgrid').width() - $(this).width()) / 2
		});
	});

//Full Caption Sliding (Hidden to Visible)
	$('.boxgrid.captionfull').hover(function(){
		$(".cover", this).stop().animate({top:'80px'},{queue:false,duration:200});
	}, function() {
		$(".cover", this).stop().animate({top:'162px'},{queue:false,duration:200});
	});
	
//Big image caption hide ()
	$('#home_slider').hover(function(){
		$(".home_slider_caption", this).stop().animate({top:'265px'},{queue:false,duration:200});
	}, function() {
		$(".home_slider_caption", this).stop().animate({top:'372px'},{queue:false,duration:200});
	});

//homepage slideshow
    $('.slideshow').cycle({
		fx: 'scrollLeft', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed:  500,
		timeout: 5000
	});

});
