var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:</script>)",emptyFunction:function(){},K:function(x){return x;}};var Class={create:function(){return function(){this.initialize.apply(this,arguments);};}};var Abstract=new Object();Object.extend=function(_2,_3){for(property in _3){_2[property]=_3[property];}return _2;};Object.inspect=function(_4){try{if(_4==undefined){return "undefined";}if(_4==null){return "null";}return _4.inspect?_4.inspect():_4.toString();}catch(e){if(e instanceof RangeError){return "...";}throw e;}};Function.prototype.bind=function(){var _5=this,args=$A(arguments),object=args.shift();return function(){return _5.apply(object,args.concat($A(arguments)));};};Function.prototype.bindAsEventListener=function(_6){var _7=this;return function(_8){return _7.call(_6,_8||window.event);};};Object.extend(Number.prototype,{toColorPart:function(){var _9=this.toString(16);if(this<16){return "0"+_9;}return _9;},succ:function(){return this+1;},times:function(_a){$R(0,this,true).each(_a);return this;}});var Try={these:function(){var _b;for(var i=0;i<arguments.length;i++){var _d=arguments[i];try{_b=_d();break;}catch(e){}}return _b;}};function $(){var _e=new Array();for(var i=0;i<arguments.length;i++){var _10=arguments[i];if(typeof _10=="string"){_10=document.getElementById(_10);}if(arguments.length==1){return _10;}_e.push(_10);}return _e;}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"");},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"");},extractScripts:function(){var _11=new RegExp(Prototype.ScriptFragment,"img");var _12=new RegExp(Prototype.ScriptFragment,"im");return (this.match(_11)||[]).map(function(_13){return (_13.match(_12)||["",""])[1];});},evalScripts:function(){return this.extractScripts().map(eval);},escapeHTML:function(){var div=document.createElement("div");var _15=document.createTextNode(this);div.appendChild(_15);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement("div");div.innerHTML=this.stripTags();return div.childNodes[0]?div.childNodes[0].nodeValue:"";},toQueryParams:function(){var _17=this.match(/^\??(.*)$/)[1].split("&");return _17.inject({},function(_18,_19){var _1a=_19.split("=");_18[_1a[0]]=_1a[1];return _18;});},toArray:function(){return this.split("");},camelize:function(){var _1b=this.split("-");if(_1b.length==1){return _1b[0];}var _1c=this.indexOf("-")==0?_1b[0].charAt(0).toUpperCase()+_1b[0].substring(1):_1b[0];for(var i=1,len=_1b.length;i<len;i++){var s=_1b[i];_1c+=s.charAt(0).toUpperCase()+s.substring(1);}return _1c;},inspect:function(){return "'"+this.replace("\\","\\\\").replace("'","\\'")+"'";}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(_1f){var _20=0;try{this._each(function(_21){try{_1f(_21,_20++);}catch(e){if(e!=$continue){throw e;}}});}catch(e){if(e!=$break){throw e;}}},all:function(_22){var _23=true;this.each(function(_24,_25){_23=_23&&!!(_22||Prototype.K)(_24,_25);if(!_23){throw $break;}});return _23;},any:function(_26){var _27=true;this.each(function(_28,_29){if(_27=!!(_26||Prototype.K)(_28,_29)){throw $break;}});return _27;},collect:function(_2a){var _2b=[];this.each(function(_2c,_2d){_2b.push(_2a(_2c,_2d));});return _2b;},detect:function(_2e){var _2f;this.each(function(_30,_31){if(_2e(_30,_31)){_2f=_30;throw $break;}});return _2f;},findAll:function(_32){var _33=[];this.each(function(_34,_35){if(_32(_34,_35)){_33.push(_34);}});return _33;},include:function(_36){var _37=false;this.each(function(_38){if(_38==_36){_37=true;throw $break;}});return _37;},invoke:function(_39){var _3a=$A(arguments).slice(1);return this.collect(function(_3b){return _3b[_39].apply(_3b,_3a);});},reject:function(_3c){var _3d=[];this.each(function(_3e,_3f){if(!_3c(_3e,_3f)){_3d.push(_3e);}});return _3d;},inspect:function(){return "#<Enumerable:"+this.toArray().inspect()+">";}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(_40){if(!_40){return [];}if(_40.toArray){return _40.toArray();}else{var _41=[];for(var i=0;i<_40.length;i++){_41.push(_40[i]);}return _41;}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(_43){for(var i=0;i<this.length;i++){_43(this[i]);}}});var Hash={_each:function(_45){for(key in this){var _46=this[key];if(typeof _46=="function"){continue;}var _47=[key,_46];_47.key=key;_47.value=_46;_45(_47);}}};function $H(_48){var _49=Object.extend({},_48||{});Object.extend(_49,Enumerable);Object.extend(_49,Hash);return _49;}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(_4a,end,_4c){this.start=_4a;this.end=end;this.exclusive=_4c;},_each:function(_4d){var _4e=this.start;do{_4d(_4e);_4e=_4e.succ();}while(this.include(_4e));},include:function(_4f){if(_4f<this.start){return false;}if(this.exclusive){return _4f<this.end;}return _4f<=this.end;}});var $R=function(_50,end,_52){return new ObjectRange(_50,end,_52);};document.getElementsByClassName=function(_53,_54){var _55=($(_54)||document.body).getElementsByTagName("*");return $A(_55).inject([],function(_56,_57){if(_57.className.match(new RegExp("(^|\\s)"+_53+"(\\s|$)"))){_56.push(_57);}return _56;});};if(!window.Element){var Element=new Object();}Object.extend(Element,{visible:function(_58){return $(_58).style.display!="none";},hide:function(){for(var i=0;i<arguments.length;i++){var _5a=$(arguments[i]);_5a.style.display="none";}},show:function(){for(var i=0;i<arguments.length;i++){var _5c=$(arguments[i]);_5c.style.display="";}},getStyle:function(_5d,_5e){_5d=$(_5d);var _5f=_5d.style[_5e.camelize()];if(!_5f){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(_5d,null);_5f=css?css.getPropertyValue(_5e):null;}else{if(_5d.currentStyle){_5f=_5d.currentStyle[_5e.camelize()];}}}if(window.opera&&["left","top","right","bottom"].include(_5e)){if(Element.getStyle(_5d,"position")=="static"){_5f="auto";}}return _5f=="auto"?null:_5f;},setStyle:function(_61,_62){_61=$(_61);for(name in _62){_61.style[name.camelize()]=_62[name];}}});if(!window.Event){var Event=new Object();}var Behaviour={list:new Array,register:function(_63){Behaviour.list.push(_63);},start:function(){Behaviour.addLoadEvent(function(){Behaviour.apply();});},apply:function(){for(h=0;sheet=Behaviour.list[h];h++){for(selector in sheet){list=document.getElementsBySelector(selector);if(!list){continue;}for(i=0;element=list[i];i++){sheet[selector](element);}}}},addLoadEvent:function(_64){var _65=window.onload;if(typeof window.onload!="function"){window.onload=_64;}else{window.onload=function(){_65();_64();};}}};Behaviour.start();function getAllChildren(e){return e.all?e.all:e.getElementsByTagName("*");}document.getElementsBySelector=function(_67){if(!document.getElementsByTagName){return new Array();}var _68=_67.split(" ");var _69=new Array(document);for(var i=0;i<_68.length;i++){token=_68[i].replace(/^\s+/,"").replace(/\s+$/,"");if(token.indexOf("#")>-1){var _6b=token.split("#");var _6c=_6b[0];var id=_6b[1];var _6e=document.getElementById(id);if(_6c&&_6e.nodeName.toLowerCase()!=_6c){return new Array();}_69=new Array(_6e);continue;}if(token.indexOf(".")>-1){var _6f=token.split(".");var _70=_6f[0];var _71=_6f[1];if(!_70){_70="*";}var _72=new Array;var _73=0;for(var h=0;h<_69.length;h++){var _75;if(_70=="*"){_75=getAllChildren(_69[h]);}else{_75=_69[h].getElementsByTagName(_70);}for(var j=0;j<_75.length;j++){_72[_73++]=_75[j];}}_69=new Array;var _77=0;for(var k=0;k<_72.length;k++){if(_72[k].className&&_72[k].className.match(new RegExp("\\b"+_71+"\\b"))){_69[_77++]=_72[k];}}continue;}if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var _79=RegExp.$1;var _7a=RegExp.$2;var _7b=RegExp.$3;var _7c=RegExp.$4;if(!_79){_79="*";}var _7d=new Array;var _7e=0;for(var h=0;h<_69.length;h++){var _80;if(_79=="*"){_80=getAllChildren(_69[h]);}else{_80=_69[h].getElementsByTagName(_79);}for(var j=0;j<_80.length;j++){_7d[_7e++]=_80[j];}}_69=new Array;var _82=0;var _83;switch(_7b){case "=":_83=function(e){return (e.getAttribute(_7a)==_7c);};break;case "~":_83=function(e){return (e.getAttribute(_7a).match(new RegExp("\\b"+_7c+"\\b")));};break;case "|":_83=function(e){return (e.getAttribute(_7a).match(new RegExp("^"+_7c+"-?")));};break;case "^":_83=function(e){return (e.getAttribute(_7a).indexOf(_7c)==0);};break;case "$":_83=function(e){return (e.getAttribute(_7a).lastIndexOf(_7c)==e.getAttribute(_7a).length-_7c.length);};break;case "*":_83=function(e){return (e.getAttribute(_7a).indexOf(_7c)>-1);};break;default:_83=function(e){return e.getAttribute(_7a);};}_69=new Array;var _8b=0;for(var k=0;k<_7d.length;k++){if(_83(_7d[k])){_69[_8b++]=_7d[k];}}continue;}if(!_69[0]){return;}_79=token;var _8d=new Array;var _8e=0;for(var h=0;h<_69.length;h++){var _90=_69[h].getElementsByTagName(_79);for(var j=0;j<_90.length;j++){_8d[_8e++]=_90[j];}}_69=_8d;}return _69;};Element.setStyle=function(_92,_93){_92=$(_92);for(k in _93){_92.style[k.camelize()]=_93[k];}};Element.getOpacity=function(_94){var _95;if(_95=Element.getStyle(_94,"opacity")){return parseFloat(_95);}if(_95=(Element.getStyle(_94,"filter")||"").match(/alpha\(opacity=(.*)\)/)){if(_95[1]){return parseFloat(_95[1])/100;}}return 1;};Element.setOpacity=function(_96,_97){_96=$(_96);if(_97==1){Element.setStyle(_96,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(_96,{filter:Element.getStyle(_96,"filter").replace(/alpha\([^\)]*\)/gi,"")});}}else{if(_97<0.00001){_97=0;}Element.setStyle(_96,{opacity:_97});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(_96,{filter:Element.getStyle(_96,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+_97*100+")"});}}};Element.getInlineOpacity=function(_98){return $(_98).style.opacity||"";};Array.prototype.call=function(){var _99=arguments;this.each(function(f){f.apply(this,_99);});};var Effect={tagifyText:function(_9b){var _9c="position:relative";if(/MSIE/.test(navigator.userAgent)){_9c+=";zoom:1";}_9b=$(_9b);$A(_9b.childNodes).each(function(_9d){if(_9d.nodeType==3){_9d.nodeValue.toArray().each(function(_9e){_9b.insertBefore(Builder.node("span",{style:_9c},_9e==" "?String.fromCharCode(160):_9e),_9d);});Element.remove(_9d);}});}};Effect.Transitions={};Effect.Transitions.linear=function(pos){return pos;};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null;},_each:function(_a0){this.effects._each(_a0);},add:function(_a1){var _a2=new Date().getTime();var _a3=(typeof _a1.options.queue=="string")?_a1.options.queue:_a1.options.queue.position;switch(_a3){case "front":this.effects.findAll(function(e){return e.state=="idle";}).each(function(e){e.startOn+=_a1.finishOn;e.finishOn+=_a1.finishOn;});break;case "end":_a2=this.effects.pluck("finishOn").max()||_a2;break;}_a1.startOn+=_a2;_a1.finishOn+=_a2;if(!_a1.options.queue.limit||(this.effects.length<_a1.options.queue.limit)){this.effects.push(_a1);}if(!this.interval){this.interval=setInterval(this.loop.bind(this),40);}},remove:function(_a6){this.effects=this.effects.reject(function(e){return e==_a6;});if(this.effects.length==0){clearInterval(this.interval);this.interval=null;}},loop:function(){var _a8=new Date().getTime();this.effects.invoke("loop",_a8);}});Effect.Queues={instances:$H(),get:function(_a9){if(typeof _a9!="string"){return _a9;}if(!this.instances[_a9]){this.instances[_a9]=new Effect.ScopedQueue();}return this.instances[_a9];}};Effect.Queue=Effect.Queues.get("global");Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(_aa){this.options=Object.extend(Object.extend({},Effect.DefaultOptions),_aa||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).add(this);}},loop:function(_ab){if(_ab>=this.startOn){if(_ab>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish();}this.event("afterFinish");return;}var pos=(_ab-this.startOn)/(this.finishOn-this.startOn);var _ad=Math.round(pos*this.options.fps*this.options.duration);if(_ad>this.currentFrame){this.render(pos);this.currentFrame=_ad;}}},render:function(pos){if(this.state=="idle"){this.state="running";this.event("beforeSetup");if(this.setup){this.setup();}this.event("afterSetup");}if(this.state=="running"){if(this.options.transition){pos=this.options.transition(pos);}pos*=(this.options.to-this.options.from);pos+=this.options.from;this.position=pos;this.event("beforeUpdate");if(this.update){this.update(pos);}this.event("afterUpdate");}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue=="string"?"global":this.options.queue.scope).remove(this);}this.state="finished";},event:function(_af){if(this.options[_af+"Internal"]){this.options[_af+"Internal"](this);}if(this.options[_af]){this.options[_af](this);}},inspect:function(){return "#<Effect:"+$H(this).inspect()+",options:"+$H(this.options).inspect()+">";}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(_b0){this.effects=_b0||[];this.start(arguments[1]);},update:function(_b1){this.effects.invoke("render",_b1);},finish:function(_b2){this.effects.each(function(_b3){_b3.render(1);_b3.cancel();_b3.event("beforeFinish");if(_b3.finish){_b3.finish(_b2);}_b3.event("afterFinish");});}});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(_b4){this.element=$(_b4);if(/MSIE/.test(navigator.userAgent)&&(!this.element.hasLayout)){Element.setStyle(this.element,{zoom:1});}var _b5=Object.extend({from:Element.getOpacity(this.element)||0,to:1},arguments[1]||{});this.start(_b5);},update:function(_b6){Element.setOpacity(this.element,_b6);}});Effect.Appear=function(_b7){var _b8=Object.extend({from:(Element.getStyle(_b7,"display")=="none"?0:Element.getOpacity(_b7)||0),to:1,beforeSetup:function(_b9){with(Element){setOpacity(_b9.element,_b9.options.from);show(_b9.element);}}},arguments[1]||{});return new Effect.Opacity(_b7,_b8);};Effect.Fade=function(_ba){var _bb=Element.getInlineOpacity(_ba);var _bc=Object.extend({from:Element.getOpacity(_ba)||1,to:0,afterFinishInternal:function(_bd){with(Element){if(_bd.options.to!=0){return;}hide(_bd.element);setStyle(_bd.element,{opacity:_bb});}}},arguments[1]||{});return new Effect.Opacity(_ba,_bc);};var load_count;var image_display_count;function initSlideShow(){image_files=new Array();image_files.push("Outdoor-2.jpg");image_files.push("kitchen.jpg");image_files.push("view-7.jpg");image_files.push("Outdoor-6.jpg");image_files.push("panorama01.jpg");load_count=0;image_display_count=0;preloadImages();}function preloadImages(){image_files.each(function(_be,_bf){preload=document.createElement("IMG");preload.setAttribute("src","/img/photos/"+image_files[image_display_count]);preload.onload=function(){load_count++;if(load_count==2){setInterval(showNext,6000);}};preload.src="/img/photos/"+_be;});}function showNext(){if(image_display_count==image_files.length-1){image_display_count=0;}new Effect.Fade("mainpic");setTimeout(function(){while($("panorama_link").hasChildNodes()){$("panorama_link").removeChild($("panorama_link").firstChild);}gallery_img=document.createElement("IMG");gallery_img.setAttribute("id","mainpic");gallery_img.setAttribute("src","/img/photos/"+image_files[image_display_count]);gallery_img.style.cssText="display: none;";$("panorama_link").appendChild(gallery_img);showPic();},1000);image_display_count++;}loaded_images=new Array();var image_path;function showPic(){new Effect.Appear("mainpic");return false;}var myrules={"#thumbnails a":function(_c0){_c0.onclick=function(){while($("panorama").hasChildNodes()){$("panorama").removeChild($("panorama").firstChild);}img_param=_c0.href.split("=");image_already_loaded=0;loaded_images.each(function(_c1,_c2){if(img_param[1]==_c1){image_already_loaded=1;}});if(image_already_loaded!=1){$("panorama").style.background="url(/img/throbber.gif) top left no-repeat";}else{$("panorama").style.background="none";}gallery_img=document.createElement("IMG");gallery_img.setAttribute("id","mainpic");gallery_img.setAttribute("src","/img/photos/"+img_param[1]);gallery_img.style.cssText="display: none;";gallery_img.onload=showPic;$("panorama").appendChild(gallery_img);loaded_images.push(img_param[1]);return false;};},"#panorama a img.initial":function(){element.onLoad=initSlideShow();}};Behaviour.register(myrules);