﻿/***********************************************
* Author: ウェブデザイン木村
* Web : http://webdesign-k.jp/
* js Ver 03 (2009/12/15)
***********************************************/

/*------------------------------------------------
animate_menu.js
------------------------------------------------*/
// Author: ウェブデザイン木村
$(document).ready(function(){$("#go_sitemap, #SideMenu_A .sidemenu_closed").click(function(){$("#SideMenu_A").animate({width:"toggle"},{duration:"normal"})});$("#go_search, #SideMenu_B .sidemenu_closed").click(function(){$("#SideMenu_B").animate({width:"toggle"},{duration:"normal"})});$("#go_top a, #go_home a, #go_mail a, #go_bottom a").click(function(){$("#SideMenu_A, #SideMenu_B").css({display:"none"})});$("#go_sitemap span, #SideMenu_B input.s_submit").click(function(){$("#SideMenu_B").css({display:"none"})});$("#go_search span, #SideMenu_A li a").click(function(){$("#SideMenu_A").css({display:"none"})});$("ul#SideMenu_icon li a, ul#SideMenu_icon li span").hover(function(){$(this).css({"margin-left":"0"})},function(){$(this).css({"margin-left":"-8px"})})});

/*------------------------------------------------
search.js
------------------------------------------------*/
// Author: ウェブデザイン木村
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(36)};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[0-9b-v]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(l);6 l(){var a=$("1.2");a.m("0.7");a.m("0.5");$(document).ready(6(){$("1.2 0.7").3({"c":"#n","d":"e f o"});$("1.2 0.5").8("9",g).3({"b":"h"})});$("1.2 0.7").focus(6(){$(4).3({"i":"#p","c":"#q","d":"e f r"});j(4.k=="検索キーワード"){$(4).s("")}});$("1.2 0.7").keyup(6(){j(4.k!=""){$(4).3({"i":"#p","c":"#q","d":"e f r"});$("1.2 0.5").8("9",t).3({"b":"u"})}v{$("1.2 0.5").8("9",g).3({"b":"h"})}});$("1.2 0.7").blur(6(){$(4).3({"i":"#fff","c":"#n","d":"e f o"});j(4.k==""){$(4).s("検索キーワード");$("1.2 0.5").8("9",g).3({"b":"h"})}v{$("1.2 0.5").8("9",t).3({"b":"u"})}})};',[],32,'input|div|search_box|css|this|s_submit|function|s_keyword|attr|disabled||display|color|border|1px|solid|true|none|background|if|value|searchbox|find|aaa|orange|eee|000|red|val|false|inline|else'.split('|'),0,{}))

/*------------------------------------------------
scrollsmoothly.js
------------------------------------------------*/
// UTF-8
/**
 * scrollsmoothly.js
 * Copyright (c) 2008 KAZUMiX
 * http://d.hatena.ne.jp/KAZUMiX/20080418/scrollsmoothly
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * 更新履歴
 * 2009/02/12
 * スクロール先が画面左上にならない場合の挙動を修正
 * 2008/04/18
 * 公開
 *
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([2-9B-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(){2 o=0.25;2 t=20;2 d=B;2 h=0;2 i=0;2 p=\'\';2 j=F;2 q=K.L.M(\'#\');2 u=q[0];2 k=q[1];2 l=I;2 m=I;r(5,\'load\',v);3 v(){w();4(k){4(5.J&&!5.opera){N(3(){G(0,0);n(\'#\'+k)},50)}C{G(0,0);n(\'#\'+k)}}}3 r(a,b,c){4(a.O){a.O(b,c,F)}C 4(5.J){a.J(\'on\'+b,3(){c.apply(a)})}}3 w(){2 a=d.links;for(2 b=0;b<a.length;b++){2 c=a[b];2 e=c.L.M(\'#\');4(u==e[0]&&d.P(e[1])){r(c,\'click\',x)}}}3 x(a){4(a){a.preventDefault()}C 4(5.Q){5.Q.returnValue=F}n(this.R)}3 n(a){2 b=d.P(a.substr(1));4(!b)7;2 c=b;2 e=0;2 f=0;while(c){e+=c.offsetLeft;f+=c.offsetTop;c=c.offsetParent}2 g=y();h=8.S(e,g.x);i=8.S(f,g.y);p=a;4(!j){j=true;s()}}3 s(){2 a=d.9.T||d.6.T;2 b=d.9.U||d.6.U;2 c=(h-a)*o;2 e=(i-b)*o;2 f=a+c;2 g=b+e;4((8.V(c)<1&&8.V(e)<1)||(l===a&&m===b)){G(h,i);j=F;K.R=p;l=m=I;7}C{G(W(f),W(g));l=a;m=b;N(3(){s()},t)}}3 z(){7{D:8.X(B.6.Y,B.9.Y),E:8.X(B.6.Z,B.9.Z)}}3 A(){2 a={};4(5.innerWidth){2 b=d.createElement(\'div\');with(b.style){position=\'absolute\';top=\'H\';left=\'H\';c=\'10%\';e=\'10%\';margin=\'H\';padding=\'H\';border=\'none\';visibility=\'hidden\'}d.6.appendChild(b);2 c=b.offsetWidth;2 e=b.offsetHeight;d.6.removeChild(b);a={D:c,E:e}}C{a={D:d.9.11||d.6.11,E:d.9.12||d.6.12}}7 a}3 y(){4(5.13&&5.14){7{x:5.13,y:5.14}}2 a=z();2 b=A();7{x:a.D-b.D,y:a.E-b.E}}}());',[],67,'||var|function|if|window|body|return|Math|documentElement||||||||||||||||||||||||||||document|else|width|height|false|scrollTo|0px|null|attachEvent|location|href|split|setTimeout|addEventListener|getElementById|event|hash|min|scrollLeft|scrollTop|abs|parseInt|max|scrollWidth|scrollHeight|100|clientWidth|clientHeight|scrollMaxX|scrollMaxY'.split('|'),0,{}))

/*------------------------------------------------
floating_menu.js
------------------------------------------------*/
/* Script by: www.jtricks.com
 * Version: 20071017
 * Latest version:
 * www.jtricks.com/javascript/navigation/floating.html
 */
var floatingMenuId="SideMenu";var floatingMenu={targetX:0,targetY:50,hasInner:typeof(window.innerWidth)=="number",hasElement:typeof(document.documentElement)=="object"&&typeof(document.documentElement.clientWidth)=="number",menu:document.getElementById?document.getElementById(floatingMenuId):document.all?document.all[floatingMenuId]:document.layers[floatingMenuId]};floatingMenu.move=function(){floatingMenu.menu.style.left=floatingMenu.nextX+"px";floatingMenu.menu.style.top=floatingMenu.nextY+"px"};floatingMenu.computeShifts=function(){var a=document.documentElement;floatingMenu.shiftX=floatingMenu.hasInner?pageXOffset:floatingMenu.hasElement?a.scrollLeft:document.body.scrollLeft;if(floatingMenu.targetX<0){floatingMenu.shiftX+=floatingMenu.hasElement?a.clientWidth:document.body.clientWidth}floatingMenu.shiftY=floatingMenu.hasInner?pageYOffset:floatingMenu.hasElement?a.scrollTop:document.body.scrollTop;if(floatingMenu.targetY<0){if(floatingMenu.hasElement&&floatingMenu.hasInner){floatingMenu.shiftY+=a.clientHeight>window.innerHeight?window.innerHeight:a.clientHeight}else{floatingMenu.shiftY+=floatingMenu.hasElement?a.clientHeight:document.body.clientHeight}}};floatingMenu.calculateCornerX=function(){if(floatingMenu.targetX!="center"){return floatingMenu.shiftX+floatingMenu.targetX}var a=parseInt(floatingMenu.menu.offsetWidth);var b=floatingMenu.hasElement?(floatingMenu.hasInner?pageXOffset:document.documentElement.scrollLeft)+(document.documentElement.clientWidth-a)/2:document.body.scrollLeft+(document.body.clientWidth-a)/2;return b};floatingMenu.calculateCornerY=function(){if(floatingMenu.targetY!="center"){return floatingMenu.shiftY+floatingMenu.targetY}var a=parseInt(floatingMenu.menu.offsetHeight);var b=floatingMenu.hasElement&&floatingMenu.hasInner&&document.documentElement.clientHeight>window.innerHeight?window.innerHeight:document.documentElement.clientHeight;var c=floatingMenu.hasElement?(floatingMenu.hasInner?pageYOffset:document.documentElement.scrollTop)+(b-a)/2:document.body.scrollTop+(document.body.clientHeight-a)/2;return c};floatingMenu.doFloat=function(){var d,b;floatingMenu.computeShifts();var c=floatingMenu.calculateCornerX();var d=(c-floatingMenu.nextX)*0.07;if(Math.abs(d)<0.5){d=c-floatingMenu.nextX}var a=floatingMenu.calculateCornerY();var b=(a-floatingMenu.nextY)*0.07;if(Math.abs(b)<0.5){b=a-floatingMenu.nextY}if(Math.abs(d)>0||Math.abs(b)>0){floatingMenu.nextX+=d;floatingMenu.nextY+=b;floatingMenu.move()}setTimeout("floatingMenu.doFloat()",20)};floatingMenu.addEvent=function(b,d,c){if(typeof b[d]!="function"||typeof b[d+"_num"]=="undefined"){b[d+"_num"]=0;if(typeof b[d]=="function"){b[d+0]=b[d];b[d+"_num"]++}b[d]=function(h){var g=true;h=(h)?h:window.event;for(var f=b[d+"_num"]-1;f>=0;f--){if(b[d+f](h)==false){g=false}}return g}}for(var a=0;a<b[d+"_num"];a++){if(b[d+a]==c){return}}b[d+b[d+"_num"]]=c;b[d+"_num"]++};floatingMenu.init=function(){floatingMenu.initSecondary();floatingMenu.doFloat()};floatingMenu.initSecondary=function(){floatingMenu.computeShifts();floatingMenu.nextX=floatingMenu.calculateCornerX();floatingMenu.nextY=floatingMenu.calculateCornerY();floatingMenu.move()};if(document.layers){floatingMenu.addEvent(window,"onload",floatingMenu.init)}else{floatingMenu.init();floatingMenu.addEvent(window,"onload",floatingMenu.initSecondary)};

/*------------------------------------------------
jquery.lightbox-0.5.js
------------------------------------------------*/
/**
 * jQuery lightBox plugin
 * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * and adapted to me for use like a plugin from jQuery.
 * @name jquery-lightbox-0.5.js
 * @author Leandro Vieira Pinho - http://leandrovieira.com
 * @version 0.5
 * @date April 11, 2008
 * @category jQuery plugin
 * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 * @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
 * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 */
// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
(function(a){a.fn.lightBox=function(p){p=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"images/lightbox-ico-loading.gif",imageBtnPrev:"images/lightbox-btn-prev.gif",imageBtnNext:"images/lightbox-btn-next.gif",imageBtnClose:"images/lightbox-btn-close.gif",imageBlank:"images/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},p);var i=this;function r(){o(this,i);return false}function o(v,u){a("embed, object, select").css({visibility:"hidden"});c();p.imageArray.length=0;p.activeImage=0;if(u.length==1){p.imageArray.push(new Array(v.getAttribute("href"),v.getAttribute("title")))}else{for(var t=0;t<u.length;t++){p.imageArray.push(new Array(u[t].getAttribute("href"),u[t].getAttribute("title")))}}while(p.imageArray[p.activeImage][0]!=v.getAttribute("href")){p.activeImage++}l()}function c(){a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+p.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+p.imageBtnClose+'"></a></div></div></div></div>');var t=f();a("#jquery-overlay").css({backgroundColor:p.overlayBgColor,opacity:p.overlayOpacity,width:t[0],height:t[1]}).fadeIn();var u=h();a("#jquery-lightbox").css({top:u[1]+(t[3]/10),left:u[0]}).show();a("#jquery-overlay,#jquery-lightbox").click(function(){b()});a("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){b();return false});a(window).resize(function(){var v=f();a("#jquery-overlay").css({width:v[0],height:v[1]});var w=h();a("#jquery-lightbox").css({top:w[1]+(v[3]/10),left:w[0]})})}function l(){a("#lightbox-loading").show();if(p.fixedNavigation){a("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}else{a("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}var t=new Image();t.onload=function(){a("#lightbox-image").attr("src",p.imageArray[p.activeImage][0]);j(t.width,t.height);t.onload=function(){}};t.src=p.imageArray[p.activeImage][0]}function j(w,z){var t=a("#lightbox-container-image-box").width();var y=a("#lightbox-container-image-box").height();var x=(w+(p.containerBorderSize*2));var v=(z+(p.containerBorderSize*2));var u=t-x;var A=y-v;a("#lightbox-container-image-box").animate({width:x,height:v},p.containerResizeSpeed,function(){g()});if((u==0)&&(A==0)){if(a.browser.msie){n(250)}else{n(100)}}a("#lightbox-container-image-data-box").css({width:w});a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:z+(p.containerBorderSize*2)})}function g(){a("#lightbox-loading").hide();a("#lightbox-image").fadeIn(function(){k();s()});q()}function k(){a("#lightbox-container-image-data-box").slideDown("fast");a("#lightbox-image-details-caption").hide();if(p.imageArray[p.activeImage][1]){a("#lightbox-image-details-caption").html(p.imageArray[p.activeImage][1]).show()}if(p.imageArray.length>1){a("#lightbox-image-details-currentNumber").html(p.txtImage+" "+(p.activeImage+1)+" "+p.txtOf+" "+p.imageArray.length).show()}}function s(){a("#lightbox-nav").show();a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+p.imageBlank+") no-repeat"});if(p.activeImage!=0){if(p.fixedNavigation){a("#lightbox-nav-btnPrev").css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage-1;l();return false})}else{a("#lightbox-nav-btnPrev").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnPrev+") left 15% no-repeat"})},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"})}).show().bind("click",function(){p.activeImage=p.activeImage-1;l();return false})}}if(p.activeImage!=(p.imageArray.length-1)){if(p.fixedNavigation){a("#lightbox-nav-btnNext").css({background:"url("+p.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){p.activeImage=p.activeImage+1;l();return false})}else{a("#lightbox-nav-btnNext").unbind().hover(function(){a(this).css({background:"url("+p.imageBtnNext+") right 15% no-repeat"})},function(){a(this).css({background:"transparent url("+p.imageBlank+") no-repeat"})}).show().bind("click",function(){p.activeImage=p.activeImage+1;l();return false})}}m()}function m(){a(document).keydown(function(t){d(t)})}function e(){a(document).unbind()}function d(t){if(t==null){keycode=event.keyCode;escapeKey=27}else{keycode=t.keyCode;escapeKey=t.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if((key==p.keyToClose)||(key=="x")||(keycode==escapeKey)){b()}if((key==p.keyToPrev)||(keycode==37)){if(p.activeImage!=0){p.activeImage=p.activeImage-1;l();e()}}if((key==p.keyToNext)||(keycode==39)){if(p.activeImage!=(p.imageArray.length-1)){p.activeImage=p.activeImage+1;l();e()}}}function q(){if((p.imageArray.length-1)>p.activeImage){objNext=new Image();objNext.src=p.imageArray[p.activeImage+1][0]}if(p.activeImage>0){objPrev=new Image();objPrev.src=p.imageArray[p.activeImage-1][0]}}function b(){a("#jquery-lightbox").remove();a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove()});a("embed, object, select").css({visibility:"visible"})}function f(){var v,t;if(window.innerHeight&&window.scrollMaxY){v=window.innerWidth+window.scrollMaxX;t=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){v=document.body.scrollWidth;t=document.body.scrollHeight}else{v=document.body.offsetWidth;t=document.body.offsetHeight}}var u,w;if(self.innerHeight){if(document.documentElement.clientWidth){u=document.documentElement.clientWidth}else{u=self.innerWidth}w=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){u=document.documentElement.clientWidth;w=document.documentElement.clientHeight}else{if(document.body){u=document.body.clientWidth;w=document.body.clientHeight}}}if(t<w){pageHeight=w}else{pageHeight=t}if(v<u){pageWidth=v}else{pageWidth=u}arrayPageSize=new Array(pageWidth,pageHeight,u,w);return arrayPageSize}function h(){var u,t;if(self.pageYOffset){t=self.pageYOffset;u=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;u=document.documentElement.scrollLeft}else{if(document.body){t=document.body.scrollTop;u=document.body.scrollLeft}}}arrayPageScroll=new Array(u,t);return arrayPageScroll}function n(v){var u=new Date();t=null;do{var t=new Date()}while(t-u<v)}return this.unbind("click").click(r)}})(jQuery);

/*------------------------------------------------
jquery.droppy.js
------------------------------------------------*/
/*
 * Droppy 0.1.2
 * (c) 2008 Jason Frame (jason@onehackoranother.com)
 */
$.fn.droppy=function(a){a=$.extend({speed:250},a||{});this.each(function(){var c=this,g=1000;function f(i){if(i.nodeName.toLowerCase()=="li"){var h=$("> ul",i);return h.length?h[0]:null}else{return i}}function d(h){if(h.nodeName.toLowerCase()=="ul"){return $(h).parents("li")[0]}else{return h}}function e(){var h=f(this);if(!h){return}$.data(h,"cancelHide",false);setTimeout(function(){if(!$.data(h,"cancelHide")){$(h).slideUp(a.speed)}},500)}function b(){var i=f(this);if(!i){return}$.data(i,"cancelHide",true);$(i).css({zIndex:g++}).slideDown(a.speed);if(this.nodeName.toLowerCase()=="ul"){var h=d(this);$(h).addClass("hover");$("> a",h).addClass("hover")}}$("ul, li",this).hover(b,e);$("li",this).hover(function(){$(this).addClass("hover");$("> a",this).addClass("hover")},function(){$(this).removeClass("hover");$("> a",this).removeClass("hover")})})};

/*------------------------------------------------
設定(droppy,lightbox,target="_blank")
------------------------------------------------*/
$(function(){
	$("#page_list ul").droppy();
	$("a[rel=lightbox]").lightBox();
	$("a[rel=lightbox[roadtrip]]").lightBox();
	$("a[href='http://etc.webdesign-k.jp/webmail/']").colorbox({width:"750",height:"80%",iframe:true});
	$("a[@href^='http']").not("[@href*='webdesign-k.jp']").click(function(){window.open(this.href, "");return false;});
});
