$(function(){ function ReSet(){ //menu $(".active_page").removeClass("active_page"); var wh = $(window).height(); var ww = $(window).width(); var cw = $(".content").width(); if(ww
'); } var py = $(PageId).offset().top; }else{ var NowP = Math.round(by/wh)+1; var py = (wh*(NowP-1)); urlHash="index"; } var SiteTitle = "RUMI's Space"; $(".navigation_menu a[href='" + urlHash + ".html']").addClass("active_page"); if(NowP=="1"){ $("html,body").animate({scrollTop:0},{duration: 3000, easing:'easeOutQuint'}); $("title").text("岡山の女子アナウンサー 蟻正るみ |"+SiteTitle); $("#to_next a").attr("href","diary.html").removeClass(); $("#footer").hide(); }else{ $("#page_style").attr("href","css/"+ urlHash +".css"); } if(NowP=="2"){ $("#section2 .diary").animate({"top":"15px","opacity":"1"},{duration: 1500, easing:'easeOutCirc'}); $("#section2 .archive").animate({"top":"15px","opacity":"1"},{duration: 1500, easing:'easeOutExpo'}); // if(urlId[1]!=""){ $(".diary").html('

').load(location.hash.replace("#","")+".html .blog_body",function(){ $(".diary").append('

'); $("#footer").fadeIn(1000); }); // } $("title").text("Diary | "+ SiteTitle); $("#to_next a").attr("href","message.html").removeClass(); }else{ $("#section2 .diary").animate({"top":"-1500px","opacity":"0"},{duration: 1500, easing:'easeInCirc'}); $("#section2 .archive").animate({"top":"1500px","opacity":"0"},{duration: 600, easing:'easeOutQuint'}); } if(NowP=="3"){ $("#section3 .message").animate({"opacity":"1"},function(){ $("#section3 #message_form").animate({"top":"0"},{duration: 2000, easing:'easeOutBounce'}); $("#section3 .rumi").animate({"left":"0"},{duration: 1000, easing:'easeInOutBack'}); $("#section3 .user").animate({"right":"0"},{duration: 1200, easing:'easeOutElastic'}); $("#footer").fadeIn(1000); }); if(urlId[1]!=""){ $(".bbs_content").html('

').load(location.hash.replace("#","")+".html .bbs_content ul"); $(".message ol .active").removeClass("active"); var Mode = urlId[1]; if(Mode==null){ var Mode = "0"; } } var Late =($(".message ol li:last-child a").text()-1); for(d=1;d<9;d++){ var VewP=(Mode - 4); if(Mode >= 4 && Mode<=Late-5){ $(".message ol li:eq("+ d +") a").attr({"href":"message-"+ (VewP+d) +".html"}).text(VewP+d+ 1); }else if(Mode<4){ var VewS=0; $(".message ol li:eq("+ d +") a").attr({"href":"message-"+ (VewS+d) +".html"}).text(VewS + d + 1); }else if(Mode>Late-5){ var VewS=(Late - 9); $(".message ol li:eq("+ d +") a").attr({"href":"message-"+ (VewS+d) +".html"}).text(VewS + d + 1); } if(Mode==0){ $(".message ol li:eq("+ d +") a").attr({"href":"message-"+ d +".html"}).text(d + 1); } if(Mode==Late){ $(".message ol li:eq("+ d +") a").attr({"href":"message-"+ (Late-9+d) +".html"}).text(Late-8+d); } } $('.message ol a[href="message-'+ Mode +'.html"]').addClass("active"); $("title").text("Message | "+ SiteTitle); $("#to_next a").attr("href","profile.html").removeClass(); }else{ $("#section3 .message").animate({"opacity":"0"},{duration: 600, easing:'easeOutQuint'}); } if(NowP=="4"){ $("#section4 .profile").animate({"opacity":"1"}, function(){ $(".profile h1").animate({"left":"0","opacity":"1"},{duration: 1000, easing:'easeInCubic'}); $(".profile h2").animate({"right":"0","opacity":"1"},{duration: 1000, easing:'easeInBack'}); } ); $("title").text("Profile | "+ SiteTitle); $("#footer").fadeIn(1000); // $("#to_next a").attr("href","gallery.html").attr("class","right"); $("#to_next a").attr("href","index.html").attr("class","up"); }else{ $(".pro_data,.work_wrap").animate({"top":"45%"}); $(".pro_data dl,.works").slideUp(); $(".profile h2").animate({"right":"500","opacity":"0"}); $(".profile h1").animate({"left":"500","opacity":"0"}, function(){ $("#section4 .profile").animate({"opacity":"0"}); } ); } if(NowP=="6"){//about_us $("title").text("About this Site | " + SiteTitle); $("#section6 .content").html('

').load(location.hash.replace("#","")+".html .about_us"); }else{ $("#section6").fadeOut(function(){$(this).remove()}); } if(NowP=="7"){//sitemap $("title").text("Site Map | " + SiteTitle); $("#section7 .content").html('

').load(location.hash.replace("#","")+".html .sitemap", function(){ if(wh<730){ $("#section7 .map4").addClass("f_left"); } } ); }else{ $("#section7").fadeOut(function(){$(this).remove()}); } if(NowP=="5"){//gallery $("#section5").load("gallery.html #section5 .content",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/11.11.23/image001.jpg)"); }); }); $("html,body").animate({scrollLeft:ww},800,function(){ $("#section5").animate({top:$(window).scrollTop()},{duration: 800, easing:'easeOutCubic'}); }); $("title").text("Gallery | " + SiteTitle); $("#to_next a").attr("href","index.html").attr("class","up"); $("#footer").fadeIn(1000); }else{ if(bx!=0){ $("html,body").animate({scrollLeft:0},800,function(){ if(NowP!="1"){ $("html,body").animate({scrollTop: py},{duration: 800, easing:'easeOutQuint'}); } }); }else if(py!=0){ $("html,body").animate({scrollTop: py},{duration: 2000, easing:'easeOutQuint'}); } } setTimeout(function(){ $("#to_next").fadeIn(); },2000); } var wh =$(window).height(); $(window).load(function(){ $("#footer").hide(); $("#section1").after('
'); $("#section1").load("index.html #section1 .content",function(){ $("#section1 .content").after('
'); $("#section1 img.rumi_body").load(function(){ var iW=$(this).width(); $("#section1 img.rumi_body").after('
Ear
'); $("#section1 img.rumi_body").animate({"opacity":"1"},{duration: 2000, easing:'easeInExpo'}); }); $(".section_foot").load("index.html #section1 .section_foot ul",function(){ /* var sfh = $(this).height(); if(sfh<100){ $(".sponsor").css({"width":"90%","margin-top":"10"}) $(".sponsor li").css({"width":"20%"}); }*/ }); }); $("#section2").load("diary.html #section2 .content",function(){ $("#section2 .content").prepend(''); $(".diary").append('

'); }); $("#section3").load("message.html #section3 .content",function(){ $("#section3 .content").prepend(''); }); $("#section4").load("profile.html #section4 .content"); $("#footer").prepend('

next

'); }); $(".atention").live("click",function(){ $(this).fadeOut(function(){$(this).remove()}); }); setTimeout(function(){ ReSet(); },1000); $(window).hashchange( function(){ setTimeout(function(){ ReSet(); },800); }) $(".navigation_menu a,#to_gallery a,#to_next a,#footer a").live("click",function(){ $("#to_next").hide(); var Page = $(this).attr("href").replace(".html",""); if(Page =="index" || Page =="" || Page =="./"){ $("html,body").animate({scrollLeft:0},500); $("#footer").fadeOut(); location.hash = "index"; }else{ location.hash = Page; } return false; }); var timer = false; $(window).bind("resize",function(){ if (timer !== false) { clearTimeout(timer); } timer = setTimeout(function() { console.log('resized'); var by = $(window).scrollTop(); var bx = $(window).scrollLeft(); var wh = $(window).height(); var ww = $(window).width(); var cw = $(".content").width(); var urlId = location.hash.replace("#","").split('-'); var urlHash = urlId[0]; if(urlHash!=""){ if(urlHash=="index"){var NowP="1";} if(urlHash=="diary"){var NowP="2";} if(urlHash=="message"){var NowP="3";} if(urlHash=="profile"){var NowP="4";} if(urlHash=="gallery"){var NowP="5";} if(urlHash=="about_us"){var NowP="6";} if(urlHash=="sitemap"){var NowP="7";} var PageId="#section"+NowP; var py = $(PageId).offset().top; }else{ var NowP = Math.round(by/wh)+1; var py = (wh*(NowP-1)); } if(ww1){ $("html,body").animate({scrollLeft: ww}); }else if(by!=py){ $("html,body").animate({scrollTop: py}); } var iW=$("#section1 img.rumi_body").width(); $(".face_wrap").css({"width":iW}); if(wh<730){ $("#section7 .map4").addClass("f_left"); }else{ $("#section7 .map4").removeClass("f_left"); } }, 200); }); function openEye(){ var i=1; var count = setInterval(function(){ if(i<=3){ $(".face_wrap #eye img").attr("src","img/rumi_body/hover-eye"+i+".png").css("display","block"); } i++; if(i==4){ clearInterval(count); clearImg(); } },50); } function closeEye(){ var i=3; var count = setInterval(function(){ if(i==0){ $(".face_wrap #eye img").css("display","none"); }else if(i<=1){ $(".face_wrap #eye img").attr("src","img/rumi_body/hover-eye"+i+".png").css("display","block"); } i--; if(i==-1){ clearInterval(count); clearImg(); } },50); } function clearImg(){ clearInterval(count); } $(".face_wrap #eye").live({ mouseenter:function(){ openEye(); }, mouseleave:function(){ closeEye(); } }); function openMouth(){ var i=1; var count = setInterval(function(){ if(i<=3){ $(".face_wrap #mouth img").attr("src","img/rumi_body/hover-mouth"+i+".png").css("display","block"); } i++; if(i==4){ clearInterval(count); clearImg(); } },50); } function closeMouth(){ var i=3; var count = setInterval(function(){ if(i==0){ $(".face_wrap #mouth img").css("display","none"); }else if(i<=1){ $(".face_wrap #mouth img").attr("src","img/rumi_body/hover-mouth"+i+".png").css("display","block"); } i--; if(i==-1){ clearInterval(count); clearImg(); } },50); } function clearImg(){ clearInterval(count); } $(".face_wrap #mouth").live({ mouseenter:function(){ openMouth(); }, mouseleave:function(){ closeMouth(); } }); $(".face_wrap a").live("click",function(){ var Parts =$(this).attr("id"); $("#face_content").remove(); $("#section1").append('
'); $("#face_content").load("file/"+ Parts +".php",function(){ $("#face_content div").hide(); $(this).animate({"width":"450","height":"450","margin":"0"},function(){$("#face_content div").fadeIn();}); $("#face_content").append('close'); }); return false; }).css("cursor","pointer"); $("#face_close").live("click",function(){ $("#face_content div").animate({"opacity":0},function(){ $("#face_content").animate({"width":"0","height":"0","margin-top":"200","margin-left":"200"},function(){ $(this).remove(); }); }); }).css("cursor","pointer"); $("#face_content .play").live("click",function(){ $(".media_player").remove(); var PlayMode = $(".player select").attr("name"); var PlayFile = $(".player select").val(); if(PlayMode == "move"){ var PlaySize = $(".player select option[value='" + PlayFile +"']").attr("name"); var Size = PlaySize.split('-'); $("body").append('
'); $(".media_player .object").css({"width": 0 , "height" : 0 ,"margin-top":0,"margin-left":0 }).animate({"width": Size[0] ,"margin-left":"-"+Size[0]/2 },function(){ $(this).animate({ "height" : Size[1] ,"margin-top":"-"+Size[1]/2},function(){ $(this).html(''); $("#play_close").animate({"margin-top":"-" + (Size[1]/2+10), "margin-left" : "-" + (Size[0]/2+10)}).fadeIn(); }); }); }else if(PlayMode == "voice"){ var new_audio = new Audio('http://www.whitepallet.com/rumi/voice/'+PlayFile); new_audio.load(); new_audio.play(); // $(this).after(''); } }).css("cursor","pointer"); $("#play_close").live("click",function(){ $(".media_player").animate({"opacity":0},function(){ $(".media_player").remove(); }); }).css("cursor","pointer"); $(".archive a,.diary .jamp a").live("click",function(){ var getDate=$(this).attr("href"); location.hash = getDate.replace(".html",""); return false; }); $(".date li").live("click",function(){ var ThisC =$(this).attr("class"); if(ThisC=="active"){ $(this).children("ul").slideUp(); $(this).removeClass("active"); $(this).children("span").text("+"); }else{ $(".date .active ul").slideUp(); $(".date .active span").text("+"); $(".date .active").removeClass("active"); $(this).children("ul").slideDown(); $(this).addClass("active"); $(this).children("span").text("-"); } }); $(".archive p").live("click",function(){ $(".archive ol.activep").slideUp().removeClass("activep"); $(this).next("ol").slideDown().addClass("activep"); }); $(".icon_comment").live("click",function(){ $(".blog_body").animate({scrollTop:"+=300"}); $("#comment_form").slideToggle(); }); $("#totop").live("click",function(){ $(".blog_body").animate({scrollTop:0}); }); $('.blog_body img').live("error",function(){ $(this).hide(); }); $("#more_log a").live("click",function(){ var MorePage = $(this).attr("href"); $(this).parent("p").remove(); var pId = MorePage.replace(".html","").split('-'); $(".blog_body").append('

'); var InsertTo =".log_wrap_"+ pId[2]; $(InsertTo).html('
').load(MorePage+' .blog_body ul',function(){ $(".blog_body").animate({"scrollTop":"+="+($(".diary").height()-50)}); $("#more_log").load(MorePage+' .blog_body #more_log a'); }); return false; }); $('a[rel=lightbox]').live("click",function(){ return false; }); $('.diary a[rel=lightbox] img').live("click",function(){ var SRC = $(this).attr("src"); $("body").append(''); var Perh =$(window).height(); $(".light_box img").bind("load",function(){ var h = $(this).height(); var w = $(this).width(); var mt = (Perh - h)/2; $(this).css("margin-top",mt); }); $(".light_box").fadeIn(); return false; }); $(".light_box img").live("click",function(){ $(".light_box").fadeOut(function(){$(this).remove()}); }); $(".message .submit").live("click",function(){ var Mtxt = $(".message textarea").val(); var Mtit = $(".message input[name=title]").val(); var Mnam = $(".message input[name=hname]").val(); if(Mtxt == "message"){ Mtxt=""; alert("メッセージが未入力です"); } if(Mtit== "title"){ Mtit=""; alert("タイトルが未入力です"); } if(Mnam == "name"){ Mnam=""; alert("名前が未入力です"); } if(Mtxt!="" && Mtit!="" && Mnam!=""){ $.ajax({ type: 'post', url: 'message.html', data: { 'hname': Mnam, 'title': Mtit, 'text': Mtxt }, success: function(data){ $("#section3").html(data + " #section3 .content"); alert("送信しました"); } }); } return false; }); $(".message .delmes").live("click",function(){ var flg = confirm('このメッセージを削除しますか?'); if (flg==true){ var Dnom = $(this).attr("rel"); if(Dnom!=""){ $.ajax({ type: 'post', url: 'message.html', data: { 'del': Dnom }, success: function(data){ ReSet(); } }); } }else{ return false; } }); $(".message ol a").live("click",function(){ // var Mode = ($(this).text()-1); var getDate=$(this).attr("href"); location.hash = getDate.replace(".html",""); return false; }); $(".message textarea").live("focus",function(){ var TT=$(this).val(); if(TT=="message"){ $(this).val(""); } $(this).css("color","#666"); }); $(".message input[name=title]").live("focus",function(){ var IT = $(this).val(); if(IT=="title"){ $(this).val(""); } $(this).css("color","#666"); }); $(".message input[name=hname]").live("focus",function(){ var IN = $(this).val(); if(IN=="name"){ $(this).val(""); } $(this).css("color","#666"); }); $(".message textarea").live("blur",function(){ var TT=$(this).val(); if(TT==""){ $(this).val("message").css("color","#aaa"); } }); $(".message input[name=title]").live("blur",function(){ var IT = $(this).val(); if(IT==""){ $(this).val("title").css("color","#aaa"); } }); $(".message input[name=hname]").live("blur",function(){ var IN = $(this).val(); if(IN==""){ $(this).val("name").css("color","#aaa"); } }); $("#message_form").live("focus",function(){ $("#message_form textarea").animate({"height":"150px"}); $("#message_form input").slideDown(function(){$(this).css({"display":"block"})}); }); $(".message h1").live("click",function(){ var TH = $("#message_form textarea").height(); if(TH==22){ $("#message_form textarea").animate({"height":"150px"}); $("#message_form input").slideDown(function(){$(this).css({"display":"block"})}); }else{ $("#message_form textarea").animate({"height":"22px"}); $("#message_form input").slideUp(function(){$(this).fadeOut()}); } }); $(".profile h1").live("click",function(){ var Wc = $(this).attr("class"); if(Wc=="close"){ $(this).addClass("open"); $(".pro_data").animate({"top":"7%"}); $(".pro_data dl").slideDown(); }else{ $(this).removeClass("open"); $(".pro_data").animate({"top":"45%"}); $(".pro_data dl").slideUp(); } }); $(".profile h2").live("click",function(){ var Wc = $(this).attr("class"); if(Wc=="close"){ $(this).addClass("open"); $(".work_wrap").animate({"top":"7%"}); $(".works").slideDown(); }else{ $(this).removeClass("open"); $(".work_wrap").animate({"top":"45%"}); $(".works").slideUp(); } }); $("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)-$(window).width(); $(".open").animate({scrollLeft:"+="+cW},"2000",function(){ $("body").append(''); $(".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()}); }); $(".messageto").live("click",function(){ location.hash = $(this).attr("href").replace(".html",""); return false; }); $(".mailto").live("click",function(){ var SubjectFor = $(this).parent("p").parent("div").children("h2").text(); $("body").prepend('
'); $(".mail_form").css({"width":"0","height":"2px","margin":0,"padding":0}); $(".mail_form").animate({"width":"500px","margin-left":"-300px","padding-left":"50px","padding-right":"50px"},function(){$(this).animate({"height":"456px","margin-top":"-300px","padding-top":"50px","padding-bottom":"50px"}).html('

×

')}); return false; }); $("#form_close").live("click",function(){ $(".light_box").fadeOut(function(){$(this).remove()}); }); $(".mail_form textarea").live("focus",function(){ if(this.value == "message"){ $(this).val("").css("color","#333"); } }); $(".mail_form textarea").live("blur",function(){ if(this.value == ""){ $(this).val("message").css("color","#999"); } }); $(".mail_form input[name='a_mail']").live("focus",function(){ if(this.value == "mail address"){ $(this).val("").css("color","#333"); } }); $(".mail_form input[name='a_mail']").live("blur",function(){ if(this.value == ""){ $(this).val("mail address").css("color","#999"); } }); $(".mail_form input[name='a_name']").live("focus",function(){ if(this.value == "name"){ $(this).val("").css("color","#333"); } }); $(".mail_form input[name='a_name']").live("blur",function(){ if(this.value == ""){ $(this).val("name").css("color","#999"); } }); $(".mail_form .post").live("click",function(){ var WhatsUp=$(".mail_form input[name='a_subject']").val(); var Hogetxt =$(".mail_form textarea").val(); var WhatMail =$(".mail_form input[name='a_mail']").val(); var mrWho = $(".mail_form input[name='a_name']").val(); if(Hogetxt == "message"){ Hogetxt=""; alert("メッセージが未入力です"); } if(WhatMail== "mail address"){ WhatMail=""; alert("メールアドレスが未入力です"); } if(mrWho == "name"){ mrWho=""; alert("名前が未入力です"); } if(WhatsUp!="" && Hogetxt!="" && WhatMail!="" && mrWho!=""){ $.ajax({ type: 'post', url: 'file/mailto.php', data: { 'a_subject': WhatsUp, 'a_text': Hogetxt, 'a_mail': WhatMail, 'a_name': mrWho }, success: function(data){ alert(data); $(".light_box").fadeOut(2000,function(){$(this).remove()}); } }); } return false; }); $("#footer").fadeIn(3000); $(".sitemap a").live("click",function(){ var Page = $(this).attr("href").replace(".html",""); if(Page == "#eye" || Page == "#mouth" || Page == "#ear"){ var Parts =Page.replace("#",""); $("#section1").append('
'); $("#face_content").load("file/"+ Parts +".php",function(){ $("#face_content div").hide(); $(this).animate({"width":"450","height":"450","margin":"0"},function(){$("#face_content div").fadeIn();}); $("#face_content").append('close'); }); location.hash = "index"; }else{ location.hash = Page; } return false; }).css("cursor","pointer"); $(".sitemap .map1").live({ mouseenter:function(){ $(this).prepend(''); }, mouseleave:function(){ $("#map_face").remove(); } }); $("#footer").fadeIn(3000); }); /* * * * * * * * * * * * * * * * * * * * * CopyrightⒸwebstudio WhitePallet™ * * * * * * * * * * * * * * * * * * * * */