function get_page_size()
{var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;}
function get_page_scroll(){var yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;}else if(document.body){yScroll=document.body.scrollTop;}
arrayPageScroll=new Array('',yScroll)
return arrayPageScroll;}
function grayscale(image,bPlaceImage)
{var myCanvas=document.createElement("canvas");var myCanvasContext=myCanvas.getContext("2d");var imgWidth=image.width;var imgHeight=image.height;myCanvas.width=imgWidth;myCanvas.height=imgHeight;myCanvasContext.drawImage(image,0,0);var imageData=myCanvasContext.getImageData(0,0,imgWidth,imgHeight);for(j=0;j<imageData.height;i++)
{for(i=0;i<imageData.width;j++)
{var index=(i*4)*imageData.width+(j*4);var red=imageData.data[index];var green=imageData.data[index+1];var blue=imageData.data[index+2];var alpha=imageData.data[index+3];var average=(red+green+blue)/3;imageData.data[index]=average;imageData.data[index+1]=average;imageData.data[index+2]=average;imageData.data[index+3]=alpha;}}
if(bPlaceImage)
{var myDiv=document.createElement("div");myDiv.appendChild(myCanvas);image.parentNode.appendChild(myCanvas);}
return myCanvas.toDataURL();}
function set_opacity(obj,value){obj.style.opacity=value/10;obj.style.filter='alpha(opacity='+value*10+')';}
Array.prototype.in_array=function(p_val){for(var i=0,l=this.length;i<l;i++){if(this[i]==p_val){return true;}}
return false;}
Array.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');}
function get_args()
{var args=new Object();var query=location.search.substring(1);var pairs=query.split("&");for(var i=0;i<pairs.length;i++)
{var pos=pairs[i].indexOf('=');if(pos==-1)continue;var argname=pairs[i].substring(0,pos);var value=pairs[i].substring(pos+1);args[argname]=unescape(value);}
return args;}
function in_array(needle,haystack)
{for(var i in haystack)
{if(needle==haystack[i])return true;}
return false;}
String.prototype.trim=function()
{return this.replace(/^\s+|\s+$/,'');}
String.prototype.is_empty=function()
{if(this.trim()=='')return true;}
String.prototype.ucfirst=function()
{return this.substr(0,1).toUpperCase()+this.substr(1,this.length);}
String.prototype.strip_tags=function()
{return this.replace(/<&#91;^>&#93;*>/g,'');}
stripslashes=function(str){return(str+'').replace(/\\(.?)/g,function(s,n1){switch(n1){case'\\':return'\\';case'0':return'\0';case'':return'';default:return n1;}});}
String.prototype.str_replace=function(search,replace,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=this,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;}
for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue;}
for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length;}}}
return sa?s:s[0];}
substr=function(f_string,f_start,f_length){f_string+='';if(f_start<0){f_start+=f_string.length;}
if(f_length==undefined){f_length=f_string.length;}else if(f_length<0){f_length+=f_string.length;}else{f_length+=f_start;}
if(f_length<f_start){f_length=f_start;}
return f_string.substring(f_start,f_length);}
font_size_tofit=function(element,max)
{var fontSize=max;var ourText=element.childNodes[1];var maxHeight=element.getHeight();var maxWidth=element.getWidth();var textHeight;var textWidth;do
{ourText.style.fontSize=fontSize+'px';textHeight=ourText.offsetHeight;textWidth=ourText.getWidth();fontSize=fontSize-1;}
while((textHeight>maxHeight||textWidth>maxWidth)&&fontSize>3);}
var data_class=Class.create({get:function(varname)
{},set:function(varname,value,global)
{if(global)
{global='&global=1';}
else
{var global='';}
new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=data.set&var='+varname+'&value='+value+global,onComplete:function(response)
{return true;}});}});var data=new data_class();
var dir='';var location_store=new Array();var uri_split=new Array();var Global=Class.create({disable_apis:new Array(),uri:new Array(),args:new Object(),last_active:0,initialize:function()
{this.args=get_args();document.observe('mousemove',function()
{global.last_active=global.now();});},now:function()
{return parseInt(new Date().getTime().toString().substring(0,10));},set_uri:function(string)
{uri_split=string.split(',');},update_status:function()
{var status_obj=$('status_field');var status=status_obj.value;if(status==''||status=='What are you up to...?')
{user.alert('Please enter a status before updating.');return;}
$('status_load').style.display='block';$('status_count').style.display='none';$('status_field').disabled=true;$('status_field').className='';new Ajax.Request(dir+'/scripts/php/actions.php',{parameters:'action=api.update_status&status='+escape(status)+'&disable='+this.disable_apis.join(','),onComplete:function(response)
{if(uri_split[0]=='dashboard')
{var range=document.createRange();range.selectNode(document.body);var parsedHTML=range.createContextualFragment(response.feed.template);var feed=document.createElement('li');feed.style.display='none';feed.appendChild(parsedHTML);$('status_load').style.display='none';$('status_count').style.display='block';$('status_count').innerHTML='140';$('status_field').disabled=false;$('status_field').value='What are you up to...?';$('feeds').insertBefore(feed,$('feeds').firstChild);new Effect.BlindDown(feed);new Effect.Pulsate(feed,{pulses:5,duration:2.5});}},onError:function(response)
{$('status_load').style.display='none';$('status_count').style.display='block';$('status_count').innerHTML='140';$('status_field').disabled=false;$('status_field').value='What are you up to...?';user.alert('We were unable to update some or all of your networks. They may just be down, but the issue has been reported so we suggest that you try again later.<br />Sorry for any inconvenience caused.');}});},toggle_api:function(which,default_set)
{var new_list=new Array();var there=false;for(var i=0;i<this.disable_apis.length;i++)
{if(this.disable_apis[i]!=which)
{new_list[new_list.length]=this.disable_apis[i];}
else
{there=true;}}
if(!there)
{new_list[new_list.length]=which;$('api_icon_'+which).className='network '+which+' disabled';}
else
{$('api_icon_'+which).className='network '+which+' enabled';}
this.disable_apis=new_list;if(default_set==null)
{data.set('status_disable.'+which,((there)?0:1));}},toggle_status_updater:function(btn_obj)
{if($('you').style.display=='none')
{Effect.BlindDown('you');btn_obj.innerHTML='Hide Status Updater';global.set_session('hide_status_updater','0');}
else
{Effect.BlindUp('you');btn_obj.innerHTML='Show Status Updater';global.set_session('hide_status_updater','1');}},search_location:function(buttonObj)
{var fieldObj=buttonObj.parentNode.parentNode.childNodes[1];$('search_results').style.display='none';$('loading_search').style.display='block';$('search_results').innerHTML='';new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=location.search&q='+fieldObj.value,onComplete:function(response)
{response.results=response.response;if(response.results.length)
{for(var i=0;i<response.results.length;i++)
{var li=document.createElement('li');var title=document.createElement('div');title.innerHTML=response.results[i].title;li.appendChild(title);var address=document.createElement('span');address.innerHTML=response.results[i].streetAddress;li.appendChild(address);var set=document.createElement('a');set.className='buttonslim';set.setAttribute('href','#');set.setAttribute('onclick','global.set_location(\''+response.results[i].title+' ('+response.results[i].streetAddress+')\', \''+response.results[i].lat+'\', \''+response.results[i].lng+'\'); return false;');var set_text=document.createElement('span');set_text.innerHTML='Set Location';set.appendChild(set_text);li.appendChild(set);var clear=document.createElement('div');clear.className='clear';li.appendChild(clear);$('search_results').appendChild(li);}}
else
{}
$('search_results').style.display='block';$('loading_search').style.display='none';popup.reposition();}});},set_location:function(string,lat,long)
{new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=location.set&location='+escape(string)+'&lat='+lat+'&long='+long,onComplete:function(response)
{if(uri_split[0]=='user')
{}
else
{$('you_location').innerHTML=string;popup.close();user.alert('Your location has successfully been updated.');}}});},set_search_type:function(type,headerelem,headerinputclass)
{document.forms['search_header'].elements['search[type]'].value=type;if(uri_split[0]=='search')document.forms['search_page'].elements['search[type]'].value=type;if(headerinputclass!=undefined||headerinputclass!=false)
{document.forms['search_header'].elements['search[query]'].className=headerinputclass;}
else
{document.forms['search_header'].elements['search[query]'].className='';}
if(headerelem!=false)
{var headertypes=headerelem.parentNode.parentNode;for(var i=0;i<headertypes.childNodes.length;i++)
{headertypes.childNodes[i].className='';}
headerelem.parentNode.className='current';}
if(uri_split[0]=='search')
{switch(type)
{case'updates':if(uri_split[0]=='search')document.forms['search_page'].elements['search[query]'].value='Search Updates';break;case'people':if(uri_split[0]=='search')document.forms['search_page'].elements['search[query]'].value='Search People';break;case'places':if(uri_split[0]=='search')document.forms['search_page'].elements['search[query]'].value='Search Locations';break;case'discussions':if(uri_split[0]=='search')document.forms['search_page'].elements['search[query]'].value='Search Discussions';break;case'photos':if(uri_split[0]=='search')document.forms['search_page'].elements['search[query]'].value='Search Photos';break;}}
if(uri_split[0]=='search')
{for(var i=0;i<$('search_page').childNodes[1].childNodes[1].childNodes[1].childNodes.length;i++)
{if($('search_page').childNodes[1].childNodes[1].childNodes[1].childNodes[i].tagName=='A')
{$('search_page').childNodes[1].childNodes[1].childNodes[1].childNodes[i].className=(type==$('search_page').childNodes[1].childNodes[1].childNodes[1].childNodes[i].getAttribute('id').replace('search_type_',''))?'active':'';}}}},update_status_counter:function(field,counter)
{var limit=140;counter=$(counter);counter.innerHTML=limit-field.value.length;counter.className='counter';if((limit-field.value.length)<=50)
{counter.className='counter low';}
if((limit-field.value.length)<=0)
{counter.className='counter empty';}},set_session:function(name,value)
{new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=data.set_session&name='+name+'&value='+escape(value)});},});var global=new Global();global.last_active=global.now();
var popup_class=Class.create({initialize:function(file)
{},show:function(file,params)
{new Ajax.Request(dir+'/content/popups/'+file+'.php',{method:'post',parameters:params,onComplete:function(response)
{if(response)
{var body=document.getElementsByTagName('body')[0];var container=document.createElement('div');container.setAttribute('id','popup');container.className='popup-container';var content=document.createElement('div');content.className='popup-content';content.innerHTML=response;container.insertBefore(content,container.firstChild);var mask=document.createElement('div');mask.setAttribute('id','popup-mask');mask.className='popup-mask';body.insertBefore(mask,body.firstChild);body.insertBefore(container,body.firstChild);var size=get_page_size();var scroll=get_page_scroll();content.style.top=(size[3]/2)-(content.offsetHeight/2)+'px';content.style.left=(size[0]/2)-(content.offsetWidth/2)+'px';mask.style.height=size[1]+'px';return false;}}});return false;},close:function()
{$('popup').style.display='none';$('popup-mask').style.display='none';document.getElementsByTagName('body')[0].removeChild($('popup'));document.getElementsByTagName('body')[0].removeChild($('popup-mask'));},reposition:function()
{var size=get_page_size();var scroll=get_page_scroll();$('popup').childNodes[0].style.top=(scroll[1]+((size[3]-$('popup').childNodes[0].offsetHeight)/2)+'px');$('popup').childNodes[0].style.left=(((size[0]-$('popup').childNodes[0].offsetWidth)/2)+'px');}});var popup=new popup_class();
var switch_class=Class.create({initialize:function(){},set_on:function(which){alert(which);var switchObj=which.parentElement.parentElement;alert('1');switchObj.childNodes[1].className='on current';switchObj.childNodes[3].className='off';switchObj.childNodes[1].innerHTML='On';var link=document.createElement('a');link.setAttribute('href','#');link.setAttribute('onclick','switch_class.set_off(this); return false;');link.innerHTML='Off';switchObj.childNodes[3].appendChild(link);},set_off:function(which){var switchObj=which.parentElement.parentElement;switchObj.childNodes[3].className='off current';switchObj.childNodes[1].className='on';switchObj.childNodes[3].innerHTML='Off';var link=document.createElement('a');link.setAttribute('href','#');link.setAttribute('onclick','switch_class.set_on(this); return false;');link.innerHTML='On';switchObj.childNodes[1].appendChild(link);}});var switch_class=new switch_class();
var user_class=Class.create({initialize:function()
{},alert:function(message)
{popup.show('user_alert',{message:message});},confirm:function(message)
{return confirm(message);}});var user=new user_class();
var class_api=Class.create({initialize:function(){},post_comment:function(which,postid,buttonObj)
{var fieldObj=buttonObj.parentNode.parentNode.childNodes[0];buttonObj.disabled=true;fieldObj.disabled=true;new Ajax.Request(dir+'/scripts/php/actions.php',{parameters:'action=api.post_comment&which='+which+'&postid='+postid+'&comment='+fieldObj.value,onComplete:function(response)
{var comment=document.createElement('li');var comment_photo=document.createElement('div');comment_photo.className='photo';var comment_photo_img=document.createElement('img');comment_photo_img.setAttribute('src',response.user.photo);comment_photo.appendChild(comment_photo_img);comment.appendChild(comment_photo);var comment_user=document.createElement('div');comment_user.className='user';var comment_user_link=document.createElement('a');comment_user_link.setAttribute('href',response.user.profile);comment_user_link.setAttribute('target','_blank');comment_user_link.innerHTML=response.user.name;comment_user.appendChild(comment_user_link);comment.appendChild(comment_user);var comment_time=document.createElement('div');comment_time.className='time';comment_time.innerHTML=response.comment.time;comment.appendChild(comment_time);var comment_text=document.createElement('div');comment_text.className='text';comment_text.innerHTML=response.comment.text;comment.appendChild(comment_text);var comment_clear=document.createElement('div');comment_clear.className='clear';comment.appendChild(comment_clear);$('cl_'+postid).appendChild(comment);fieldObj.value='Write another comment...';fieldObj.disabled=false;buttonObj.disabled=false;fieldObj.select();}});},load_comments:function(which,postid)
{new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=api.load_comments&which='+which+'&postid='+postid,onComplete:function(response)
{$('cl_'+postid).innerHTML='';for(var i=0;i<response.comments.length;i++)
{var comment=document.createElement('li');var comment_photo=document.createElement('div');comment_photo.className='photo';var comment_photo_img=document.createElement('img');comment_photo_img.setAttribute('src',response.comments[i].user.photo);comment_photo.appendChild(comment_photo_img);comment.appendChild(comment_photo);var comment_user=document.createElement('div');comment_user.className='user';var comment_user_link=document.createElement('a');comment_user_link.setAttribute('href',response.comments[i].user.profile);comment_user_link.setAttribute('target','_blank');comment_user_link.innerHTML=response.comments[i].user.name;comment_user.appendChild(comment_user_link);comment.appendChild(comment_user);var comment_time=document.createElement('div');comment_time.className='time';comment_time.innerHTML=response.comments[i].time;comment.appendChild(comment_time);var comment_text=document.createElement('div');comment_text.className='text';comment_text.innerHTML=response.comments[i].text;comment.appendChild(comment_text);var comment_clear=document.createElement('div');comment_clear.className='clear';comment.appendChild(comment_clear);$('cl_'+postid).appendChild(comment);}}});}});var api=new class_api();
var icontip=Class.create({initialize:function(text,element)
{var tipstr=text.toLocaleLowerCase().replace(' ','_');if($('tip_'+tipstr))return;var tip=document.createElement('div');tip.setAttribute('id','tip_'+tipstr);tip.className='icontip';tip.style.display='none';var row=document.createElement('div');row.className='row';var row_left=document.createElement('div');row_left.className='left';row.appendChild(row_left);var middle=document.createElement('div');middle.className='text';middle.innerHTML=text;row.appendChild(middle);var row_right=document.createElement('div');row_right.className='right';row.appendChild(row_right);tip.appendChild(row);var arrow=document.createElement('div');arrow.className='arrow';tip.appendChild(arrow);document.getElementsByTagName('body')[0].insertBefore(tip,document.getElementsByTagName('body')[0].firstChild);tip.clonePosition(element,{setWidth:false,setHeight:false});tip.style.left=tip.style.left.replace('px','')-(tip.getWidth()/4)+'px';var overtip=false;tip.observe('mouseover',function()
{overtip=true;});tip.observe('mouseout',function()
{overtip=false;});element.observe('mouseout',function()
{if(overtip)return;new Effect.Move(tip,{duration:0.8,x:0,y:15,mode:'relative'});new Effect.Fade(tip,{duration:0.8,afterFinish:function(){if($('tip_'+tipstr)===false)return;document.getElementsByTagName('body')[0].removeChild(tip);}});});new Effect.Move(tip,{duration:0.8,x:0,y:-15,mode:'relative'});new Effect.Appear(tip,{duration:0.8});}});
var Animation=Class.create({initialize:function(element,frames,height,speed,hide_on_stop)
{this._element=(typeof element=='string')?$(element):element;this._frames=frames;this._height=height;this._hide_on_stop=hide_on_stop;this._speed=(speed)?speed:0.1;this._count=0;this._interval=null;this._count=0;},start:function()
{if(this._interval)return;this._interval=setInterval(this.update_position.bind(this),this._speed);this._element.style.display='block';},stop:function()
{clearInterval(this._interval);this._interval=null;if(this._hide_on_stop)this._element.style.display='none';},update_position:function()
{this._element.style.backgroundPosition='0 -'+(this._height*this._count)+'px';if(this._count==this._frames)
{this._count=0;return;}
this._count++;}});
var start_time=Math.round(new Date().getTime()/1000);var add_inc=0;update_content=function()
{new Ajax.Request(dir+'/scripts/php/actions.php',{method:'post',parameters:'action=home.update_content&since='+start_time,onComplete:function(response)
{start_time=Math.round(new Date().getTime()/1000);for(var i=0;i<response.feeds.length;i++)
{var li=document.createElement('li');li.style.display='none';li.innerHTML=response.feeds[i].template;$('feed').insertBefore(li,$('feed').firstChild);Effect.Appear(li);Effect.DropOut($('feed').childNodes[$('feed').childNodes.length-2],{afterFinish:function(){$('feed').removeChild($('feed').childNodes[$('feed').childNodes.length-2]);$('feed').childNodes[$('feed').childNodes.length-3].className='fade0';$('feed').childNodes[$('feed').childNodes.length-5].className='fade1';$('feed').childNodes[$('feed').childNodes.length-7].className='fade2';}});}
for(var i=0;i<response.photos.length;i++)
{var li=document.createElement('li');var link=document.createElement('a');link.setAttribute('href','');link.style.backgroundImage='url()';li.appendChild(link);$('latest_photos').insertBefore(li,$('latest_photos').firstChild);}
for(var i=0;i<response.users.length;i++)
{var li=document.createElement('li');var link=document.createElement('a');link.setAttribute('href','');link.style.backgroundImage='url()';li.appendChild(link);$('latest_users').insertBefore(li,$('latest_users').firstChild);}
add_inc++;}});}
var hj;var hj2;preview_right=function()
{if(hj.id==hj.f.length)
{hj.moveP2(1);return;}
hj.moveP2(hj.id+1);}
preview_left=function()
{if(hj.id==1)
{hj.moveP2(hj.f.length);return;}
hj.moveP2(hj.id-1);}
feature_navigate=function(which)
{hj2.moveP2(which);}
feature_navigate_back=function()
{if(hj2.id==1)
{hj2.moveP2(hj2.f.length);return;}
hj2.moveP2(hj2.id-1);}
feature_navigate_forward=function()
{if(hj2.id==hj2.f.length)
{hj2.moveP2(1);return;}
hj2.moveP2(hj2.id+1);}
document.observe('dom:loaded',function()
{hj=new Horinaja('preview',0.6,5,false);hj2=new Horinaja('features',0.6,10,false);Element.cleanWhitespace('feature_nav');});
Object.extend(Event,{wheel:function(event){var delta=0;if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera)delta=-delta;}else if(event.detail){delta=-event.detail/3;}
if(navigator.userAgent.indexOf('Mac')!=-1)delta=-delta;return Math.round(delta);}});var Horinaja=Class.create();Horinaja.prototype={initialize:function(capture,duree,secExecution,pagination){this.capture=capture;this.duree=duree;this.secExecution=secExecution;this.pagination=pagination;this.nCell=0;this.id=1;this.po=0;this.f=$$('div#'+this.capture+' ul li');this.px=$(this.capture).getWidth();this.pxH=$(this.capture).getHeight();this.start();},start:function(){this.mover=$(this.capture).firstDescendant();this.nCell=this.f.length;for(i=0;i!=this.nCell;i++){this.f[i].setStyle({width:this.px+'px',height:(this.pxH-40)+'px',float:'left'});}
$(this.capture).setStyle({overflow:'hidden'});$(this.capture).firstDescendant().setStyle({width:(this.px*this.nCell)+'px'});if(this.pagination){$(this.capture).insert({bottom:'<ol class="horinaja_pagination"></ol>'});this.olPagination=$(this.capture).firstDescendant().next();$(this.olPagination).setStyle({width:this.px+'px'});this.wb=Math.floor(this.px/this.f.length);for(i=1;i!=(this.f.length+1);i++){$(this.olPagination).insert({bottom:'<li><a style="width:'+this.wb+'px;">'+i+'</a></li>'});if(i!=this.id){$(this.olPagination).childElements()[i-1].setStyle({opacity:0.2});}}
$(this.olPagination).childElements()[0].setStyle({opacity:1});this.startOC();}
this.startPe();Event.observe($(this.capture),"mouseout",this.startPe.bind(this));Event.observe($(this.capture),"mouseover",this.stopPe.bind(this));},startOC:function(){Event.observe($(this.olPagination),"click",this.moveP.bind(this));},startPe:function(){},stopPe:function(){},effaceP:function(mop){this.mop=mop;if(this.pagination)
new Effect.Fade($(this.olPagination).childElements()[this.mop-1],{duration:0.3,to:0.2})},move:function(xp){this.xp=xp;new Effect.Move(this.mover,{x:this.xp,y:0,mode:'absolute',duration:this.duree,transition:Effect.Transitions.sinoidal});if(this.capture=='features'){for(var i=0;i<$('feature_nav').childNodes.length;i++){var class_split=$('feature_nav').childNodes[i].className.split(' ');var new_class=[];for(var j=0;j<class_split.length;j++){if(class_split[j]!='current'){new_class[new_class.length]=class_split[j];}}
$('feature_nav').childNodes[i].className=new_class.join(' ');}
$('feature_nav').childNodes[this.id-1].className+=' current';}
if(this.pagination){new Effect.Appear($(this.olPagination).childElements()[this.id-1],{duration:0.3,to:1})}},Pe:function(){if(this.id<this.nCell){this.po=this.po-this.px;this.effaceP(this.id);this.id=this.id+1;this.move(this.po);}else{this.po=0;this.effaceP(this.id);this.id=1;this.move(this.po);}},moveP:function(evt){var child=Event.element(evt);this.occ=parseInt(child.innerHTML);if(this.id>this.occ){this.diff=this.id-this.occ;this.po=this.po+(this.px*this.diff);this.effaceP(this.id);this.id=this.occ;this.move(this.po);}else if(this.id<this.occ){this.diff=this.occ-this.id;this.po=this.po-(this.px*this.diff);this.effaceP(this.id);this.id=this.occ;this.move(this.po);}},moveP2:function(p){this.occ=p;if(this.id>this.occ){this.diff=this.id-this.occ;this.po=this.po+(this.px*this.diff);this.effaceP(this.id);this.id=this.occ;this.move(this.po);}else if(this.id<this.occ){this.diff=this.occ-this.id;this.po=this.po-(this.px*this.diff);this.effaceP(this.id);this.id=this.occ;this.move(this.po);}},stopEvent:function(pE)
{if(!pE)
if(window.event)
pE=window.event;else
return;if(pE.cancelBubble!=null)
pE.cancelBubble=true;if(pE.stopPropagation)
pE.stopPropagation();if(pE.preventDefault)
pE.preventDefault();},wheelwheel:function(e){this.event=e;this.stopPe();this.stopEvent(e);if(Event.wheel(this.event)<0){if(this.id<this.nCell){this.po=this.po-this.px;this.effaceP(this.id);this.id=this.id+1;this.move(this.po);}}else{if(this.id!=1){this.po=this.po+this.px;this.effaceP(this.id);this.id=this.id-1;this.move(this.po);}}}};
var Tooltip=Class.create({initialize:function(element,content,options)
{element=$(element);if(options==undefined)options={direction:'top'};var box=document.createElement('div');box.setAttribute('id','tooltip_'+element.getAttribute('id'));box.className='tooltip';box.style.position='absolute';var box_arrow=document.createElement('div');box_arrow.className='arrow '+options.direction;box.appendChild(box_arrow);var box_close=document.createElement('a');box_close.className='close';box_close.setAttribute('href','#');box_close.setAttribute('onclick','return false;');box_close.onmouseup=function()
{data.set('tooltip_mark.'+this.parentNode.getAttribute('id').replace('tooltip_',''),true);new Effect.Fade(this.parentNode);}
box.appendChild(box_close);var box_content=document.createElement('span');box_content.innerHTML=content;box.appendChild(box_content);switch(options.direction)
{case'top':box.style.top=(element.offsetTop+element.offsetHeight+21)+'px';box.style.left=(element.offsetLeft-(element.offsetWidth/4))+'px';break;case'left':break;case'right':break;case'bottom':break;}
document.getElementsByTagName('body')[0].appendChild(box);},});