function lightbox(src,title,exif){
	$("#lbImage").attr("src","./css/images/loading.gif");
	$("#lbImage").attr("alt",title);
	$("#lbImage").show();
	$(".lightbox>.sc>.isc>.pager").hide();
	$(".lightbox>.sc>.isc").width(32);
	$(".lightbox>.sc>.isc").height(32);
	$(".lightbox>.sc").css("top",$(document).scrollTop()+100);
	$(".lightbox>.sc").css("left",($(document).width()-52)*.5);
	$(".lightbox").height($(document).height());
	$(".lightbox>.sc>.info>.title").html(title);
	$(".lightbox>.sc>.info>.exif").html(exif);
	$(".lightbox>.sc>.info>.close").hide();
	$(".lightbox>.sc>.info").hide();
	var img=new Image();
	img.onload=lightboxImageLoaded;
	img.src=src;
	$(".lightbox").fadeIn(150);
}
function lightboxImageLoaded(e){
	var w=e.target.width;
	if(w>($(document).width()-200)){
		w=$(document).width()-200;
		$("#lbImage").css("max-width",w);
	}
	var h=e.target.height*(w/e.target.width);
	(($(document).height()-300)<h)?$(".cover").height(h+300):void(0);
	$("#lbImage").hide();
	$("#lbImage").attr("src",e.target.src);
	$(".lightbox>.sc").animate({"left":($(document).width()-w)*.5},600);
	$(".lightbox>.sc>.isc").animate({"width":w,"height":h},600);
	setTimeout(function(){$("#lbImage").fadeIn(300);},600);
	setTimeout(function(){$(".lightbox>.sc>.info").slideDown(200);},900);
	setTimeout(function(){$(".lightbox>.sc>.info>.close").fadeIn(150);},1100);
}
function hideLightbox(){
	$("#lbImage").hide();
	$(".lightbox").fadeOut(150);
}
function showTipbox(x,y,msg,re){
	$("#tipmsg").html(msg);
	$("#tipbox").css("top",y-$("#tipbox").height());
	if(re){
		$("#tipbox>.arrow").css("margin-left",$("#tipbox").width()-20);
		$("#tipbox").css("left",x-$("#tipbox").width()+17);
	}else{
		$("#tipbox>.arrow").css("margin-left",5);
		$("#tipbox").css("left",x);
	}
	$("#tipbox").fadeIn(100);
}
function hideTipbox(){
	$("#tipbox").fadeOut(100);
}
