$(function(){
$("#section5").animate({"left":"0"},{duration: 1500, easing:'easeOutQuint'});
$("#footer").fadeIn(3000);
$(".gallery h1").live("click",function(){
history.back();
});
$(window).bind("load",function(){
$(".image_list img").each(function(){
var f = $(this).parents("li").children("em").text().replace('(',"").replace(')',"");
var tw = $(this).attr("width");
var th = $(this).attr("height");
$(this).parents("li").children("em").css({"margin-left":tw/2-10});
$(this).parents("li").children("p").css({"margin-left":-tw/2-15});
for(r=f;r>0;r--){
$(this).after('
');
}
});
$("#section5").css("background-image","url(img/photo/13.01.09/01.jpg)");
});
$("a.jamp").live("click",function(){
var cH = $(this).offset().top-$(".image_list").offset().top-($(".image_list").height()/2);
$(".open ul").remove();
$(".open").attr("class","close");
var getHTML=$(this).parent("li").html();
var getDate=$(this).attr("href");
$(this).parent("li").attr("class","open");
// $("#section5 .content").before('
');
$(this).parent("li").html('
').load(getDate + " .image_list ul",
function(){
// var lls = $(".open ul li:last-child").offset().left;
// var llw = $(".open ul li:last-child").width();
$(".open ul li+li").css({"margin-left":"-150px"});
$(".image_list").animate({scrollTop:"+="+cH},2000);
$(".gallery li ul li + li").animate({"margin-left":"10px","opacity":"1"},{duration: 2000, easing:'easeOutQuint'});
// $(".open ul").css({"width":(lls+llw-20)});上手くいかない
$(".open").append(getHTML);
$("#section5").css({"background-image":'url("'+$(".open img").attr("src")+'")'});
}
);
/*
$("#section5 .fade").animate({"opacity":"1"},500,function(){
$("#section5 .fade").animate({"opacity":"0"},{duration: 500, easing:'easeOutQuint'},function(){$(this).remove()});
});
*/
return false;
});
$('.open li a[rel=lightbox]').live("click",function(){
$(".open li img").css({"border-color":"#ccc","opacity":"0.8"});
$(this).children("img").css({"border-color":"#fff","opacity":"1"});
var SRC = $(this).attr("href");
var Txt = $(this).children("img").attr("title");
var cW = $(this).offset().left-($(".open").width()/2);
$(".open").animate({scrollLeft:"+="+cW},"2000",function(){
$("body").append('
'+ Txt +'
');
$(".light_box").fadeIn();
$(".light_box img").bind("load",function(){
var Perh =$(window).height();
var h = $(this).height();
var w = $(this).width();
var mt = (Perh - h)/2-10;
$(this).css({"height":"0","width":"0"});
$(this).css({"margin-top":Perh/2-10});
if(Txt!=""){
$(".light_box p").animate({"height":"50"});
}
$(this).animate({"width":w},"1000",function(){
$(this).animate({"height":h,"margin-top":mt},{duration: 1000, easing:'easeOutQuint'});
});
});
});
return false;
});
$(".light_box img").live("click",function(){
$(".light_box").fadeOut(function(){$(this).remove()});
});
});
/* * * * * * * * * * * * * * * * * * * * *
CopyrightⒸwebstudio WhitePallet™
* * * * * * * * * * * * * * * * * * * * */