var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};Object.extend=function(a,b){for(property in b){a[property]=b[property]}return a};Function.prototype.bind=function(b){var a=this;return function(){return a.apply(b,arguments)}};Function.prototype.bindAsEventListener=function(b){var a=this;return function(d){a.call(b,d||window.event)}};function $(){if(arguments.length==1){return b(arguments[0])}var a=[];$c(arguments).each(function(d){a.push(b(d))});return a;function b(d){if(typeof d=="string"){d=document.getElementById(d)}return d}}if(!window.Element){var Element=new Object()}Object.extend(Element,{remove:function(a){a=$(a);a.parentNode.removeChild(a)},hasClassName:function(g,a){g=$(g);if(!g){return}var b=false;g.className.split(" ").each(function(d){if(d==a){b=true}});return b},addClassName:function(a,b){a=$(a);Element.removeClassName(a,b);a.className+=" "+b},removeClassName:function(g,a){g=$(g);if(!g){return}var b="";g.className.split(" ").each(function(e,d){if(e!=a){if(d>0){b+=" "}b+=e}});g.className=b},cleanWhitespace:function(a){a=$(a);$c(a.childNodes).each(function(b){if(b.nodeType==3&&!/\S/.test(b.nodeValue)){Element.remove(b)}})},find:function(a,b){a=$(a)[b];while(a.nodeType!=1){a=a[b]}return a}});var Position={cumulativeOffset:function(g){var b=0,a=0;do{b+=g.offsetTop||0;a+=g.offsetLeft||0;g=g.offsetParent}while(g);return[a,b]}};document.getElementsByClassName=function(g){var b=document.getElementsByTagName("*")||document.all;var a=[];$c(b).each(function(d){if(Element.hasClassName(d,g)){a.push(d)}});return a};Array.prototype.each=function(b){for(var a=0;ob=this[a];a++){b(ob,a)}};function $c(b){var a=[];for(i=0;el=b[i];i++){a.push(el)}return a}var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions:function(a){this.options={duration:500,onComplete:"",transition:fx.sinoidal};Object.extend(this.options,a||{})},go:function(){this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13)},step:function(){var b=(new Date).getTime();if(b>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(this.options.onComplete){setTimeout(this.options.onComplete.bind(this),10)}}else{var a=(b-this.startTime)/(this.options.duration);this.now=this.options.transition(a)*(this.to-this.from)+this.from}this.increase()},custom:function(b,a){if(this.timer!=null){return}this.from=b;this.to=a;this.go()},hide:function(){this.now=0;this.increase()},clearTimer:function(){clearInterval(this.timer);this.timer=null}};fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(b,a){this.el=$(b);this.el.style.overflow="hidden";this.el.iniWidth=this.el.offsetWidth;this.el.iniHeight=this.el.offsetHeight;this.setOptions(a)}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){this.el.style.height=this.now+"px"},toggle:function(){if(this.el.offsetHeight>0){this.custom(this.el.offsetHeight,0)}else{this.custom(0,this.el.scrollHeight)}}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){this.el.style.width=this.now+"px"},toggle:function(){if(this.el.offsetWidth>0){this.custom(this.el.offsetWidth,0)}else{this.custom(0,this.el.iniWidth)}}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(b,a){this.el=$(b);this.now=1;this.increase();this.setOptions(a)},increase:function(){if(this.now==1&&(/Firefox/.test(navigator.userAgent))){this.now=0.9999}this.setOpacity(this.now)},setOpacity:function(a){if(a==0){this.el.style.visibility="hidden"}else{this.el.style.visibility="visible"}if(window.ActiveXObject){this.el.style.filter="alpha(opacity="+a*100+")"}this.el.style.opacity=a},toggle:function(){if(this.now>0){this.custom(1,0)}else{this.custom(0,1)}}});fx.sinoidal=function(a){return((-Math.cos(a*Math.PI)/2)+0.5)};fx.linear=function(a){return a};fx.cubic=function(a){return Math.pow(a,3)};fx.circ=function(a){return Math.sqrt(a)};fx.Scroll=Class.create();fx.Scroll.prototype=Object.extend(new fx.Base(),{initialize:function(a){this.setOptions(a)},scrollTo:function(b){var f=Position.cumulativeOffset($(b))[1];var e=window.innerHeight||document.documentElement.clientHeight;var a=document.documentElement.scrollHeight;var d=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;if(f+e>a){this.custom(d,f-e+(a-f))}else{this.custom(d,f)}},increase:function(){window.scrollTo(0,this.now)}});fx.Text=Class.create();fx.Text.prototype=Object.extend(new fx.Base(),{initialize:function(b,a){this.el=$(b);this.setOptions(a);if(!this.options.unit){this.options.unit="em"}},increase:function(){this.el.style.fontSize=this.now+this.options.unit}});fx.Combo=Class.create();fx.Combo.prototype={setOptions:function(a){this.options={opacity:true,height:true,width:false};Object.extend(this.options,a||{})},initialize:function(b,a){this.el=$(b);this.setOptions(a);if(this.options.opacity){this.el.o=new fx.Opacity(b,a);a.onComplete=null}if(this.options.height){this.el.h=new fx.Height(b,a);a.onComplete=null}if(this.options.width){this.el.w=new fx.Width(b,a)}},toggle:function(){this.checkExec("toggle")},hide:function(){this.checkExec("hide")},clearTimer:function(){this.checkExec("clearTimer")},checkExec:function(a){if(this.el.o){this.el.o[a]()}if(this.el.h){this.el.h[a]()}if(this.el.w){this.el.w[a]()}},resizeTo:function(a,b){if(this.el.h&&this.el.w){this.el.h.custom(this.el.offsetHeight,this.el.offsetHeight+a);this.el.w.custom(this.el.offsetWidth,this.el.offsetWidth+b)}},customSize:function(a,b){if(this.el.h&&this.el.w){this.el.h.custom(this.el.offsetHeight,a);this.el.w.custom(this.el.offsetWidth,b)}}};fx.Accordion=Class.create();fx.Accordion.prototype={setOptions:function(a){this.options={delay:100,opacity:false};Object.extend(this.options,a||{})},initialize:function(d,a,b){this.elements=a;this.setOptions(b);var b=b||"";a.each(function(f,e){b.onComplete=function(){if(f.offsetHeight>0){f.style.height="1%"}};f.fx=new fx.Combo(f,b);f.fx.hide()});d.each(function(f,e){f.onclick=function(){this.showThisHideOpen(a[e])}.bind(this)}.bind(this))},showThisHideOpen:function(a){if(a.offsetHeight==0){setTimeout(function(){this.clearAndToggle(a)}.bind(this),this.options.delay)}this.elements.each(function(d,b){if(d.offsetHeight>0&&d!=a){this.clearAndToggle(d)}}.bind(this))},clearAndToggle:function(a){a.fx.clearTimer();a.fx.toggle()}};var Remember=new Object();Remember=function(){};Remember.prototype={initialize:function(a,b){this.el=$(a);this.days=365;this.options=b;this.effect();var d=this.readCookie();if(d){this.fx.now=d;this.fx.increase()}},setCookie:function(a){var d=new Date();d.setTime(d.getTime()+(this.days*24*60*60*1000));var b="; expires="+d.toGMTString();document.cookie=this.el+this.el.id+this.prefix+"="+a+b+"; path=/"},readCookie:function(){var a=this.el+this.el.id+this.prefix+"=";var b=document.cookie.split(";");for(var d=0;c=b[d];d++){while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(a)==0){return c.substring(a.length,c.length)}}return false},custom:function(b,a){if(this.fx.now!=a){this.setCookie(a);this.fx.custom(b,a)}}};fx.RememberHeight=Class.create();fx.RememberHeight.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Height(this.el,this.options);this.prefix="height"},toggle:function(){if(this.el.offsetHeight==0){this.setCookie(this.el.scrollHeight)}else{this.setCookie(0)}this.fx.toggle()},resize:function(a){this.setCookie(this.el.offsetHeight+a);this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+a)},hide:function(){if(!this.readCookie()){this.fx.hide()}}});fx.RememberText=Class.create();fx.RememberText.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Text(this.el,this.options);this.prefix="text"}});Array.prototype.each=function(b){for(var a=0;ob=this[a];a++){b(ob,a)}};fx.expoIn=function(a){return Math.pow(2,10*(a-1))};fx.expoOut=function(a){return(-Math.pow(2,-10*a)+1)};fx.quadIn=function(a){return Math.pow(a,2)};fx.quadOut=function(a){return -(a)*(a-2)};fx.circOut=function(a){return Math.sqrt(1-Math.pow(a-1,2))};fx.circIn=function(a){return -(Math.sqrt(1-Math.pow(a,2))-1)};fx.backIn=function(a){return(a)*a*((2.7)*a-1.7)};fx.backOut=function(a){return((a-1)*(a-1)*((2.7)*(a-1)+1.7)+1)};fx.sineOut=function(a){return Math.sin(a*(Math.PI/2))};fx.sineIn=function(a){return -Math.cos(a*(Math.PI/2))+1};fx.sineInOut=function(a){return -(Math.cos(Math.PI*a)-1)/2};(function(b){b.fn.tabSlideOut=function(a){var q=b.extend({tabHandle:".handle",speed:300,action:"click",tabLocation:"left",topPos:"200px",leftPos:"20px",fixedPosition:false,positioning:"absolute",pathToTabImage:null,imageHeight:null,imageWidth:null,onLoadSlideOut:false},a||{});q.tabHandle=b(q.tabHandle);var p=this;if(q.fixedPosition===true){q.positioning="fixed"}else{q.positioning="absolute"}if(document.all&&!window.opera&&!window.XMLHttpRequest){q.positioning="absolute"}if(q.pathToTabImage!=null){q.tabHandle.css({background:"url("+q.pathToTabImage+") no-repeat",width:q.imageWidth,height:q.imageHeight})}q.tabHandle.css({display:"block",textIndent:"-99999px",outline:"none",position:"absolute"});p.css({"line-height":"1",position:q.positioning});var m={containerWidth:parseInt(p.outerWidth(),10)+"px",containerHeight:parseInt(p.outerHeight(),10)+"px",tabWidth:parseInt(q.tabHandle.outerWidth(),10)+"px",tabHeight:parseInt(q.tabHandle.outerHeight(),10)+"px"};if(q.tabLocation==="top"||q.tabLocation==="bottom"){p.css({left:q.leftPos});q.tabHandle.css({right:0})}if(q.tabLocation==="top"){p.css({top:"-"+m.containerHeight});q.tabHandle.css({bottom:"-"+m.tabHeight})}if(q.tabLocation==="bottom"){p.css({bottom:"-"+m.containerHeight,position:"fixed"});q.tabHandle.css({top:"-"+m.tabHeight})}if(q.tabLocation==="left"||q.tabLocation==="right"){p.css({height:m.containerHeight,top:q.topPos});q.tabHandle.css({top:0})}if(q.tabLocation==="left"){p.css({left:"-"+m.containerWidth});q.tabHandle.css({right:"-"+m.tabWidth})}if(q.tabLocation==="right"){p.css({right:"-"+m.containerWidth});q.tabHandle.css({left:"-"+m.tabWidth});b("html").css("overflow-x","hidden")}q.tabHandle.click(function(c){c.preventDefault()});var r=function(){if(q.tabLocation==="top"){p.animate({top:"-"+m.containerHeight},q.speed).removeClass("open")}else{if(q.tabLocation==="left"){p.animate({left:"-"+m.containerWidth},q.speed).removeClass("open")}else{if(q.tabLocation==="right"){p.animate({right:"-"+m.containerWidth},q.speed).removeClass("open")}else{if(q.tabLocation==="bottom"){p.animate({bottom:"-"+m.containerHeight},q.speed).removeClass("open")}}}}};var o=function(){if(q.tabLocation=="top"){p.animate({top:"-3px"},q.speed).addClass("open")}else{if(q.tabLocation=="left"){p.animate({left:"-3px"},q.speed).addClass("open")}else{if(q.tabLocation=="right"){p.animate({right:"-3px"},q.speed).addClass("open")}else{if(q.tabLocation=="bottom"){p.animate({bottom:"-3px"},q.speed).addClass("open")}}}}};var s=function(){p.click(function(c){c.stopPropagation()});b(document).click(function(){r()})};var l=function(){q.tabHandle.click(function(c){if(p.hasClass("open")){r()}else{o()}});s()};var n=function(){p.hover(function(){o()},function(){r()});q.tabHandle.click(function(c){if(p.hasClass("open")){r()}});s()};var t=function(){r();setTimeout(o,500)};if(q.action==="click"){l()}if(q.action==="hover"){n()}if(q.onLoadSlideOut){t()}}})(jQuery);jQuery(function(b){b(".jukebox").tabSlideOut({tabHandle:".handle",pathToTabImage:"/wp-content/themes/ketsuryu/img/jukebox-trans.png",imageHeight:"157px",imageWidth:"40px",tabLocation:"left",speed:300,action:"hover",topPos:"250px",fixedPosition:true})});function jb(){var c=(screen.availWidth-320)/2,d=(screen.availHeight-450)/2;window.open("http://www.ketsuryu.com/jukebox/","Jukebox KetsuRyu","menubar=no,location=no,directories=no,resizable=no,status=no,scrollbars=no,toolbar=no,top="+d+",left="+c+",width=320,height=450")};