
/* ================================================================ 
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
=================================================================== */
/* <![CDATA[ */
$(document).ready(function(){
/* show first image and information */
firstStr = $('.thumb');
showStr = firstStr.html();
showDiv(showStr)
$('.thumb').children(":first") .css("background", "#000");


/* monitor mouse clicks */
$('.thumb').click(function(){
$('.thumb img')				.css("backgroundColor", "#fff");
$(this).children(":first")	.css("background", "#000");
htmlStr = $(this).html();

/* swap images and information */
	$('#fullSize div')	.slideUp(500);
	$('#fullSize img')	.animate({"width": "1px"}, 400)
						.animate({"height": "0px"}, 400, function(){showDiv(htmlStr)});
});

/* show image and information */
function showDiv (htmlStr) {
	$('#fullSize')		.html(htmlStr);
	$('#fullSize img')	.hide();
	$('#fullSize div')	.hide();
	imgWidth = ($('#fullSize img').outerWidth());
	imgHeight = ($('#fullSize img').outerHeight());
	$('#fullSize div')	.css("width",imgWidth + "px");
	$('#fullSize img')	.css("height", "1px")
						.css("width", "1px")
						.animate({"height": imgHeight}, 400)
						.animate({"width": imgWidth}, 400, function(){showInfo()});
}

function showInfo () {
	$('#fullSize div')	.slideDown(750);
}

});
/* ]]> */

