var mootabs=new Class({options:{width:"300px",height:"200px",changeTransition:"none",duration:1000,mouseOverClass:"active",activateOnLoad:"first",useAjax:false,ajaxUrl:"",ajaxOptions:{method:"get"},ajaxLoadingText:"Loading..."},initialize:function(element,options){this.setOptions(options);this.el=$(element);this.elid=element;if(this.options.changeTransition!="none"){this.el.setStyles({height:this.options.height,width:this.options.width})}this.titles=$$("#"+this.elid+" ul.mootabs_title li");this.panelHeight=this.el.getSize().y-(this.titles[0].getSize().y+4);this.panels=$$("#"+this.elid+" .mootabs_panel");if(this.options.changeTransition!="none"){this.panels.setStyle("height",this.panelHeight)}this.titles.each(function(item){item.addEvent("click",function(){item.removeClass(this.options.mouseOverClass);this.activate(item)}.bind(this));item.addEvent("mouseover",function(){if(item!=this.activeTitle){item.addClass(this.options.mouseOverClass)}}.bind(this));item.addEvent("mouseout",function(){if(item!=this.activeTitle){item.removeClass(this.options.mouseOverClass)}}.bind(this))}.bind(this));if(this.options.activateOnLoad!="none"){if(this.options.activateOnLoad!="first"){this.activate(this.options.activateOnLoad,true)}else{this.activate(this.titles[0],true)}}},activate:function(tab,skipAnim){if(!$defined(skipAnim)){skipAnim=false}if($type(tab)=="string"){myTab=$$("#"+this.elid+" ul li").filter("[title="+tab+"]")[0];tab=myTab}if($type(tab)=="element"){var newTab=tab.getProperty("title");this.panels.removeClass("active");this.activePanel=this.panels.filter("#"+newTab)[0];this.activePanel.addClass("active");if(this.options.changeTransition!="none"&&skipAnim==false){this.panels.filterById(newTab).setStyle("height",0);var changeEffect=new Fx.Elements(this.panels.filterById(newTab),{duration:this.options.duration,transition:this.options.changeTransition});changeEffect.start({"0":{height:[0,this.panelHeight]}})}this.titles.removeClass("active");tab.addClass("active");this.activeTitle=tab;if(this.options.useAjax){this._getContent()}}},_getContent:function(){this.activePanel.setHTML(this.options.ajaxLoadingText);var newOptions={update:this.activePanel.getProperty("id")};this.options.ajaxOptions=Object.extend(this.options.ajaxOptions,newOptions||{});var tabRequest=new Ajax(this.options.ajaxUrl+"?tab="+this.activeTitle.getProperty("title"),this.options.ajaxOptions);tabRequest.request()},addTab:function(title,label,content){var newTitle=new Element("li",{title:title});newTitle.appendText(label);this.titles.include(newTitle);$$("#"+this.elid+" ul").adopt(newTitle);newTitle.addEvent("click",function(){this.activate(newTitle)}.bind(this));newTitle.addEvent("mouseover",function(){if(newTitle!=this.activeTitle){newTitle.addClass(this.options.mouseOverClass)}}.bind(this));newTitle.addEvent("mouseout",function(){if(newTitle!=this.activeTitle){newTitle.removeClass(this.options.mouseOverClass)}}.bind(this));var newPanel=new Element("div",{style:{height:this.options.panelHeight},id:title,"class":"mootabs_panel"});if(!this.options.useAjax){newPanel.setHTML(content)}this.panels.include(newPanel);this.el.adopt(newPanel)},removeTab:function(title){if(this.activeTitle.title==title){this.activate(this.titles[0])}$$("#"+this.elid+" ul li").filter("[title="+title+"]")[0].remove();$$("#"+this.elid+" .mootabs_panel").filter("#"+title)[0].remove()},next:function(){var nextTab=this.activeTitle.getNext();if(!nextTab){nextTab=this.titles[0]}this.activate(nextTab)},previous:function(){var previousTab=this.activeTitle.getPrevious();if(!previousTab){previousTab=this.titles[this.titles.length-1]}this.activate(previousTab)}});mootabs.implement(new Options);var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version")}catch(e){}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version")}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version")}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0"}catch(e){}}if(!version){try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11"}catch(e){version=-1}}return version}function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4]}if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1)}else{if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"))}}}var flashVer=versionMajor+"."+versionMinor+"."+versionRevision}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){flashVer=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){flashVer=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){flashVer=2}else{if(isIE&&isWin&&!isOpera){flashVer=ControlVersion()}}}}}return flashVer}function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true}else{if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer)){return true}else{if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision)){return true}}}}}return false}}}Swiff=DetectFlashVer(8,0,0)==true?Swiff:function(){};function ToShare(site){var popUpUrl=getShareURL();var title=getShareHeadline();var description=getShareDescription();switch(site){case"newsvine":if(getShareKeywords()!=""){var keywords=getShareKeywords()}postPopUp("http://www.newsvine.com/_wine/save?ver=2&popoff=0&t="+keywords+"&e="+description+"&h="+title+"&u="+popUpUrl,"newsvine","toolbar=0,status=0,height=445,width=650,scrollbars=yes,resizable=yes");break;case"facebook":postPopUp("http://www.facebook.com/sharer.php?u="+popUpUrl+"&t="+title,"facebook","toolbar=0,status=0,height=436,width=646,scrollbars=yes,resizable=yes");break;case"digg":postPopUp("http://digg.com/submit?url="+popUpUrl+"&title="+title+"&bodytext="+description,"digg","toolbar=0,status=0,height=450,width=650,scrollbars=yes,resizable=yes");break;case"delicious":postPopUp("http://del.icio.us/post?v=4&noui&jump=close&url="+popUpUrl+"&title="+title+"&bodytext="+description,"delicious","toolbar=0,status=0,height=400,width=700,scrollbars=yes,resizable=no");break}}function postPopUp(url,name,params){var win=window.open(url,name,params)}function removeChildren(a){while(a.hasChildNodes()){a.removeChild(a.lastChild)}}function quickElement(){var obj=document.createElement(arguments[0]);if(arguments[2]!=""&&arguments[2]!=null){var textNode=document.createTextNode(arguments[2]);obj.appendChild(textNode)}var len=arguments.length;for(var i=3;i<len;i+=2){obj.setAttribute(arguments[i],arguments[i+1])}arguments[1].appendChild(obj);return obj}CalendarNamespace={monthsOfYear:"January February March April May June July August September October November December".split(" "),daysOfWeek:"S M T W T F S".split(" "),isLeapYear:function(year){return(((year%4)==0)&&((year%100)!=0)||((year%400)==0))},getDaysInMonth:function(month,year){var days;if(month==1||month==3||month==5||month==7||month==8||month==10||month==12){days=31}else{if(month==4||month==6||month==9||month==11){days=30}else{if(month==2&&CalendarNamespace.isLeapYear(year)){days=29}else{days=28}}}return days},draw:function(month,year,div_id,callback){month=parseInt(month);year=parseInt(year);var calDiv=document.getElementById(div_id);removeChildren(calDiv);var calTable=document.createElement("table");calTable.setAttribute("class","calendar");calTable.setAttribute("className","calendar");quickElement("caption",calTable,CalendarNamespace.monthsOfYear[month-1]+" "+year);var tableHead=quickElement("thead",calTable);var tableRow=quickElement("tr",tableHead);for(var i=0;i<7;i++){quickElement("th",tableRow,CalendarNamespace.daysOfWeek[i])}var tableBody=quickElement("tbody",calTable);var startingPos=new Date(year,month-1,1).getDay();var days=CalendarNamespace.getDaysInMonth(month,year);tableRow=quickElement("tr",tableBody);for(var i=0;i<startingPos;i++){quickElement("td",tableRow," ","bgcolor","#f3f3f3")}var currentDay=1;for(var i=startingPos;currentDay<=days;i++){if(i%7==0&&currentDay!=1){tableRow=quickElement("tr",tableBody)}var cell=quickElement("td",tableRow,"");quickElement("a",cell,currentDay,"href","javascript:void("+callback+"("+year+","+month+","+currentDay+"));");currentDay++}while(tableRow.childNodes.length<7){quickElement("td",tableRow," ","bgcolor","#f3f3f3")}calDiv.appendChild(calTable)}};function Calendar(div_id,callback){this.div_id=div_id;this.callback=callback;this.today=new Date();this.currentMonth=this.today.getMonth()+1;this.currentYear=this.today.getFullYear();this.drawCurrent=function(){CalendarNamespace.draw(this.currentMonth,this.currentYear,this.div_id,this.callback)};this.drawDate=function(month,year){this.currentMonth=month;this.currentYear=year;this.drawCurrent()};this.drawPreviousMonth=function(){if(this.currentMonth==1){this.currentMonth=12;this.currentYear--}else{this.currentMonth--}this.drawCurrent()};this.drawNextMonth=function(){if(this.currentMonth==12){this.currentMonth=1;this.currentYear++}else{this.currentMonth++}this.drawCurrent()};this.drawPreviousYear=function(){this.currentYear--;this.drawCurrent()};this.drawNextYear=function(){this.currentYear++;this.drawCurrent()}}var xmlhttp;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xmlhttp = false;
        }
    }
@else
    xmlhttp = false;
@end @*/
if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){xmlhttp=new XMLHttpRequest()}function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent}}else{if(obj.x){curleft+=obj.x}}return curleft}function findPosY(obj){var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent}}else{if(obj.y){curtop+=obj.y}}return curtop}Date.prototype.getCorrectYear=function(){var y=this.getYear()%100;return(y<38)?y+2000:y+1900};Date.prototype.getTwoDigitMonth=function(){return(this.getMonth()<9)?"0"+(this.getMonth()+1):(this.getMonth()+1)};Date.prototype.getTwoDigitDate=function(){return(this.getDate()<10)?"0"+this.getDate():this.getDate()};Date.prototype.getTwoDigitHour=function(){return(this.getHours()<10)?"0"+this.getHours():this.getHours()};Date.prototype.getTwoDigitMinute=function(){return(this.getMinutes()<10)?"0"+this.getMinutes():this.getMinutes()};Date.prototype.getISODate=function(){return this.getCorrectYear()+"-"+this.getTwoDigitMonth()+"-"+this.getTwoDigitDate()};Date.prototype.getHourMinute=function(){return this.getTwoDigitHour()+":"+this.getTwoDigitMinute()};String.prototype.pad_left=function(pad_length,pad_string){var new_string=this;for(var i=0;new_string.length<pad_length;i++){new_string=pad_string+new_string}return new_string};if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1)}if(id){this.setAttribute("id",id)}if(w){this.setAttribute("width",w)}if(h){this.setAttribute("height",h)}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(c){this.addParam("bgcolor",c)}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9)}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true)},setAttribute:function(_e,_f){this.attributes[_e]=_f},getAttribute:function(_10){return this.attributes[_10]},addParam:function(_11,_12){this.params[_11]=_12},getParams:function(){return this.params},addVariable:function(_13,_14){this.variables[_13]=_14},getVariable:function(_15){return this.variables[_15]},getVariables:function(){return this.variables},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key]}return _16},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}_19='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';_19+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var _1a=this.getParams();for(var key in _1a){_19+=[key]+'="'+_1a[key]+'" '}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+='flashvars="'+_1c+'"'}_19+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}_19='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';_19+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var _1d=this.getParams();for(var key in _1d){_19+='<param name="'+key+'" value="'+_1d[key]+'" />'}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+='<param name="flashvars" value="'+_1f+'" />'}_19+="</object>"}return _19},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0])}catch(e){axo=null}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(_23.major==6){return _23}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}}return _23};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}if(this.major>fv.major){return true}if(this.minor<fv.minor){return false}if(this.minor>fv.minor){return true}if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;if(typeof com=="undefined"){var com={}}if(typeof com.asual=="undefined"){com.asual={}}if(typeof com.asual.util=="undefined"){com.asual.util={}}com.asual.util.Browser=new function(){var _version=-1;var _agent=navigator.userAgent;var _ie=false,_camino=false,_safari=false,_opera=false,_firefox=false,_netscape=false,_mozilla=false;var _getVersion=function(s,i){return parseFloat(_agent.substr(_agent.indexOf(s)+i))};if(_ie=/MSIE/.test(_agent)){_version=_getVersion("MSIE",4)}if(_safari=/AppleWebKit/.test(_agent)){_version=_getVersion("Safari",7)}if(_opera=/Opera/.test(_agent)){_version=parseFloat(navigator.appVersion)}if(_camino=/Camino/.test(_agent)){_version=_getVersion("Camino",7)}if(_firefox=/Firefox/.test(_agent)){_version=_getVersion("Firefox",8)}if(_netscape=/Netscape/.test(_agent)){_version=_getVersion("Netscape",9)}if(_mozilla=/Mozilla/.test(_agent)&&/rv:/.test(_agent)){_version=_getVersion("rv:",3)}this.getVersion=function(){return _version};this.isIE=function(){return _ie};this.isSafari=function(){return _safari};this.isOpera=function(){return _opera};this.isCamino=function(){return _camino};this.isFirefox=function(){return _firefox};this.isNetscape=function(){return _netscape};this.isMozilla=function(){return _mozilla}};com.asual.util.Events=new function(){var _cache=[];var _browser=com.asual.util.Browser;var _dcl="DOMContentLoaded";if(_browser.isIE()||_browser.isSafari()){(function(){try{if(_browser.isIE()||!/loaded|complete/.test(document.readyState)){document.documentElement.doScroll("left")}}catch(e){return setTimeout(arguments.callee,0)}for(var i=0,e;e=_cache[i];i++){if(e.t==_dcl){e.l.call(null)}}})()}this.addListener=function(obj,type,listener){_cache.push({o:obj,t:type,l:listener});if(!(type==_dcl&&(_browser.isIE()||_browser.isSafari()))){if(obj.addEventListener){obj.addEventListener(type,listener,false)}else{if(obj.attachEvent){obj.attachEvent("on"+type,listener)}}}};this.removeListener=function(obj,type,listener){for(var i=0,e;e=_cache[i];i++){if(e.o==obj&&e.t==type&&e.l==listener){_cache.splice(i,1);break}}if(!(type==_dcl&&(_browser.isIE()||_browser.isSafari()))){if(obj.removeEventListener){obj.removeEventListener(type,listener,false)}else{if(obj.detachEvent){obj.detachEvent("on"+type,listener)}}}};var _unload=function(){for(var i=0,evt;evt=_cache[i];i++){if(evt.t!=_dcl){com.asual.util.Events.removeListener(evt.o,evt.t,evt.l)}}};this.addListener(window,"unload",_unload)};SWFAddressEvent=function(type){this.toString=function(){return"[object SWFAddressEvent]"};this.type=type;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.pathNames=SWFAddress.getPathNames();this.parameters={};var _parametersNames=SWFAddress.getParameterNames();for(var i=0,l=_parametersNames.length;i<l;i++){this.parameters[_parametersNames[i]]=SWFAddress.getParameter(_parametersNames[i])}this.parametersNames=_parametersNames};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";SWFAddress=new function(){var _browser=com.asual.util.Browser;var _events=com.asual.util.Events;var _version=_browser.getVersion();var _supported=false;if(_browser.isIE()){_supported=_version>=6}if(_browser.isSafari()){_supported=_version>=312}if(_browser.isOpera()){_supported=_version>=9.02}if(_browser.isCamino()){_supported=_version>=1}if(_browser.isFirefox()){_supported=_version>=1}if(_browser.isNetscape()){_supported=_version>=8}if(_browser.isMozilla()){_supported=_version>=1.8}var _t=top;var _d=_t.document;var _h=_t.history;var _l=_t.location;var _st=setTimeout;var FUNCTION="function";var UNDEFINED="undefined";var SWFADDRESS="swfaddress";var _iframe,_form,_url;var _title=_d.title;var _length=_h.length;var _silent=false;var _listeners={};var _stack=[];var _ids=[];var _opts={};_opts.history=true;_opts.html=false;_opts.strict=true;_opts.tracker="_trackDefault";if((!_supported&&_l.href.indexOf("#")!=-1)||(_browser.isSafari()&&_version<412&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}var _getHash=function(){var index=_l.href.indexOf("#");if(index!=-1){var hash=unescape(_l.href.substr(index+1));if(/^[a-z0-9 ,=_&\-\.\?\+\/]*$/i.test(hash)){return hash}else{_l.replace(_l.href.substr(0,index))}}return""};var _value=_getHash();var _strictCheck=function(value,force){if(_opts.strict){value=force?(value.substr(0,1)!="/"?"/"+value:value):(value==""?"/":value)}return value};var _ieLocal=function(value){return(_browser.isIE()&&_l.protocol=="file:")?_value.replace(/\?/,"%3F"):value};var _searchScript=function(el){if(el.src&&/swfaddress\.js(\?.*)?$/.test(el.src)){return el}for(var i=0,l=el.childNodes.length,s;i<l;i++){if(s=_searchScript(el.childNodes[i])){return s}}};var _titleCheck=function(){if(_browser.isIE()&&_d.title!=_title){SWFAddress.setTitle(_title)}};var _listen=function(){if(!_silent){var hash=_getHash();if(_browser.isIE()){if(_value!=hash){if(_version<7){_l.reload()}else{SWFAddress.setValue(hash)}}}else{if(_browser.isSafari()&&_version<523){if(_length!=_h.length){_length=_h.length;if(typeof _stack[_length-1]!=UNDEFINED){_value=_stack[_length-1]}_update()}}else{if(_value!=hash){_value=hash;_update()}}}_titleCheck()}};var _jsDispatch=function(type){if(SWFAddress.hasEventListener(type)){SWFAddress.dispatchEvent(new SWFAddressEvent(type))}type=type.substr(0,1).toUpperCase()+type.substr(1);if(typeof SWFAddress["on"+type]==FUNCTION){SWFAddress["on"+type]()}};var _jsInit=function(){_jsDispatch("init")};var _jsChange=function(){_jsDispatch("change")};var _swfChange=function(){for(var i=0,id,value=SWFAddress.getValue(),setter="setSWFAddressValue";id=_ids[i];i++){var obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=UNDEFINED){obj.parentNode.so.call(setter,value)}else{if(!(obj&&typeof obj[setter]!=UNDEFINED)){var objects=obj.getElementsByTagName("object");var embeds=obj.getElementsByTagName("embed");obj=((objects[0]&&typeof objects[0][setter]!=UNDEFINED)?objects:((embeds[0]&&typeof embeds[0][setter]!=UNDEFINED)?embeds[0]:null))}if(obj){obj[setter](value)}}}else{if(obj=document[id]){if(typeof obj[setter]!=UNDEFINED){obj[setter](value)}}}}};var _update=function(){_swfChange();_jsChange();_st(_track,10)};var _trackDefault=function(value){if(typeof urchinTracker==FUNCTION){urchinTracker(value)}if(typeof pageTracker!=UNDEFINED&&typeof pageTracker._trackPageview==FUNCTION){pageTracker._trackPageview(value)}};eval("var _trackDefault = "+_trackDefault+";");var _track=function(){if(typeof _opts.tracker!=UNDEFINED&&eval("typeof "+_opts.tracker+' != "'+UNDEFINED+'"')){var fn=eval(_opts.tracker);if(typeof fn==FUNCTION){fn((_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+SWFAddress.getValue()).replace(/\/\//,"/").replace(/^\/$/,""))}}};var _htmlWrite=function(){var doc=_iframe.contentWindow.document;doc.open();doc.write("<script>var "+SWFADDRESS+' = "'+_getHash()+'";<\/script>');doc.close()};var _htmlLoad=function(){var win=_iframe.contentWindow;if(_opts.html){var src=win.location.href;_value=(src.indexOf("?")>-1)?src.substr(src.indexOf("?")+1):""}else{_value=(typeof win[SWFADDRESS]!=UNDEFINED)?win[SWFADDRESS]:""}win.document.title=_d.title;if(_value!=_getHash()){_update();_l.hash=_ieLocal(_value)}};var _load=function(){var attr='id="'+SWFADDRESS+'" style="position:absolute;top:-9999px;"';if(_browser.isIE()){document.body.appendChild(document.createElement("div")).innerHTML="<iframe "+attr+' src="'+(_opts.html?_url.replace(/\.js(\?.*)?$/,".html")+"?"+_getHash():"javascript:false;")+'" width="0" height="0"></iframe>';_iframe=document.getElementById(SWFADDRESS);_st(function(){_events.addListener(_iframe,"load",_htmlLoad);if(!_opts.html&&typeof _iframe.contentWindow[SWFADDRESS]==UNDEFINED){_htmlWrite()}},10)}else{if(_browser.isSafari()){if(_version<412){document.body.innerHTML+="<form "+attr+' method="get"></form>';_form=document.getElementById(SWFADDRESS)}if(typeof _l[SWFADDRESS]==UNDEFINED){_l[SWFADDRESS]={}}if(typeof _l[SWFADDRESS][_l.pathname]!=UNDEFINED){_stack=_l[SWFADDRESS][_l.pathname].split(",")}}else{if(_browser.isOpera()&&_ids.length==0&&typeof navigator.plugins["Shockwave Flash"]=="object"){document.body.innerHTML+="<embed "+attr+' src="'+_url.replace(/\.js(\?.*)?$/,".swf")+'" type="application/x-shockwave-flash" />'}}}_st(_jsInit,1);_st(_jsChange,2);_st(_track,10);setInterval(_listen,50)};this.onInit=null;this.onChange=null;this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.go=function(delta){_h.go(delta)};this.href=function(url,target){target=(typeof target!=UNDEFINED)?target:"_self";if(target=="_self"){self.location.href=url}if(target=="_top"){_l.href=url}if(target=="_blank"){window.open(url)}else{_t.frames[target].location.href=url}};this.popup=function(url,name,options,handler){var popup=window.open(url,name,eval(options));eval(handler)};this.addEventListener=function(type,listener){if(typeof _listeners[type]==UNDEFINED){_listeners[type]=[]}_listeners[type].push(listener)};this.removeEventListener=function(type,listener){if(typeof _listeners[type]!=UNDEFINED){for(var i=0,l;l=_listeners[type][i];i++){if(l==listener){break}}_listeners[type].splice(i,1)}};this.dispatchEvent=function(event){if(typeof _listeners[event.type]!=UNDEFINED&&_listeners[event.type].length){event.target=this;for(var i=0,l;l=_listeners[event.type][i];i++){l(event)}return true}return false};this.hasEventListener=function(type){return(typeof _listeners[type]!=UNDEFINED&&_listeners[type].length>0)};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"))}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1)}return url};this.getStrict=function(){return _opts.strict};this.setStrict=function(strict){_opts.strict=strict};this.getHistory=function(){return _opts.history};this.setHistory=function(history){_opts.history=history};this.getTracker=function(){return _opts.tracker};this.setTracker=function(tracker){_opts.tracker=tracker};this.getIds=function(){return _ids};this.getId=function(index){return _ids[0]};this.setId=function(id){_ids[0]=id};this.addId=function(id){this.removeId(id);_ids.push(id)};this.removeId=function(id){for(var i=0;i<_ids.length;i++){if(id==_ids[i]){_ids.splice(i,1);break}}};this.getTitle=function(){return _d.title};this.setTitle=function(title){if(!_supported){return null}if(typeof title==UNDEFINED){return}if(title=="null"){title=""}_title=_d.title=title;_st(function(){if(_iframe&&_iframe.contentWindow&&_iframe.contentWindow.document&&_iframe.contentWindow.title){_iframe.contentWindow.document.title=_title}},1000)};this.getStatus=function(){return _t.status};this.setStatus=function(status){if(!_supported){return null}if(typeof status==UNDEFINED){return}if(!_browser.isSafari()){status=_strictCheck((status!="null")?status:"",true);if(status=="/"){status=""}if(!(/http(s)?:\/\//.test(status))){var index=_l.href.indexOf("#");status=(index==-1?_l.href:_l.href.substr(0,index))+"#"+status}_t.status=status}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_supported){return null}return _strictCheck(_value,false)};this.setValue=function(value){if(!_supported){return null}if(typeof value==UNDEFINED){return}if(value=="null"){value=""}value=_strictCheck(value,true);if(value=="/"){value=""}if(_value==value){return}_value=value;_silent=true;_update();_stack[_h.length]=_value;if(_browser.isSafari()){if(_opts.history){_l[SWFADDRESS][_l.pathname]=_stack.toString();_length=_h.length+1;if(_version<412){if(_l.search==""){_form.action="#"+_value;_form.submit()}}else{if(_version<523){var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);var anchor=document.createElement("a");anchor.href="#"+_value;anchor.dispatchEvent(evt)}else{_l.hash="#"+_value}}}else{_l.replace("#"+_value)}}else{if(_value!=_getHash()){if(_opts.history){_l.hash="#"+_ieLocal(_value)}else{_l.replace("#"+_value)}}}if(_browser.isIE()&&_opts.history){if(_opts.html){var loc=_iframe.contentWindow.location;loc.assign(loc.pathname+"?"+_getHash())}else{_htmlWrite()}}if(_browser.isSafari()){_st(function(){_silent=false},1)}else{_silent=false}};this.getPath=function(){var value=this.getValue();return(value.indexOf("?")!=-1)?value.split("?")[0]:value};this.getPathNames=function(){var path=SWFAddress.getPath();var names=path.split("/");if(path.substr(0,1)=="/"){names.splice(0,1)}if(path.substr(path.length-1,1)=="/"){names.splice(names.length-1,1)}return names};this.getQueryString=function(){var value=this.getValue();var index=value.indexOf("?");return(index!=-1&&index<value.length)?value.substr(index+1):""};this.getParameter=function(param){var value=this.getValue();var index=value.indexOf("?");if(index!=-1){value=value.substr(index+1);var params=value.split("&");var p,i=params.length;while(i--){p=params[i].split("=");if(p[0]==param){return p[1]}}}return""};this.getParameterNames=function(){var value=this.getValue();var index=value.indexOf("?");var names=[];if(index!=-1){value=value.substr(index+1);if(value!=""&&value.indexOf("=")!=-1){var params=value.split("&");var i=0;while(i<params.length){names.push(params[i].split("=")[0]);i++}}}return names};if(_supported){for(var i=1;i<_length;i++){_stack.push("")}_stack.push(_getHash());if(_browser.isIE()&&_l.hash!=_getHash()){_l.hash="#"+_ieLocal(_getHash())}try{_url=String(_searchScript(document).src);var qi=_url.indexOf("?");if(_url&&qi>-1){var param,params=_url.substr(qi+1).split("&");for(var i=0,p;p=params[i];i++){param=p.split("=");if(/^(history|html|strict)$/.test(param[0])){_opts[param[0]]=(isNaN(param[1])?eval(param[1]):(parseFloat(param[1])>0))}if(/^tracker$/.test(param[0])){_opts[param[0]]=param[1]}}}}catch(e){}if(/file:\/\//.test(_l.href)){_opts.html=false}_titleCheck();_events.addListener(document,"DOMContentLoaded",_load)}else{_track()}};new function(){var _func,_args;var UNDEFINED="undefined";if(typeof swfobject!=UNDEFINED){SWFObject=swfobject}if(typeof FlashObject!=UNDEFINED){SWFObject=FlashObject}if(typeof SWFObject!=UNDEFINED){if(SWFObject.prototype&&SWFObject.prototype.write){_func=SWFObject.prototype.write;SWFObject.prototype.write=function(){_args=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _args[0]=="string")?document.getElementById(_args[0]):_args[0]).so=this}var success;if(success=_func.apply(this,_args)){SWFAddress.addId(this.getAttribute("id"))}return success}}else{_func=SWFObject.registerObject;SWFObject.registerObject=function(){_args=arguments;_func.apply(this,_args);SWFAddress.addId(_args[0])};_func=SWFObject.createSWF;SWFObject.createSWF=function(){_args=arguments;_func.apply(this,_args);SWFAddress.addId(_args[0].id)};_func=SWFObject.embedSWF;SWFObject.embedSWF=function(){_args=arguments;_func.apply(this,_args);SWFAddress.addId(_args[8].id)}}}if(typeof UFO!=UNDEFINED){_func=UFO.create;UFO.create=function(){_args=arguments;_func.apply(this,_args);SWFAddress.addId(_args[0].id)}}if(typeof AC_FL_RunContent!=UNDEFINED){_func=AC_FL_RunContent;AC_FL_RunContent=function(){_args=arguments;_func.apply(this,_args);for(var i=0,l=_args.length;i<l;i++){if(_args[i]=="id"){SWFAddress.addId(_args[i+1])}}}}};function printPage(){window.print()}var NewsLetters=new Class({Implements:[Options],options:{withinSets:[],loadingId:"et_loading",contentId:"et_ajax_content",formId:"et_subscribe_form",template:"exacttarget/subscription_wizard",newsletterUrl:"/newsletters/subscribe/ajax/"},initialize:function(options){this.setOptions(options);this.getNewsLetterRequest().get()},getNewsLetterUrl:function(){var url=this.options.newsletterUrl;if(this.options.withinSets.length>0){url+="?within_sets=";for(var i=0;i<this.options.withinSets.length;i++){if(i>0){url+=","}url+=this.options.withinSets[i]}}url+="&template="+this.options.template;url+="&m="+new Date().getTime();return url},getNewsLetterRequest:function(){var req=new Request.HTML({url:this.getNewsLetterUrl(),evalScripts:false,evalResponse:false,onRequest:this.setLoadingIcon.bind(this),onSuccess:function(responseTree,responseElements,responseHTML,responseJavaScript){$(this.options.loadingId).set("text","");$(this.options.contentId).set("html","");$(this.options.contentId).set("html",responseHTML);$exec(responseJavaScript);if($(this.options.formId)){this.addFormSubmitEvent()}}.bind(this)});return req},setLoadingIcon:function(){var img='<img src="'+this.options.loadingImg+'" alt="loading" />';$(this.options.loadingId).set("html",img)},addFormSubmitEvent:function(){$(this.options.formId).addEvent("submit",function(e){e.stop();this.getNewsLetterRequest().post($(this.options.formId))}.bind(this))}});var serveAds=true;function displayAd(strPos){if(serveAds){var adSite="gmg.lasvegassun";var adOrd=Math.random()*10000000000000000;var adStartStr='<script language="JavaScript" src="http://ad.doubleclick.net/adj/';if(typeof lvSunAdTag=="undefined"){strAdTag="news/story"}else{strAdTag=lvSunAdTag}switch(strPos){case"Leaderboard":ad1=SetupAdDiv(728,90,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=1;sz=728x90;ord="+adOrd+"?","/adpage/");break;case"BigBlock":ad2=SetupAdDiv(300,250,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=3;sz=300x250;ord="+adOrd+"?","/adpage/");break;case"BigBlockTwo":ad4=SetupAdDiv(300,250,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=7;sz=300x250;ord="+adOrd+"?","/adpage/");break;case"BigTower":ad6=SetupAdDiv(300,600,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=7;sz=300x600;ord="+adOrd+"?","/adpage/");break;case"Skyscraper":ad3=SetupAdDiv(160,600,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=4;sz=160x600;ord="+adOrd+"?","/adpage/");break;case"SmallBlock":ad5=SetupAdDiv(180,150,"http://ad.doubleclick.net/adj/"+adSite+"/"+strAdTag+";tile=1;sz=180x150;ord="+adOrd+"?","/adpage/");break;case"SmallBlockTwo":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/"+strAdTag+";tile=2;sz=180x150;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"SmallBlockThree":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/"+strAdTag+";tile=3;sz=180x150;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"SmallBlockFour":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/"+strAdTag+";tile=4;sz=180x150;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"SlidingBillboard":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/"+strAdTag+";tile=2;sz=818x662;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"Calendar":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/;sponsor=calendar;tile=6;sz=300x100;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"RestaurantSearch":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/restaurant_searchfeature;sponsor=calendar;tile=6;sz=322x60;ord="+adOrd+'?" type="text/javascript"><\/script>');break;case"ContestPromo":document.write('<script language="JavaScript" src="http://ad.doubleclick.net/adj/'+adSite+"/"+strAdTag+";sz=209x174;ord="+adOrd+'?" type="text/javascript"><\/script>');break}}}var useImages=false;var IE=(navigator.appName=="Microsoft Internet Explorer");function adsRMIFOnL(win,doc){var adFrame=win.frameElement;var div=adFrame.parentNode;if(div.childNodes.length==1){var adSpan=doc.getElementById("adSpan");var adDiv=doc.getElementById("adDiv");if(adSpan){var w=adSpan.offsetWidth;if(IE){var h=adSpan.offsetHeight}else{var h=adDiv.offsetHeight;if(adSpan.offsetWidth==0){var w=adDiv.scrollWidth}}adFrame.style.width=w+"px";adFrame.style.height=h+"px"}}}function adsGetAdURL(win){var adFrame=win.frameElement;var div=adFrame.parentNode;return div.adURL}function RemoveChildren(obj){var iframe=null;while(obj.childNodes.length>0){var child=obj.childNodes[0];var id=child.id;if(id=="adFrame"){iframe=child;iframe.src="about:blank"}if(id){child.id=""}if(child.childNodes.length>0){RemoveChildren(child)}obj.removeChild(child)}}function ClearDiv(){RemoveChildren(this)}function LoadAd(){this.ClearAd();if(!this.adURL||this.adURL==""){return}var iframe=document.createElement("iframe");iframe.id="adFrame";iframe.style.height=0;iframe.style.width=0;iframe.marginWidth=0;iframe.marginHeight=0;iframe.frameBorder=0;iframe.scrolling="no";iframe.width=0;iframe.height=0;this.appendChild(iframe);iframe.src=this.adPage}var adDivs;if(!adDivs){adDivs=new Array()}function CreateAdDiv(w,h,adURL,adPage){var did="adDiv"+adDivs.length;var div=document.createElement("div");div.id=did;_SetupAdDiv(div,w,h,adURL,adPage);return div}function SetupAdDiv(w,h,adURL,adPage){var did="adDiv"+adDivs.length;document.write("<div id='"+did+"'></div>");var div=document.getElementById(did);_SetupAdDiv(div,w,h,adURL,adPage);return div}function _SetupAdDiv(div,w,h,adURL,adPage){div.RMIFOnLoad=adsRMIFOnL;div.LoadAd=LoadAd;div.ClearAd=ClearDiv;div.w=w;div.h=h;div.adURL=adURL;div.adPage=adPage;adDivs[adDivs.length]=div}function LoadAds(){ClearAds();setTimeout("DoLoadAds();",100)}function DoLoadAds(){for(i=0;i<adDivs.length;i++){adDivs[i].LoadAd()}}function ClearAds(){for(i=0;i<adDivs.length;i++){adDivs[i].ClearAd()}}function HideAds(){for(i=0;i<adDivs.length;i++){adDivs[i].style.display="none"}}function ShowAds(){for(i=0;i<adDivs.length;i++){adDivs[i].style.display="block"}}function getSectionTag(sectionType){var lvSunSectionTag="";var sectionStr=lvSunAdTag;if(sectionStr.indexOf("/")!=-1){lvSunSectionTagTempArr=sectionStr.split("/",2);if(sectionType=="Section"){lvSunSectionTag=lvSunSectionTagTempArr[0]}else{lvSunSectionTag=lvSunSectionTagTempArr[1]}lvSunSectionTag=lvSunSectionTag.toUpperCase()}else{if(sectionType=="Section"){lvSunSectionTag=sectionStr.toUpperCase()}else{lvSunSectionTag=""}}return lvSunSectionTag}var MerryGoRound=new Class({Implements:[Events,Options],options:{selector:"*",cycle:false,per_page:"auto",page_controls:false,fx_options:{property:"margin-left",link:"cancel"},wrapper_tag:"div",wrapper_options:{"class":"merry-go-round-wrapper",styles:{position:"relative"}},button_event:"click",previous_button_tag:"a",previous_button_options:{html:"prev","class":"merry-go-round-previous",styles:{position:"absolute",left:0}},next_button_tag:"a",next_button_options:{html:"next","class":"merry-go-round-next",styles:{position:"absolute",right:0}},current_page_class:"merry-go-round-current-page",page_controls_tag:"div",page_controls_options:{"class":"merry-go-round-pagination",styles:{overflow:"auto"}}},initialize:function(elem,options){this.setOptions(options);this.inner_element=$(elem);var method=this.inner_element.getParent()?"wraps":"grab";this.element=new Element(this.options.wrapper_tag,this.options.wrapper_options)[method](this.inner_element);this.riders=this.element.getFirst().getChildren(this.options.selector);this.current_index=0;if(this.riders.length===0){return}this.scroll=new Fx.Tween(this.inner_element,this.options.fx_options);this.setup_styles();this.setup_pages();if(this.pages.length>1){if(this.options.page_controls){this.setup_page_controls()}this.inject_buttons();this.add_events();this.fireEvent("pageShown",[0,this])}return this},setup_styles:function(){this.element.setStyles({height:this.options.wrapper_height||this.riders[0].getHeight(),width:this.options.wrapper_width||this.inner_element.getWidth()});var total_height=0;this.riders.each(function(x){total_height+=x.getWidth()+x.getStyle("margin-left").toInt()+x.getStyle("margin-right").toInt()});this.inner_element.setStyles({width:total_height,overflow:"hidden"})},setup_pages:function(){this.pages=[];if(this.options.per_page=="auto"){var right_edge=this.element.getWidth();this.pages.include(this.riders[0]);for(var i=1,ii=this.riders.length;i<ii;i++){var rider_left=this.riders[i].getPosition(this.inner_element).x;var rider_width=this.riders[i].getWidth()+this.riders[i].getStyle("margin-left").toInt()+this.riders[i].getStyle("margin-right").toInt();if((rider_left<right_edge&&rider_left+rider_width>right_edge)||(i>0&&rider_left>=right_edge&&!this.riders[i-1].retrieve("merry-go-round-page"))){this.riders[i].store("merry-go-round-page",true);this.pages.include(this.riders[i]);right_edge=-this._calculate_scroll(this.riders[i])+this.element.getWidth()}}}else{if(this.options.per_page===1){this.pages=this.riders}else{for(var i=1,ii=this.riders.length;i<ii;i++){if(i%this.options.per_page===0){this.pages.include(this.riders[i])}}}}},setup_page_controls:function(){this.page_controls=new Element(this.options.page_controls_tag,this.options.page_controls_options).adopt(this.pages.map(function(p,i){var tag=this.options.page_controls_tag.test("ul","i")?"li":this.options.page_controls_tag;return new Element(tag,{"class":i===0?this.options.current_page_class:"",events:{click:this.scroll_to_page.bind(this,i)}})},this)).inject(this.element);var total_width=0;this.page_controls.getChildren().each(function(x){total_width+=x.getWidth()+x.getStyle("margin-left").toInt()+x.getStyle("margin-right").toInt()});this.page_controls.setStyle("width",total_width)},inject_buttons:function(){var buttons=[this.previous_button=new Element(this.options.previous_button_tag,this.options.previous_button_options),this.next_button=new Element(this.options.next_button_tag,this.options.next_button_options)];this.element.adopt(buttons);buttons.each(function(button){button.setStyle("top",button.getParent().getHeight()/2-button.getHeight()/2)});if(!this.options.cycle){this.previous_button.setStyle("display","none")}},add_events:function(){this.previous_button.addEvent(this.options.button_event,this.previous.bind(this));this.next_button.addEvent(this.options.button_event,this.next.bind(this))},next:function(){this.scroll_to_page(++this.current_index)},previous:function(){this.scroll_to_page(--this.current_index)},_hide_or_show_buttons:function(page_index){if(!this.options.cycle){if(page_index===0){this.previous_button.setStyle("display","none")}else{this.previous_button.setStyle("display","block")}if(page_index+1===this.pages.length){this.next_button.setStyle("display","none")}else{this.next_button.setStyle("display","block")}}},_update_page_controls:function(page_index){$(this.page_controls).getChildren().removeClass(this.options.current_page_class)[page_index].addClass(this.options.current_page_class)},_calculate_scroll:function(elem){return -elem.getPosition(this.inner_element).x+elem.getStyle("margin-left").toInt()+this.inner_element.getStyle("padding-left").toInt()},scroll_to_page:function(page_index){if(page_index<0){page_index=this.pages.length+page_index}else{page_index=page_index%this.pages.length}this.current_index=page_index;this.fireEvent("pageShown",[page_index,this]);this._hide_or_show_buttons(page_index);if(this.options.page_controls){this._update_page_controls(page_index)}this.scroll.start(this._calculate_scroll(this.pages[page_index]))}});var mobileRedirect={redirect:function(){currentURL=document.location.href;mobileURL=currentURL.replace("www.lasvegassun.com","m.lvsun.com");document.location=mobileURL},addMobileLink:function(){window.addEvent("domready",function(){var mobileLink=new Element("a",{id:"mobileLink",href:"#"});var container=$("container");mobileLink.set("text","Switch to mobile site");mobileLink.inject(container,"top");mobileLink.addEvent("click",function(){mobileRedirect.redirect()})})},checkReferrer:function(){var referrer=document.referrer;if(referrer.test("http://m.lasvegassun.com")||referrer.test("http://m.lvsun.com")){var mobileCookie=Cookie.write("noSunMobileRedirect",{domain:".lasvegassun.com",path:"/",duration:365});this.addMobileLink()}else{var redirectCookie=Cookie.read("noSunMobileRedirect");if(!redirectCookie&&screen.width>0&&screen.width<=600){this.redirect()}else{if(screen.width>0&&screen.width<=600){this.addMobileLink()}}}},initialize:function(){this.checkReferrer()}};
