$(document).ready(function(){

	$(".photoalbum_thumbs a").each(function() {
		s = $(this).children('img').attr('src').replace('AlbumThumb.','');
		$(this).attr('href',"javascript:thumbClick('" + s + "')");
	}).hover(
		function(){
			$(this).addClass('thumbHover');
		},
		function(){
			$(this).removeClass('thumbHover');
		}
	);
	
});

var img = new Array();
function thumbClick(s){

	id = uid();
	img[id] = new Image();
	img[id].onload = function(){
		img[id].onload = null;
		w = img[id].width;
		h = img[id].height;
		popWindow(s,w,h);
	}
	img[id].src = s;
		
}
