$(function(){
//	$('a[rel=lightbox]').lightBox({fixedNavigation:false});
	$('a[rel=window]').live("click",function(){
		var url = $(this).attr("href");
		window.open(url,'','')
		return false;
	});

	//女性詳細
	$("a[rel=girldetail]").live("click",function(){
		var url = $(this).attr("href");

		var Left=((screen.width-820)/2);
		var Top=((screen.height-800)/2);
	
		var lady = window.open(url, 'ladyDetail', 'width=820,height=800, left='+Left+', top='+Top+', status=1, menubar=0, scrollbars=1, resizable=0');
		if(window.focus){ lady.focus(); }
		return false;
	});

	$("a[rel=newsLink]").live("click",function(){
		var newsurl = $(this).attr("href");

		$.ajax({
			type: "get",
			url: newsurl,
			cache: false,
			beforeSend: function(){
				$("#newsComment").html("<img src='/img/loading.gif' />");
			},
			dataType: "html",
			success: function(data){
				$("#newsComment").show().html(data);
			}
		});

		return false;
	});
	
	$("a[rel=photolink]").live("click",function(){
		var photourl = $(this).attr("href");

		$.ajax({
			type: "get",
			url: photourl,
			cache: false,
			beforeSend: function(){
				$("#mailBox").html("<img src='/img/loading.gif' />");
			},
			dataType: "html",
			success: function(data){
				$("#mailBox").show().html(data);
			}
		});

		return false;
	});

	$("a[rel=topicsLink]").live("click",function(){
		var topicsurl = $(this).attr("href");

		$.ajax({
			type: "get",
			url: topicsurl,
			cache: false,
			beforeSend: function(){
				$("#topicsComment").html("<img src='/img/loading.gif' />");
			},
			dataType: "html",
			success: function(data){
				$("#topicsComment").show().html(data);
			}
		});

		return false;
	});

	var x,y,scrollTop,mouseY, mouseX,scrollLeft;
	$(window.document).mousemove(function(e){
		x = e.pageX;
		y = e.pageY;
		mouseY = e.pageY;
		mouseX = e.pageX;
		$("#loading").css("left",x);
		$("#loading").css("top",y);
//		scrollTop = window.pageYOffset || document.documentElement.scrollTop;
		scrollFigure = document.documentElement.scrollTop || document.body.scrollTop;
		scrollTop = document.documentElement.clientHeight || document.body.scrollHeight;
		scrollTop = scrollTop + (scrollFigure*2);
		scrollLeft = document.documentElement.clientWidth || window.innerWidth;
		
	});


});
