$(document).ready (
function () {
	click_once=true;
	$(".thumbs").click( function (event) {
	if(click_once) {
	click_once=false;
	
	old_src=$(".gallery .pic img").attr("src");
	new_src=$(this).find("img").attr("src");
	event.preventDefault();
	/*
	$(".gallery .pic img").attr("src", new_src );
	$(this).find("img").attr("src",old_src);*/
	
	thumb_html=$(this).html();
	this_thumb=$(this);
	thumb_index=$('.thumbs').index(this);
	$(this).css('position','relative');
	$(this).html('<div id="old_small">'+thumb_html+'</div><div id="new_small" style="position:absolute;top:0px;bottom:0px;display:none">'+thumb_html+'</div>');
	$("#new_small img").attr('src',old_src);
	$("#new_small").fadeIn(1000);
	$("#old_small").fadeOut(1000);
	$(this).html( $("#new_small").html() );
	$(this).css('position','static');
	
	
	$('.gallery .pic').css('position','relative');
	pic_html=$('.gallery .pic').html();
	$('.gallery .pic').html('<div id="old">'+pic_html+'</div><div id="new" style="position:absolute;top:0px;bottom:0px;display:none">'+pic_html+'</div>');
	$("#new img").attr('src',new_src);
	$("#new").fadeIn(1000);
	$("#old").fadeOut(1000,function() {	$('.gallery .pic').html($("#new").html()); click_once=true;} );
	}
	else {event.preventDefault();}
	});

	$('#navi .rend').hover (function() {  $(this).css("overflow","visible")},
							function() { $(this).css("overflow","hidden")});
});
