
function initialize(){mojoInit();}
var accordianElement=null;var MIN_ACCORDIAN_HEIGHT=28;var MAX_ACCORDIAN_HEIGHT=190;function accordianFocus(focusElement){if(focusElement==accordianElement)return false;if(focusElement.parentNode.tween)clearTimeout(focusElement.parentNode.tween);accordianFrame=function(){};accordianElement=focusElement;var items=accordianElement.parentNode.childNodes;var itemHeight=0;accordianFrame=function(){};for(var i=0;i<items.length;i++){itemHeight=_.h(items[i]);if(items[i]==accordianElement){destH=MAX_ACCORDIAN_HEIGHT;}else if(_.h(items[i])>MIN_ACCORDIAN_HEIGHT){destH=MIN_ACCORDIAN_HEIGHT;}else{continue;}
accordianFrame=buildAccordianFrame(accordianFrame,Math.easeOutQuad,items[i],itemHeight,destH-itemHeight)}
_.runTween(accordianElement.parentNode,accordianFrame,20,10,function(){});}
function buildAccordianFrame(nextStep,easing,liElement,start,diff){return function(list,currentFrame,totalFrames){_.sH(liElement,easing(currentFrame,start,diff,totalFrames));nextStep(liElement,currentFrame,totalFrames,start,diff);};}
var selectedImageElement=null;var selectedImageIndex=-1;function galleryFrame(easing,alphaStart,alphaDiff,CStart,CDiff){return function(htmlElement,currentFrame,totalFrames){_.alpha(htmlElement,easing(currentFrame,alphaStart,alphaDiff,totalFrames));_.bgRGBColor(htmlElement.parentNode,easing(currentFrame,CStart,CDiff,totalFrames),easing(currentFrame,CStart,CDiff,totalFrames),easing(currentFrame,CStart,CDiff,totalFrames));};}
function galleryHover(imageElement,imageIndex){if(selectedImageIndex==imageIndex)return;startColor=parseInt("1E",16);diffColor=255-startColor;_.runTween(imageElement,galleryFrame(Math.easeInOutQuint,70,30,startColor,diffColor),10,15,function(){});}
function galleryLeave(imageElement,imageIndex){if(selectedImageIndex==imageIndex)return;startColor=255;diffColor=parseInt("1E",16)-startColor;_.runTween(imageElement,galleryFrame(Math.easeInOutSine,100,-30,startColor,diffColor),10,15,function(){});}
function gallery_select(imageElement,imageIndex){var oldSelection=selectedImageIndex;selectedImageElement=imageElement;selectedImageIndex=imageIndex;if(oldSelection)galleryLeave(imageElement.parentNode.childNodes[oldSelection],oldSelection);}