var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:"left",y:"top"}},initialize:function(){var B=Array.link(arguments,{options:Object.type,element:$defined});this.element=$(B.element);this.document=this.element.getDocument();this.setOptions(B.options||{});var A=$type(this.options.handle);this.handles=(A=="array"||A=="collection")?$$(this.options.handle):$(this.options.handle)||this.element;this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection=(Browser.Engine.trident)?"selectstart":"mousedown";this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach();},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this;},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);return this;},start:function(C){if(this.options.preventDefault){C.preventDefault();}this.fireEvent("beforeStart",this.element);this.mouse.start=C.page;var A=this.options.limit;this.limit={x:[],y:[]};for(var D in this.options.modifiers){if(!this.options.modifiers[D]){continue;}if(this.options.style){this.value.now[D]=this.element.getStyle(this.options.modifiers[D]).toInt();}else{this.value.now[D]=this.element[this.options.modifiers[D]];}if(this.options.invert){this.value.now[D]*=-1;}this.mouse.pos[D]=C.page[D]-this.value.now[D];if(A&&A[D]){for(var B=2;B--;B){if($chk(A[D][B])){this.limit[D][B]=$lambda(A[D][B])();}}}}if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};}this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop);},check:function(A){if(this.options.preventDefault){A.preventDefault();}var B=Math.round(Math.sqrt(Math.pow(A.page.x-this.mouse.start.x,2)+Math.pow(A.page.y-this.mouse.start.y,2)));if(B>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("start",this.element).fireEvent("snap",this.element);}},drag:function(A){if(this.options.preventDefault){A.preventDefault();}this.mouse.now=A.page;for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue;}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B];if(this.options.invert){this.value.now[B]*=-1;}if(this.options.limit&&this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1];}else{if($chk(this.limit[B][0])&&(this.value.now[B]<this.limit[B][0])){this.value.now[B]=this.limit[B][0];}}}if(this.options.grid[B]){this.value.now[B]-=(this.value.now[B]%this.options.grid[B]);}if(this.options.style){this.element.setStyle(this.options.modifiers[B],this.value.now[B]+this.options.unit);}else{this.element[this.options.modifiers[B]]=this.value.now[B];}}this.fireEvent("drag",this.element);},cancel:function(A){this.document.removeEvent("mousemove",this.bound.check);this.document.removeEvent("mouseup",this.bound.cancel);if(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);}},stop:function(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent("mousemove",this.bound.drag);this.document.removeEvent("mouseup",this.bound.stop);if(A){this.fireEvent("complete",this.element);}}});Element.implement({makeResizable:function(A){return new Drag(this,$merge({modifiers:{x:"width",y:"height"}},A));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false},initialize:function(C,B){this.parent(C,B);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);if(this.container&&$type(this.container)!="element"){this.container=$(this.container.getDocument().body);}C=this.element;var D=C.getStyle("position");var A=(D!="static")?D:"absolute";if(C.getStyle("left")=="auto"||C.getStyle("top")=="auto"){C.position(C.getPosition(C.offsetParent));}C.setStyle("position",A);this.addEvent("start",function(){this.checkDroppables();},true);},start:function(B){if(this.container){var D=this.element,J=this.container,E=J.getCoordinates(D.offsetParent),F={},A={};["top","right","bottom","left"].each(function(K){F[K]=J.getStyle("padding-"+K).toInt();A[K]=D.getStyle("margin-"+K).toInt();},this);var C=D.offsetWidth+A.left+A.right,I=D.offsetHeight+A.top+A.bottom;var H=[E.left+F.left,E.right-F.right-C];var G=[E.top+F.top,E.bottom-F.bottom-I];this.options.limit={x:H,y:G};}this.parent(B);},checkAgainst:function(B){B=B.getCoordinates();var A=this.mouse.now;return(A.x>B.left&&A.x<B.right&&A.y<B.bottom&&A.y>B.top);},checkDroppables:function(){var A=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=A){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);}if(A){this.overed=A;this.fireEvent("enter",[this.element,A]);}else{this.overed=null;}}},drag:function(A){this.parent(A);if(this.droppables.length){this.checkDroppables();}},stop:function(A){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed]);this.overed=null;return this.parent(A);}});Element.implement({makeDraggable:function(A){return new Drag.Move(this,A);}});var Asset=new Hash({javascript:function(F,D){D=$extend({onload:$empty,document:document,check:$lambda(true)},D);var B=new Element("script",{src:F,type:"text/javascript"});var E=D.onload.bind(B),A=D.check,G=D.document;delete D.onload;delete D.check;delete D.document;B.addEvents({load:E,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){E();}}}).setProperties(D);if(Browser.Engine.webkit419){var C=(function(){if(!$try(A)){return;}$clear(C);E();}).periodical(50);}return B.inject(G.head);},css:function(B,A){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:B},A)).inject(document.head);},image:function(C,B){B=$merge({onload:$empty,onabort:$empty,onerror:$empty},B);var D=new Image();var A=$(D)||new Element("img");["load","abort","error"].each(function(E){var F="on"+E;var G=B[F];delete B[F];D[F]=function(){if(!D){return;}if(!A.parentNode){A.width=D.width;A.height=D.height;}D=D.onload=D.onabort=D.onerror=null;G.delay(1,A,A);A.fireEvent(E,A,1);};});D.src=A.src=C;if(D&&D.complete){D.onload.delay(1);}return A.setProperties(B);},images:function(D,C){C=$merge({onComplete:$empty,onProgress:$empty},C);if(!D.push){D=[D];}var A=[];var B=0;D.each(function(F){var E=new Asset.image(F,{onload:function(){C.onProgress.call(this,B,D.indexOf(F));B++;if(B==D.length){C.onComplete();}}});A.push(E);});return new Elements(A);}});;
/* Copyright (c) [Darren Kovalchik](http://ellipsisentity.com), MIT Style License.
*/
var LinkAlert=new Class({typeOrder:['external','secure','secureExternal','mail','picture','pdf','rss','video','audio','streaming','archive','code','document','text','spreadsheet','presentation','paint','vector','plugin','program','iso'],types:{'picture':['jpg','jpeg','png','gif','bmp'],'pdf':['pdf'],'rss':['rss','atom'],'video':['avi','divx','mov','flv','swf','mpeg','mpg','mpe','wmv','asf','rm'],'audio':['mp3','mp2','ogg','oga','wma','ra','wav','mid'],'streaming':['asx','pls','m3u','xspf','b4s','wpl','ram','zpl'],'archive':['zip','tar','rar','dmg','7z','gz','tgz'],'code':['js','css','phps'],'document':['doc','docx','odt','pages'],'text':['txt','rtf'],'spreadsheet':['xls','xlsx','ods','numbers'],'presentation':['ppt','pptx','odp','key','keynote'],'paint':['psd'],'vector':['ai','eps'],'plugin':['xpi'],'program':['exe','dll','msi','app'],'iso':['iso']},iconSize:16,initialize:function(iconPath){iconPath=$pick(iconPath,'/js/linkalert/');iconPath+=(Browser.Engine.trident4)?'icons.gif':'icons.png';this.domain=($chk(document.domain))?document.domain:null;this.types=new Hash(this.types);this.container=new Element('div',{styles:{position:'absolute',top:0,left:-50,width:16,height:16,overflow:'hidden',zIndex:9999}}).inject(document.body);this.icons=new Element('img',{src:iconPath,styles:{position:'absolute',top:0,left:0}}).inject(this.container);this.icon=new CursorTail(this.container);if(Browser.Engine.gecko)
this.disableExtension();this.setupLinks();},setupLinks:function(){$$('a').each(function(a){var href=a.get('href');var type=$pick(this.identifyType(href),this.identifyProtocol(href));if(type){a.addEvent('mouseover',function(){this.icons.setStyle('left',-this.typeOrder.indexOf(type)*this.iconSize);this.icon.attach();}.bind(this));a.addEvent('mouseout',function(){this.icon.detach();}.bind(this));}},this);},identifyType:function(href){var type=href.getExtension();var identifiedType=null;this.types.each(function(array,index){if(!identifiedType)
if(array.contains(type))identifiedType=index;});return identifiedType;},identifyProtocol:function(href){var protocol=href.getProtocol();return(protocol=='http'&&!href.contains(this.domain))?'external':(protocol=='https'&&!href.contains(this.domain))?'secureExternal':(protocol=='https')?'secure':(protocol=='mailto')?'mail':null;},disableExtension:function(){new Element('style',{text:'#linkalert-box{display:none}'}).inject(document.head);}});var CursorTail=new Class({initialize:function(element){this.element=$(element);var xOffset=(Browser.Platform.win)?15:11;var yOffset=(Browser.Platform.win)?13:9;this.moveWithMouse=function(event){element.setStyles({left:event.page.x+xOffset,top:event.page.y+yOffset});};element.setStyles({position:'absolute',top:0,left:-9999});},attach:function(){document.addEvent('mousemove',this.moveWithMouse);},detach:function(){document.removeEvent('mousemove',this.moveWithMouse);this.element.setStyle('left',-9999);}});String.implement({getExtension:function(){var extension=this.split('?')[0].split('.');if(extension.length<2)return null;return extension.getLast();},getProtocol:function(){var protocol=this.split(':');if(protocol.length<2)return null;return protocol[0];}});;var ReMooz=new Class({Implements:[Events,Options,Chain],options:{link:null,type:'image',container:null,className:null,centered:false,dragging:true,closeOnClick:true,shadow:(Browser.Engine.trident)?'onOpenEnd':'onOpen',resize:true,margin:20,resizeFactor:0.95,resizeLimit:false,fixedSize:false,cutOut:true,addClick:true,opacityLoad:0.6,opacityResize:1,opacityTitle:0.9,resizeOptions:{},fxOptions:{},closer:true,parse:false,parseSecure:false,temporary:false,onBuild:$empty,onLoad:$empty,onOpen:$empty,onOpenEnd:$empty,onClose:$empty,onCloseEnd:$empty,generateTitle:function(el){var text=el.get('title');if(!text)return false;var title=text.split(' :: ');var head=new Element('h6',{'html':title[0]});return(title[1])?[head,new Element('p',{'html':title[1]})]:head;}},initialize:function(element,options){this.element=$(element);this.setOptions(options);if(this.options.parse){var obj=this.element.getProperty(this.options.parse);if(obj&&(obj=JSON.decode(obj,this.options.parseSecure)))this.setOptions(obj);}
var origin=this.options.origin;this.origin=((origin)?$(origin)||this.element.getElement(origin):null)||this.element;this.link=this.options.link||this.element.get('href')||this.element.get('src');this.container=$(this.options.container)||this.element.getDocument();this.bound={'click':function(e){this.open.delay(1,this);return false;}.bind(this),'close':this.close.bind(this),'dragClose':function(e){if(e.rightClick)return;this.close();}.bind(this)};if(this.options.addClick)this.bindToElement();},destroy:function(){if(this.box)this.box.destroy();this.box=this.tweens=this.body=this.content=null;},bindToElement:function(element){($(element)||this.element).addClass('remooz-element').addEvent('click',this.bound.click);return this;},getOriginCoordinates:function(){var coords=this.origin.getCoordinates();delete coords.right;delete coords.bottom;return coords;},open:function(e){if(this.opened)return(e)?this.close():this;this.opened=this.loading=true;if(!this.box)this.build();this.coords=this.getOriginCoordinates();this.coords.opacity=this.options.opacityLoad;this.coords.display='';this.tweens.box.set(this.coords);this.box.addClass('remooz-loading');ReMooz.open(this.fireEvent('onLoad'));this['open'+this.options.type.capitalize()]();return this;},finishOpen:function(){this.tweens.fade.start(0,1);this.drag.attach();this.fireEvent('onOpenEnd').callChain();},close:function(){if(!this.opened)return this;this.opened=false;ReMooz.close(this.fireEvent('onClose'));if(this.loading){this.box.setStyle('display','none');return this;}
this.drag.detach();this.tweens.fade.cancel().set(0).fireEvent('onComplete');if(this.tweens.box.timer)this.tweens.box.clearChain();var vars=this.getOriginCoordinates();if(this.options.opacityResize!=1)vars.opacity=this.options.opacityResize;this.tweens.box.start(vars).chain(this.closeEnd.bind(this));return this;},closeEnd:function(){if(this.options.cutOut)this.element.setStyle('visibility','visible');this.box.setStyle('display','none');this.fireEvent('onCloseEnd').callChain();if(this.options.temporary)this.destroy();},openImage:function(){var tmp=new Image();tmp.onload=tmp.onabort=tmp.onerror=function(fast){this.loading=tmp.onload=tmp.onabort=tmp.onerror=null;if(!tmp.width||!this.opened){this.fireEvent('onError').close();return;}
var to={x:tmp.width,y:tmp.height};if(!this.content)this.content=$(tmp).inject(this.body);else tmp=null;this[(this.options.resize)?'zoomRelativeTo':'zoomTo'].create({'delay':(tmp&&fast!==true)?1:null,'arguments':[to],'bind':this})();}.bind(this);tmp.src=this.link;if(tmp&&tmp.complete&&tmp.onload)tmp.onload(true);},openElement:function(){this.content=this.content||$(this.link)||$E(this.link);if(!this.content){this.fireEvent('onError').close();return;}
this.content.inject(this.body);this.zoomTo({x:this.content.scrollWidth,y:this.content.scrollHeight});},zoomRelativeTo:function(to){var scale=this.options.resizeLimit;if(!scale){scale=this.container.getSize();scale.x*=this.options.resizeFactor;scale.y*=this.options.resizeFactor;}
for(var i=2;i--;){if(to.x>scale.x){to.y*=scale.x/to.x;to.x=scale.x;}else if(to.y>scale.y){to.x*=scale.y/to.y;to.y=scale.y;}}
return this.zoomTo({x:to.x.toInt(),y:to.y.toInt()});},zoomTo:function(to){to=this.options.fixedSize||to;var box=this.container.getSize(),scroll=this.container.getScroll();var pos=(!this.options.centered)?{x:(this.coords.left+(this.coords.width/2)-to.x/2).toInt().limit(scroll.x+this.options.margin,scroll.x+box.x-this.options.margin-to.x),y:(this.coords.top+(this.coords.height/2)-to.y/2).toInt().limit(scroll.y+this.options.margin,scroll.y+box.y-this.options.margin-to.y)}:{x:scroll.x+((box.x-to.x)/2).toInt(),y:scroll.y+((box.y-to.y)/2).toInt()};if(this.options.cutOut)this.element.setStyle('visibility','hidden');this.box.removeClass('remooz-loading');var vars={left:pos.x,top:pos.y,width:to.x,height:to.y};if(this.options.opacityResize!=1)vars.opacity=[this.options.opacityResize,1];else this.box.set('opacity',1);this.tweens.box.start(vars).chain(this.finishOpen.bind(this));this.fireEvent('onOpen');},build:function(){this.addEvent('onBlur',function(){this.focused=false;this.box.removeClass('remooz-box-focus').setStyle('z-index',ReMooz.options.zIndex);},true);this.addEvent('onFocus',function(){this.focused=true;this.box.addClass('remooz-box-focus').setStyle('z-index',ReMooz.options.zIndexFocus);},true);var classes=['remooz-box','remooz-type-'+this.options.type,'remooz-engine-'+Browser.Engine.name+Browser.Engine.version];if(this.options.className)classes.push(this.options.className);this.box=new Element('div',{'class':classes.join(' '),'styles':{'display':'none','top':0,'left':0,'zIndex':ReMooz.options.zIndex}});this.tweens={'box':new Fx.Morph(this.box,$merge({'duration':400,'unit':'px','transition':Fx.Transitions.Quart.easeOut,'chain':'cancel'},this.options.resizeOptions)),'fade':new Fx.Tween(null,$merge({'property':'opacity','duration':(Browser.Engine.trident)?0:300,'chain':'cancel'},this.options.fxOptions)).addEvents({'onComplete':function(){if(!this.element.get('opacity'))this.element.setStyle('display','none');},'onStart':function(){if(!this.element.get('opacity'))this.element.setStyle('display','');}})};this.tweens.fade.element=$$();if(this.options.shadow){if(Browser.Engine.webkit420){this.box.setStyle('-webkit-box-shadow','0 0 10px rgba(0, 0, 0, 0.7)');}else if(!Browser.Engine.trident4){var shadow=new Element('div',{'class':'remooz-bg-wrap'}).inject(this.box);['n','ne','e','se','s','sw','w','nw'].each(function(dir){new Element('div',{'class':'remooz-bg remooz-bg-'+dir}).inject(shadow);});this.tweens.bg=new Fx.Tween(shadow,{'property':'opacity','chain':'cancel'}).set(0);this.addEvent(this.options.shadow,this.tweens.bg.set.bind(this.tweens.bg,1),true);this.addEvent('onClose',this.tweens.bg.set.bind(this.tweens.bg,0),true);}}
if(this.options.closer){var closer=new Element('a',{'class':'remooz-btn-close','events':{'click':this.bound.close}}).inject(this.box);this.tweens.fade.element.push(closer);}
this.body=new Element('div',{'class':'remooz-body'}).inject(this.box);var title=this.options.title||this.options.generateTitle.call(this,this.element);if(title){var title=new Element('div',{'class':'remooz-title'}).adopt(new Element('div',{'class':'remooz-title-bg','opacity':this.options.opacityTitle}),new Element('div',{'class':'remooz-title-content'}).adopt(title)).inject(this.box);this.tweens.fade.element.push(title);}
this.tweens.fade.set(0).fireEvent('onComplete');this.drag=new Drag.Move(this.box,{'snap':15,'preventDefault':true,'onBeforeStart':function(){if(!this.focused&&!this.loading)ReMooz.focus(this);else if(this.loading||this.options.closeOnClick)this.box.addEvent('mouseup',this.bound.dragClose);}.bind(this),'onSnap':function(){this.box.removeEvent('mouseup',this.bound.dragClose);if(!this.options.dragging)this.drag.stop();else this.box.addClass('remooz-box-dragging');}.bind(this),'onComplete':function(){this.box.removeClass('remooz-box-dragging');}.bind(this)});this.drag.detach();this.fireEvent('onBuild',this.box,this.element);this.box.inject(this.element.getDocument().body);}});ReMooz.factory=function(extended){return $extend(this,extended);};ReMooz.factory(new Options).factory({options:{zIndex:41,zIndexFocus:42,query:'a.remooz',modal:false},assign:function(elements,options){return $$(elements).map(function(element){return new ReMooz(element,options);},this);},stack:[],open:function(obj){var last=this.stack.getLast();this.focus(obj);if(last&&this.options.modal)last.close();},close:function(obj){var length=this.stack.length-1;if(length>1&&this.stack[length]==obj)this.focus(this.stack[length-1]);this.stack.erase(obj);},focus:function(obj){var last=this.stack.getLast();obj.fireEvent('onFocus',[obj]);if(last==obj)return;if(last)last.fireEvent('onBlur',[last]);this.stack.erase(obj).push(obj);}});;Browser.Engines.trident=function(){return(!window.ActiveXObject)?false:((window.XDomainRequest)?6:((window.XMLHttpRequest)?5:4));};Browser.detect();Element.implement({unfuscate:function(seperator1,seperator2){seperator1=$pick(seperator1,'|');seperator2=$pick(seperator2,'*');new Element('a',{html:this.get('html'),href:'mailto:'+this.get('rel').replace(seperator1,'@').replace(seperator2,'.'),'class':this.get('class')}).replaces(this);},hoverColor:function(newColor){var originalColor=this.getStyle('color');this.addEvents({mouseenter:function(){this.tween('color',newColor);},mouseleave:function(){this.tween('color',originalColor);}});return this;},innerShadow:function(){['top-left','top','top-right','right','bottom-right','bottom','bottom-left','left'].each(function(value){new Element('div',{'class':'shadow '+value}).inject(this,'top');},this);return this;},matchHeight:function(target){var height=$(target).getSize().y;this.setStyle('height',height);return this;},determineCenter:function(){var size=this.getSize();return{x:(size.x/2).round(),y:(size.y/2).round()};}});var Projects=new Class({initialize:function(projects){this.projects=$(projects);var thumbnails=$('thumbnails'),thumbsHash=new Hash();$$('#projects > div').each(function(el){var img=$pick(el.getFirst().getFirst(),el.getFirst());el.setStyle('width',430);var halfSize={x:(430/2).round(),y:(el.getSize().y/2).round()};el.store('halfSize',halfSize);el.setStyles({position:'absolute',top:-halfSize.y,left:-halfSize.x,'margin-top':-halfSize.y,'margin-left':-halfSize.x});var thumbSrc=img.get('src').split('/');thumbSrc.pop();thumbSrc=thumbSrc.join('/')+'/thumb.jpg';thumbsHash.include(thumbSrc,el);},this);var width=(thumbsHash.getLength()/2).round()*45;if(width>200)width=200;thumbnails.setStyle('width',width);this.bracket=new Element('div',{id:'bracket'}).inject(thumbnails,'top');this.createThumbs(thumbsHash);},createThumbs:function(thumbsHash){var thumbsArray=[];thumbsHash.each(function(value,index){thumbsArray.include(index);});var thumbs=new Asset.images(thumbsArray,{onComplete:function(){thumbs.each(function(img){var el=thumbsHash.get(img.get('src'));img.addEvent('click',function(thumb){this.swapProject(el,thumb.target);}.bindWithEvent(this));img.inject('thumbnails');},this);if(Browser.Engine.trident4||Browser.Engine.trident5)
this.projects.matchHeight('section-stuff');this.areaCenter=this.projects.determineCenter();this.swapProject(this.projects.getLast(),$('thumbnails').getLast());}.bind(this)});},swapProject:function(project,thumb){if(Browser.Engine.trident5&&(this.areaCenter.y==0||this.areaCenter.y==200))
this.areaCenter.y=(this.projects.determineCenter().y!=0)?this.projects.determineCenter().y:200;var coordinates=this.changeThumb(thumb,project);this.changeProject(project,coordinates);},changeProject:function(el,coordinates){el.setStyles(coordinates.newThumb);el.morph({top:this.areaCenter.y,left:this.areaCenter.x,opacity:1});if(this.current)
this.current.morph(coordinates.currentThumb);this.current=el;},changeThumb:function(newThumb,project){var newPosition=newThumb.getPosition('thumbnails');if(this.currentThumb)
var currentPosition=this.currentThumb.getPosition('thumbnails');else
var currentPosition=newPosition;this.bracket.morph({top:newPosition.y,left:newPosition.x});this.currentThumb=newThumb;var leftDirection=newPosition.x-currentPosition.x,topDirection=newPosition.y-currentPosition.y;var halfSize=project.retrieve('halfSize');var coordinates={newThumb:{top:this.areaCenter.y,left:this.areaCenter.x,opacity:0},currentThumb:{top:this.areaCenter.y,left:this.areaCenter.x,opacity:0}};if(leftDirection>0){coordinates.newThumb.left=this.areaCenter.x*2+halfSize.x;coordinates.currentThumb.left=-halfSize.x;}
else if(leftDirection<0){coordinates.newThumb.left=-halfSize.x;coordinates.currentThumb.left=this.areaCenter.x*2+halfSize.x;}
if(topDirection>0){coordinates.newThumb.top=this.areaCenter.y*2+halfSize.y;coordinates.currentThumb.top=-halfSize.y;}
else if(topDirection<0){coordinates.newThumb.top=-halfSize.y;coordinates.currentThumb.top=this.areaCenter.y*2+halfSize.y;}
return coordinates;}});var site={initialize:function(){var projects=$('projects');if(projects){projects.setStyle('overflow-y','hidden');projects.getChildren().setStyle('opacity',0);}
new LinkAlert();},start:function(){var projects=$('projects');if(projects){new Projects(projects);projects.setStyle('background-image','none');if(!Browser.Engine.trident4)
projects.innerShadow();if(Browser.Engine.trident4){projects.setStyles({'overflow-y':'hidden',position:'absolute'});}
var opacity=(Browser.Engine.trident5)?1:0.6;var zooms=$$('#projects a.zoom');if(zooms.length>0){ReMooz.assign(zooms,{origin:'img',resizeFactor:0.8,centered:true,dragging:false,opacityLoad:opacity});}}}};swfobject.registerObject('scroller','9.0.0');window.addEvent('domready',site.initialize);window.addEvent('load',site.start);