/* /lib/adlib.js */
function cc(C,D,E){var A="",B;if(E){if(typeof E=="object"){B=E}else{B=new Date();B.setTime(B.getTime()+E*86400000)}A="; expires="+B.toGMTString()}document.cookie=C+"="+D+A+"; path=/;"}function rc(C){var F=C+"=",B=document.cookie.split(";"),E=/\s*(.*)/,D,G,A;for(D=0,A=B.length;D<A;D++){G=B[D].match(E)[1];if(G.indexOf(F)==0){return G.substring(F.length,G.length)}}return null}function ec(A){cc(A,"",-1)}function ntce(A){return(A==null||A.length==0)}function pec(C){var A=unescape(C).split("&"),E="",B,D;for(B=0;B<A.length;B++){if(A[B]!=null&&A[B].length>0){D=A[B].split("=");if(D.length==2){if(B==0){E=E+D[0]+"="+unescape(D[1])}else{E=E+","+D[0]+"="+unescape(D[1])}}}}return E}function gau(E,F,B,A,D){var C=E+B+D+A+"?";if(F!=null){C=C+"&"+String(F)}return C}function ntfe(A,B){return(A!=null&&A.length>0&&(B==null||B.length==0))}function fe(A){document.write(['<script type="text/javascript" src="',A,'"></',"script>"].join(""))};
/* /lib/jquery.js */
(function(){if(window.jQuery){var _jQuery=window.jQuery}var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context)};if(window.$){var _$=window.$}window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}else{if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector)}else{this[0]=elem;this.length=1;return this}}else{selector=[]}}}else{return new jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}}return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector])},jquery:"1.2.3",size:function(){return this.length},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num]},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){var ret=-1;this.each(function(i){if(this==elem){ret=i}});return ret},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value==undefined){return this.length&&jQuery[type||"attr"](this[0],name)||undefined}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem)});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems)},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0]}else{return this.cloneNode(true)}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return }var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data)}}})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,this))},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true))}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return !selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]))},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false},hasClass:function(selector){return this.is("."+selector)},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value}values.push(value)}}return values}else{return(this[0].value||"").replace(/\r/g,"")}}return undefined}return this.each(function(){if(this.nodeType!=1){return }if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length){data=jQuery.data(this[0],key)}return data==null&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse()}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"))}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem)}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove())}callback.call(obj,elem)}});scripts.each(evalScript)})}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2}if(typeof target!="object"&&typeof target!="function"){target={}}if(length==1){target=this;i=0}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){if(target===options[name]){continue}if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType){target[name]=jQuery.extend(target[name],options[name])}else{if(options[name]!=undefined){target[name]=options[name]}}}}}return target};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"")},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data}else{script.appendChild(document.createTextNode(data))}head.appendChild(script);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!=undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object){if(callback.apply(object[name],args)===false){break}}}else{for(var i=0,length=object.length;i<length;i++){if(callback.apply(object[i],args)===false){break}}}}else{if(object.length==undefined){for(var name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0});val-=Math.round(padding+border)}if(jQuery(elem).is(":visible")){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,val)}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari){return false}var ret=document.defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save}if(name.match(/float/i)){name=styleFloat}if(!force&&elem.style&&elem.style[name]){ret=elem.style[name]}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem)){ret=getComputedStyle.getPropertyValue(name)}else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode){stack.unshift(a)}for(var i=0;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block"}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i]}}}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle}}}}return ret},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}jQuery.each(elems,function(i,elem){if(!elem){return }if(elem.constructor==Number){elem=elem.toString()}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}}elem=jQuery.makeArray(div.childNodes)}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return }if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(fix[name]){if(value!=undefined){elem[fix[name]]=value}return elem[fix[name]]}else{if(jQuery.browser.msie&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}else{if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method")){return elem.getAttributeNode(name).nodeValue}else{if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem.setAttribute(name,""+value)}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem)){return elem.getAttribute(name,2)}return elem.getAttribute(name)}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(value!=undefined){elem[name]=value}return elem[name]}}}}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(typeof array!="array"){for(var i=0,length=array.length;i<length;i++){ret.push(array[i])}}else{ret=array.slice(0)}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]==elem){return i}}return -1},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++){if(second[i].nodeType!=8){first.push(second[i])}}}else{for(var i=0;second[i];i++){first.push(second[i])}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv&&callback(elems[i],i)||inv&&!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!==null&&value!=undefined){if(value.constructor!=Array){value=[value]}ret=ret.concat(value)}}return ret}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret))}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this)}})}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px")}});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2])},"#":function(a,i,m){return a.getAttribute("id")==m[2]},":":{lt:function(a,i,m){return i<m[3]-0},gt:function(a,i,m){return i>m[3]-0},nth:function(a,i,m){return m[3]-0==i},eq:function(a,i,m){return m[3]-0==i},first:function(a,i){return i==0},last:function(a,i,m,r){return i==r.length-1},even:function(a,i){return i%2==0},odd:function(a,i){return i%2},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling")},parent:function(a){return a.firstChild},empty:function(a){return !a.firstChild},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"},enabled:function(a){return !a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked},selected:function(a){return a.selected||jQuery.attr(a,"selected")},text:function(a){return"text"==a.type},radio:function(a){return"radio"==a.type},checkbox:function(a){return"checkbox"==a.type},file:function(a){return"file"==a.type},password:function(a){return"password"==a.type},submit:function(a){return"submit"==a.type},image:function(a){return"image"==a.type},reset:function(a){return"reset"==a.type},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button")},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},has:function(a,i,m){return jQuery.find(m[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r)}return cur},find:function(t,context){if(typeof t!="string"){return[t]}if(context&&context.nodeType!=1&&context.nodeType!=9){return[]}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c)}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue}foundToken=true}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true}r.push(n)}if(m=="+"){break}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length)}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{re2=quickClass;m=re2.exec(t)}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0]}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[]}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param"}r=jQuery.merge(r,ret[i].getElementsByTagName(tag))}if(m[1]=="."){r=jQuery.classFilter(r,m[2])}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break}}r=tmp}ret=r}t=t.replace(re2,"")}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t)}}if(t){ret=[]}if(ret&&context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);return done},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i])}}return tmp},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break}}if(!m){break}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3])}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not)}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||""}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a)}}r=tmp}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++}}merge[id]=true}var add=false;if(first==0){if(node.nodeIndex==last){add=true}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true}}if(add^not){tmp.push(node)}}r=tmp}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]]}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}")}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r)},not)}}}}}return{r:r,t:t}},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem)){r.push(n)}}return r}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(jQuery.browser.msie&&elem.setInterval!=undefined){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments)};handler.data=data;handler.guid=fn.guid}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered){return val}val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid]}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler]}}}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data)}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift(this.fix({type:type,target:elem}))}data[0].type=type;if(exclusive){data[0].exclusive=true}if(jQuery.isFunction(jQuery.data(elem,"handle"))){val=jQuery.data(elem,"handle").apply(elem,data)}if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false}if(event){data.shift()}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false}return val},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}if(jQuery.browser.msie){event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null}return val},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=originalEvent.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},special:{ready:{setup:function(){bindReady();return },teardown:function(){return }},mouseenter:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true},handler:function(event){if(withinElement(event,this)){return true}arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true},handler:function(event){if(withinElement(event,this)){return true}arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments)}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments)},fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn)})},triggerHandler:function(type,data,fn){if(this[0]){return jQuery.event.trigger(type,data,this[0],false,fn)}return undefined},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false})},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(function(){return fn.call(this,jQuery)})}return this}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false)}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return }for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return }}jQuery.ready()},false)}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return }if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return }if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return }jQuery.ready()})()}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode}catch(error){parent=elem}}return parent==elem};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind()});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url)){return this.bind("load",url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{params=jQuery.param(params);type="POST"}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}self.each(callback,[res.responseText,status,res])}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data){xml.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend){s.beforeSend(xml)}if(s.global){jQuery.event.trigger("ajaxSend",[xml,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xml,status)}complete();if(s.async){xml=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xml){xml.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xml.send(s.data)}catch(e){jQuery.handleError(s,xml,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xml,s])}}function complete(){if(s.complete){s.complete(xml,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xml,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xml},handleError:function(s,xml,status,e){if(s.error){s.error(xml,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xml,s,e])}},active:0,httpSuccess:function(r){try{return !r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined}catch(e){}return false},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined}catch(e){}return false},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=eval("("+data+")")}return data},param:function(a){var s=[];if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))})}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))})}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]))}}}return s.join("&").replace(/%20/g,"+")}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block"}elem.remove()}}).end()},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none"}).end()},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]()})},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback)},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback)},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback)},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback)},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false}var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return jQuery.isFunction(opt.complete)&&opt.complete.apply(this)}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx"}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type)}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn)}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.apply(this)}}})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});var queue=function(elem,type,array){if(!elem){return undefined}type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[])}return q};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].apply(this)}})};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.apply(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.apply(this.elem,[this.now,this])}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px"}jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){this.elem.style.display="none"}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}}if(done&&jQuery.isFunction(this.options.complete)){this.options.complete.apply(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now},scrollTop:function(fx){fx.elem.scrollTop=fx.now},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop)}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent)}if(!fixed&&jQuery.css(offsetParent,"position")=="fixed"){fixed=true}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&jQuery.css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop)}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop))}}results={top:top,left:left}}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true))}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0}return results}})();
/* /lib/communityServiceConfig.js */
var tpMediaDataServicePrefix="http://mps.theplatform.com/";var tpRatingDataServicePrefix="http://ratings.community.theplatform.com/rating/";var tpTotalRatingDataServicePrefix="http://totalratings.community.theplatform.com/totalrating/";var tpTagDataServicePrefix="http://tags.community.theplatform.com/tag/";var tpTotalTagDataServicePrefix="http://totaltags.community.theplatform.com/totaltag/";var tpCommentsDataServicePrefix="http://comments.community.theplatform.com/comment/";var tpUserListsDataServicePrefix="http://userlists.community.theplatform.com/userlist/";var tpUserProfilesDataServicePrefix="http://userprofiles.community.theplatform.com/userprofile/";var tpUserDataServicePrefix="https://euid.theplatform.com/idm/";var tpIdentityServicePrefix="https://euid.theplatform.com/idm/";var tpAccessServicePrefix="http://enduser.access.auth.theplatform.com/access/";
/* /lib/communityManager.js */
var tpMediaDataServicePath="data/Media";var tpRatingMetadataServicePath="metadata/Rating";var tpTotalRatingMetadataServicePath="metadata/TotalRating";var tpTagMetadataServicePath="metadata/Tag";var tpTotalTagMetadataServicePath="metadata/TotalTag";var tpCommentDataServicePath="data/Comment";var tpUserListDataServicePath="data/UserList";var tpUserProfileMetadataServicePath="metadata/UserProfile";var tpUserDataServicePath="data/User";var j$=jQuery.noConflict();CommunityManager=function(){this._initialize.apply(this,arguments)};CommunityManager.index=1;CommunityManager.prototype={_initialize:function(D,F,E,B,C,A){if(D==null||D.length==0){alert("You need to provide the Account URI.");return false}else{this.accountURI=D}if(F==null||F.length==0){this.anonymousUser=true;this.userContext=null}else{if(F.lastIndexOf("/")<(F.length-1)){F+="/"}this.anonymousUser=false;this.userContext=F}this.scriptID="CommunityManager"+CommunityManager.index++;if(typeof E!="undefined"&&E!=null){this.ratingID=E;tpCommunityWidgetManager.registerWidgetDiv(tpCommunityWidgetManager.ratingWidgetTypeName,E)}if(typeof B!="undefined"&&B!=null){this.commentsID=B;tpCommunityWidgetManager.registerWidgetDiv(tpCommunityWidgetManager.commentWidgetTypeName,B)}if(typeof C!="undefined"&&C!=null){this.tagsID=C;tpCommunityWidgetManager.registerWidgetDiv(tpCommunityWidgetManager.tagWidgetTypeName,C)}if(typeof A!="undefined"&&A!=null){this.profileID=A;tpCommunityWidgetManager.registerWidgetDiv(tpCommunityWidgetManager.profileWidgetTypeName,A)}this.isAuthenticated=false},getRatingDivID:function(){return this.ratingID},getCommentsDivID:function(){return this.commentsID},getTagsDivID:function(){return this.tagsID},getProfileDivID:function(){return this.profileID},_userProfile:undefined,_setProfileEvents:[],registerForProfileChange:function(A){this._setProfileEvents.push(A)},getProfile:function(){return this._userProfile},setProfile:function(B){this._userProfile=B;if(this._setProfileEvents.length>0){for(var A=0;A<this._setProfileEvents.length;A++){this._setProfileEvents[A](B)}}},clearProfile:function(){this.setProfile(undefined)},_signInEvents:[],_signOutEvents:[],registerForAuthentication:function(A,B){switch(B||""){case"signIn":this.registerForSignIn(A);break;case"signOut":this.registerForSignOut(A);break;default:this.registerForSignIn(A);this.registerForSignOut(A);break}},registerForSignIn:function(A){this._signInEvents.push(A)},registerForSignOut:function(A){this._signOutEvents.push(A)},signIn:function(B,A,D){var C={username:this.userContext+B,password:A};if(D){this.secondarySignInCallback=D}else{this.secondarySignInCallback=undefined}this._signInTimeoutInterval=setInterval(this._signInTimeout.bindTo(this),5000);this._makeJsonServiceCall(C,tpIdentityServicePrefix+"JSON/Authentication/1.0/signIn","1.0",null,this._signInCallback.bindTo(this))},_signInTimeout:function(){clearInterval(this._signInTimeoutInterval);if(this.secondarySignInCallback){this.secondarySignInCallback({isException:true,message:"Sign in is not currently available."})}},_signInCallback:function(A){clearInterval(this._signInTimeoutInterval);if(this.isException(A)!=true){this.isAuthenticated=true;this.token=A.token;if(A.idleTimeout>0){this.tokenRefreshInterval=setInterval(this._refreshToken.bindTo(this),A.idleTimeout)}else{clearInterval(this.tokenRefreshInterval)}this._getSelfID(this._getSelfIDCallback.bindTo(this))}else{if(this.secondarySignInCallback){this.secondarySignInCallback(A)}}},_getSelfID:function(B){var A={token:this.token};this._makeJsonServiceCall(A,tpIdentityServicePrefix+"JSON/Self/1.0/getSelfID","1.0",null,B||this.errorHandler.bindTo(this))},extractUserName:function(A){return A.substring(A.lastIndexOf("/")+1,A.length)},_getSelfIDCallback:function(A){if(!this.isException(A)){this.selfID=A.userID;this.userName=this.extractUserName(this.selfID);if(this._signInEvents.length>0){for(var B=0;B<this._signInEvents.length;B++){this._signInEvents[B](A)}}}if(this.secondarySignInCallback){this.secondarySignInCallback(A)}},_refreshToken:function(){this.getSelfID()},signInWithToken:function(A){this.token=A},signOut:function(B){var A={token:this.token};this.token=undefined;this.selfID=undefined;this.isAuthenticated=false;this.clearProfile();if(typeof B!="undefined"){this.secondarySignOutCallback=B}else{this.secondarySignOutCallback=undefined}this._makeJsonServiceCall(A,tpIdentityServicePrefix+"JSON/Authentication/1.0/signOut","1.0",null,this._signOutCallback.bindTo(this));clearInterval(this.tokenRefreshInterval)},_signOutCallback:function(A){if(!this.isException(A)){if(this._signOutEvents.length>0){for(var B=0;B<this._signOutEvents.length;B++){this._signOutEvents[B](A)}}}if(this.secondarySignOutCallback){this.secondarySignOutCallback(A)}},authorize:function(A,B,D){var C={"operations[0].instance":A.instance||"*","operations[0].service":A.service||"Community Data Service","operations[0].method":A.method||"*","operations[0].endpoint":A.endpoint||"*"};if(typeof this.token!="undefined"){this._makeJsonServiceCall(C,B+"JSON/Authorization/1.0/authorize",null,"",D,true)}else{this._makeJsonServiceCall(C,B+"JSON/Authorization/1.0/authorize",null,"",D,false)}},addTag:function(D,B,A,E,C){var F={aboutID:D,value:B};this._makeJsonServiceCall(F,E+tpTagMetadataServicePath,null,"create",C||this.errorHandler.bindTo(this))},addRating:function(D,C,A,E,B){var F={aboutID:D,value:C};this._makeJsonServiceCall(F,E+tpRatingMetadataServicePath,null,"create",B||this.errorHandler.bindTo(this))},addComment:function(E,D,H,C,A,F,B){var G={aboutID:E,text:H,userName:D};if(C!=null&&C.length>0){G.url=C}this._makeJsonServiceCall(G,F+tpCommentDataServicePath,null,"create",B||this.errorHandler.bindTo(this))},addUserList:function(D,E,C,A,F,B){var G={itemIDs:C,name:D,context:E};this._makeJsonServiceCall(G,F+tpUserListDataServicePath,null,"create",B||this.errorHandler.bindTo(this))},addUserProfile:function(B,E,D,A,F,C){var G={avatar:D,displayName:B,publicData:"{url:'"+E+"'}"};this._makeJsonServiceCall(G,F+tpUserProfileMetadataServicePath,null,"create",C||this.errorHandler.bindTo(this))},updateUserProfile:function(B,E,D,A,F,C){var G={avatar:D,displayName:B,publicData:"{url:'"+E+"'}"};this._makeJsonServiceCall(G,F+tpUserProfileMetadataServicePath,null,"update",C||this.errorHandler.bindTo(this))},updateUserList:function(F,D,E,C,A,G,B){var H={ID:F,itemIDs:C,name:D,context:E};this._makeJsonServiceCall(H,G+tpUserListDataServicePath,null,"update",B||this.errorHandler.bindTo(this))},getTags:function(B,A,C,E){var D={byAboutID:B,fields:"value",sortFields:"value"};this._makeJsonServiceCall(D,C+tpTagMetadataServicePath,A,null,E)},getRating:function(B,A,C,E){var D={byAboutID:B,fields:"value"};this._makeJsonServiceCall(D,C+tpRatingMetadataServicePath,A,null,E)},getComment:function(B,A,D){var C={fields:"ID,lastModified,userName,url,text,addedByUserID,approved"};this._makeJsonServiceCall(C,B,A,null,D)},getComments:function(C,A,D,G,F,B){var E={byAboutID:C,byApproved:"true",fields:"ID,added,userName,url,text,addedByUserID",sortFields:"added",sortDescending:"true"};if(typeof F!="undefined"&&F!=null){E.startIndex=F;E.listInfo=true}if(typeof B!="undefined"){E.endIndex=B;E.listInfo=true}this._makeJsonServiceCall(E,D+tpCommentDataServicePath,A,null,G)},getTotalTags:function(B,A,C,E){var D={byAboutID:B,fields:"count,value,lastModified",sortFields:"value"};this._makeJsonServiceCall(D,C+tpTotalTagMetadataServicePath,A,null,E)},getTotalTagsByValue:function(B,A,C,E){var D={byValue:this.unsanitize(B,true),fields:"aboutID",sortFields:"lastModified",sortDescending:true,startIndex:1,endIndex:500};this._makeJsonServiceCall(D,C+tpTotalTagMetadataServicePath,A,null,E)},getTotalRating:function(B,A,C,E){var D={byAboutID:B,fields:"average,count"};this._makeJsonServiceCall(D,C+tpTotalRatingMetadataServicePath,A,null,E)},getTopRatings:function(A,B,D){var C={fields:"aboutID",sortFields:"average",sortDescending:true,startIndex:1,endIndex:500};this._makeJsonServiceCall(C,B+tpTotalRatingMetadataServicePath,A,null,D)},getUserList:function(B,A,C,E){var D={byContext:B,fields:"ID,itemIDs"};this._makeJsonServiceCall(D,C+tpUserListDataServicePath,A,null,E)},getUserProfile:function(B,A,C,E){var D={byAboutID:B,fields:"avatar,displayName,publicData,aboutID"};this._makeJsonServiceCall(D,C+tpUserProfileMetadataServicePath,A,null,E)},getUserProfiles:function(B,A,C,E){var D={fields:"avatar,displayName,publicData,aboutID"};this._makeJsonServiceCall(D,C+tpUserProfileMetadataServicePath+"?"+B,A,null,E)},deleteTag:function(C,A,D,B){var E={byValue:A,byAboutID:C};this._makeJsonServiceCall(E,D+tpTagMetadataServicePath,null,"delete",B||this.errorHandler.bindTo(this))},deleteComment:function(C,A,D,B){var E={};this._makeJsonServiceCall(E,C,null,"delete",B||this.errorHandler.bindTo(this))},_makeJsonServiceCall:function(D,C,B,F,E,A){if(typeof A=="undefined"){A=true}if(!this.anonymousUser&&typeof this.token!="undefined"){D.token=this.token}if(A){D.account=this.accountURI}D.type="json";if(B!=null&&B.length>0){D.version=B}if(F!=null&&F.length>0){D.method=F}C+=(C.indexOf("?")!=-1?"&":"?")+"callback=?";return j$.getJSON(C,D,E)},_errors:[],errorHandler:function(A){if(A!=null){if(A.isException==true){this._errors.push(A);if(typeof this._customErrorHandler=="undefined"){alert(A.type+": "+A.message)}else{this._customErrorHandler(A)}}else{if(typeof A=="string"){alert(A)}}}},isException:function(A){return(A!=null&&typeof A.isException!="undefined")?Boolean(A.isException):false},sanitize:function(C,B){var A=C.replace(/&/g,"&amp;");var A=A.replace(/>/g,"&gt;");var A=A.replace(/</g,"&lt;");if(B){A=A.replace(/ /g,"&nbsp;")}return A},unsanitize:function(A,C){var B=A.replace(/&amp;/g,"&");var B=B.replace(/&gt;/g,">");var B=B.replace(/&lt;/g,"<");if(C){B=B.replace(/&nbsp;/g," ")}return B},getContentIndex:function(A){if(typeof A.data.clips!="undefined"){for(var B=0;B<A.data.clips.length;B++){if(A.data.baseClips[B].isAd==false){return B}}}return -1},setContentIDs:function(D){var C="";var H=tpMediaDataServicePrefix+"data/Media/";if(typeof D!="undefined"&&typeof D.length!="undefined"&&D.length>0){contentIDCount=0;for(var F in D){var G=D[F].aboutID;var B=G.indexOf(H);if(B==0){var A=G.substr(B+H.length,G.length-H.length);var E=true;for(i=0;i<A.length;i++){if(A.charAt(i)<"0"||A.charAt(i)>"9"){E=false;break}}if(E){if(C.length==0){C=A}else{C+=","+A}if(++contentIDCount==100){break}}}}}else{C="0"}tpController.refreshReleaseModel("","",null,null,null,["query=ContentIDs|"+C])},_uriPattern:undefined,isUri:function(A){if(this._uriPattern==undefined){this._uriPattern=new RegExp();this._uriPattern.compile("^(http|https)://[A-Za-z0-9]+")}return this._uriPattern.test(A)}};DomFragment=function(C,A){if(typeof C=="string"){var B=document.createElement(C)}else{var B=C}if(typeof A!="undefined"){for(p in A){if(typeof A[p]=="object"){if(typeof B[p]=="undefined"&&p!="toAppend"){B[p]=A[p]}else{if(p=="toAppend"){B._cFrag={};for(ta in A[p]){if(typeof A[p][ta].appendChild!="undefined"){B.appendChild(A[p][ta]);B._cFrag[ta]=A[p][ta]}else{if(typeof A[p][ta][0]!="undefined"){for(i=0;i<A[p][ta].length;i++){if(typeof A[p][ta][0].appendChild!="undefined"){B.appendChild(A[p][ta][0]);B._cFrag[ta]=A[p][ta][0]}}}}}}else{for(np in A[p]){B[p][np]=A[p][np]}}}}else{if(p.toLowerCase()!="class"){B[p]=A[p]}else{B.className=A[p]}}}}return B};Function.prototype.bindTo=function(A){var B=this;return function(){return B.apply(A,arguments)}};
/* /lib/communityConnect.js */
jQuery(document).ready(function(){if(typeof window.tpCommunityManager!="undefined"){return }if(typeof document.config.tPCommunityAccount!="undefined"&&document.config.tPCommunityAccount!=""&&document.config.tPCommunityAccount=="prod"){window.tpCommunityManager=new CommunityManager("http://mps.theplatform.com/data/Account/710029972","ymoYzncm")}else{window.tpCommunityManager=new CommunityManager("http://mps.theplatform.com/data/Account/735560896","I68ClApz")}});
/* /lib/swfobject.js */
if(typeof deconcept=="undefined"){var deconcept={};}if(typeof deconcept.util=="undefined"){deconcept.util={};}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={};}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={};this.variables={};this.attributes=[];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){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(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=[];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(!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;
/* /lib/flashbrowserstore.js */
var fbs={available:false,successVal:"saveSucceeded",fbsInit:false,initCtr:0,init:function(flash_id,callback){flash_id=flash_id||"store";callback=callback||"fbs.testSuccess";var mov=this.getEmbeddedSWF(flash_id);if(mov){try{console.log("trying to save data");mov.saveData("fbsTest","success",callback);console.log("embedded swf exists & allows access to saveData");}catch(e){console.log("embedded swf exists but won't allow access to saveData!");if(!fbs.fbsInit&&!tvGridFav.initCalled){if(fbs.initCtr<9){fbs.initCtr++;console.log("attempt "+fbs.initCtr+" to access saveData");setTimeout(function(){fbs.init(flash_id,callback);},100);}else{console.log("giving up");tvGridFav.fbsInitFail();}}}}else{console.log("embedded swf does not exist!");tvGridFav.fbsInitFail();}},testSuccess:function(value){if(value==this.successVal){this.available=true;}},getEmbeddedSWF:function(movieName){return $(movieName);},saveToSO:function(key,value,callback){callback=callback||"fbs.handleSaveCallBack";var mov=this.getEmbeddedSWF("store");console.log("attempting to store "+value+" as the value for "+key);mov.saveData(key,value,callback);},getFromSO:function(key,callback){callback=callback||"fbs.showValue";var mov=this.getEmbeddedSWF("store");console.log("attempting to get "+key);mov.getData(key,callback);},handleSaveCallBack:function(value){if(value==this.successVal){console.log("Data Saved");}else{console.log("Data NOT Saved: "+value);}},showValue:function(value){console.log("-->"+value);}};
/* /lib/core.js */
function addLoadEvent(A){addEvent(window,"ondomloaded",A)}addLoadEvent(function(){document.config.debugConsole=false;if(document.config.debug){loadJS("lib/debug.js")}else{if(typeof console=="undefined"){window.console={log:function(){},info:function(){},warn:function(){},error:function(){}}}}window.addLoadEvent=function(A){A()}});function stripComments(E){var B=/\n/g;E=E.replace(B,"");var D=/^\/\*(.*)\*\/$/i;var A=D.exec(E);var C=false;if(A&&A.length){var C=A[1]}return C}function echeck(E){var C=/^(\w|[_.-])+@\w+(\.|-|\w)+$/i;var A=/^.+\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/i;var B=/^.+@ovm\.comcast\.net$/i;var D=/\.{2}|-{2}|^\.|\.@/i;return !(E.length>100||(E.length>0&&(!A.test(E)||!C.test(E)||B.test(E)||D.test(E))))}(function(){var domloaded=false;var timer;var init=function(){if(domloaded){return }domloaded=true;if(timer){clearInterval(timer)}if(window.ondomloaded){window.ondomloaded()}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false);
/*@cc_on @*/
/*@if (@_win32)
    document.write("<script id=\"__ie_onload\" defer=\"defer\" src=\"javascript:void(0)\"><\/script>");
    var script = document.getElementById("__ie_onload");
    script.onreadystatechange = function() {
      //if (this.readyState == "complete") init();
    }
  /*@end @*/
}if(is_safari){timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}window.onload=init})();function addEvent(B,A,C){var D=B[A]||function(){return };B[A]=function(){D();C()}}function cancelEvent(A){if(A===false){return false}A=window.event?window.event:A;if(!A){return false}A.cancelBubble=true;A.returnVal=false;return false}function cancelTrackEvent(A){A=window.event?window.event:A;if(typeof s!="undefined"){s.bc(A)}return cancelEvent(A)}function getPackageContext(D){var A=document.config.dataPackageContext.split("/");var C=(D||"").split("/");A.pop();for(var B=0;B<C.length;B++){if(C[B]==".."){A.pop()}else{if(C[B]=="."){}else{if(C[B]!=""){A.push(C[B])}}}}A.push("doc.xml");return A.join("/")}Object.extend(window,(function(){var A={};function C(F,E){if(typeof A[F]=="undefined"){A[F]=0}var D=A[F];A[F]+=E;return D==0||A[F]==0}function B(E,D){D._each(function(F){if(Element.hasClassName(F.parentNode.parentNode,"ad")&&F.nodeName.toLowerCase()=="iframe"){F.style.position=E?"static":"relative";F.style.left=E?"0":"-9999px"}else{F.style.visibility=E?"visible":"hidden"}})}return{setAdVisibility:function(E){if(!C("ads",E?-1:1)){return }var F=jQuery("div.ad iframe");var D=$A(F);B(E,D);var D=$A(document.getElementsByTagName("select")).findAll(function(G){return Element.hasClassName(G,"hideUnderMore")});B(E,D);var D=$A(document.getElementsByTagName("embed")).findAll(function(G){return(Element.hasClassName(G.parentNode.parentNode,"ad")||Element.hasClassName(G.parentNode,"ad_pad")||Element.hasClassName(G.parentNode.parentNode,"ad_pad"))});B(E,D);var D=$A(document.getElementsByTagName("object")).findAll(function(G){return(Element.hasClassName(G.parentNode.parentNode,"ad")||Element.hasClassName(G.parentNode,"ad_pad")||Element.hasClassName(G.parentNode.parentNode,"ad_pad"))});B(E,D);var D=$A(document.getElementsByTagName("table")).findAll(function(G){return Element.hasClassName(G,"ad_slug_table")});B(E,D);if(D&&D.length>0){D=$A(D[0].parentNode.getElementsByTagName("object"))}B(E,D)},setCoverFlashVisibility:function(F){var E=$("cover");if(!E){return }if(!C("cover",F?-1:1)){return }var D=$A(E.getElementsByTagName("embed"));B(F,D)},setVideoVisibility:function(F){var D=$("inlinePlayerHolder")||$("video-player-holder")||$("videoPlayerContainer")||$("hdplayerdiv")||$("videoChannelPlayerContainer")||$("rss");if(!D){return }if(!C("inlinePlayer",F?-1:1)){return }var E=$A(D.getElementsByTagName("embed"));if(E.length==0){E=$A(D.getElementsByTagName("object"))}B(F,E)},setArticleFlashVisibility:function(F){var E=$("article");if(!E){return }if(!C("article",F?-1:1)){return }var D=$A(E.getElementsByTagName("embed"));if(D.length==0){D=$A(E.getElementsByTagName("object"));if(!D.length){return }}B(F,D)},setFlashVisibility:function(D){setAdVisibility(D);setCoverFlashVisibility(D);setVideoVisibility(D);setArticleFlashVisibility(D)}}})());function easyScrollTo(H,G,B,A){var A=A||function(J){};var E=B*0.02;var F=Animator.interpolate.linear(0,1,E);var C=new Animator(F,B);var D={};D.start={x:window.scrollX,y:window.scrollY};if(document.documentElement){D.start={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}}D.factor={x:H-D.start.x,y:G-D.start.y};C.onupdate=function(L){var M=D,J=M.start,K=M.factor;window.scrollTo(J.x+L*K.x,J.y+L*K.y);return true};var I=function(J){easyScrollTo(D.start.x,D.start.y,B,J)};C.oncomplete=function(){A(I)};C.run();return I}function showOverlay(A){var B=new Window("loading");B.onshow=function(){easyScrollTo(0,0,250,function(D){if(win=A()){var C=win.onhide;win.onhide=function(){C.apply(win);D()};win.show()}B.hide();if(typeof win=="undefined"||!win){D()}})};B.show()}function elapsedTimestamp(J,I){var E=60000;var N=E*60;var O=N*24;var B=function(Q,P){return[Q," ",P,(Q==1)?"":"s"," ago"].join("")};var C=new Date(),G=new Date();var F=J.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|([+-]?\d{2}):(\d{2}))/);if(!F){return I}var K=F[7]?parseInt(F[7],10):0;var L=F[8]?parseInt(F[8],10):0;G.setUTCFullYear(F[1]);G.setUTCMonth(F[2]-1);G.setUTCDate(F[3]);G.setUTCHours(parseInt(F[4],10)-K);G.setUTCMinutes(parseInt(F[5],10)-L);G.setUTCSeconds(F[6]);var M=C.getTime()-G.getTime();var D=Math.round(M/O);var A=Math.round(M/N);var H=Math.round(M/E);if(M<1*E){return"Seconds ago"}if(H<60){return B(H,"minute")}if(A<24){return B(A,"hour")}if(D<2){return B(D,"day")}return I}Object.extend(window,(function(){if(typeof window.loadJS!="undefined"||typeof window.includedJS!="undefined"){return{}}var A=[];var B=function(){var F="",C=document.getElementsByTagName("script");for(var E=0,D=C.length;E<D;E++){if(C[E].src==""){continue}F=C[E].src.match(new RegExp("^.*ui/js/"))[0];break}if(F==""){return F}B=function(){return F};return B()};addLoadEvent(function(){var C=document.getElementsByTagName("script");var G=new RegExp("^"+B()+"([^?]*)");for(var F=0,D=C.length;F<D;F++){if(C[F].src==""){continue}var E=C[F].src.match(G);if(E){window.includedJS(E[1])}}});return{loadJS:function(E,I){for(var F=0,C=A.length;F<C;F++){if(!I&&E==A[F]){return true}}var H=new Ajax.Request(B()+E,{method:"get",parameters:Ajax.parameters({r:document.config.revision}),asynchronous:false});if(H.responseIsFailure()){return false}var D=H.transport.responseText;if(D==""){return false}if(window.execScript){window.execScript(D)}else{var G=document.createElement("script");G.appendChild(document.createTextNode(D));document.documentElement.appendChild(G)}window.includedJS(E);return true},includedJS:function(C){A.push(C)}}})());addLoadEvent(function(){window.__flash__removeCallback=function(A,B){if(A!=null){A[B]=null}}});addLoadEvent(function(){if(!is_ie){return }var B=Element.getByTagClass(document.body,"img","png");var A=/\/ui\/images\/lib\/blank\.gif/;B.each(function(C){if(!A.test(C.src)){C.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+C.src+"',sizingMethod='image')";C.src="/ui/images/lib/blank.gif"}})});(function(A){var B=function(E,C){for(var F=0;F<C.length;F++){var D=E.length;E[D]=C[F]}return E};A.extend(Function.prototype,{context:function(C){var D=this;return function(){return D.apply(C,arguments)}},curry:function(){var D=this,C=arguments;return function(){return D.apply(this,B(C,arguments))}}})})(jQuery);var UserDataEvent={SUCCESS:"userdata_recieved",FAILURE:"userdata_failure"};var UserData=function(){this._uname=null;this._email=null;this._isHsi=false;this.fetchEmail()};jQuery.extend(UserData.prototype,{getUsername:function(){if(this._uname!=null&&this._uname.length>0){return this._uname}else{return null}},getEmail:function(){if(this._email!=null&&this._email.length>0){return this._email}else{return null}},isHsi:function(){return this._isHsi},_responseRecieved:function(A){var B=null;if(jQuery.browser.msie){B=new ActiveXObject("Microsoft.XMLDOM");B.async=false;B.loadXML(A)}else{B=A}this._uname=jQuery("userName",B).text();this._email=jQuery("userEmail",B).text();var C=jQuery("isHsiUser",B).text();(C=="yes")?this._isHsi=true:this._isHsi=false;jQuery(this).trigger(UserDataEvent.SUCCESS)},_errorRecieved:function(A){jQuery(this).trigger(UserDataEvent.FAILURE)},fetchEmail:function(){jQuery.ajax({type:"GET",url:"/user/authkey/service/sessiondecryption/",cache:false,success:this._responseRecieved.context(this),error:this._errorRecieved.context(this)})}});
/* /lib/animator.js */
var Animator=Class.create();Object.extend(Animator.prototype,{initialize:function(B,A){this.frames=B||[];this.delay=B.length>0?(A/B.length):0;this.display_timer=null;this.onupdate=function(){return true};this.oncomplete=function(){return };this._bound_update_display=this._update_display.bind(this)},is_running:function(){return this.display_timer!=null},run:function(){this.start_time=this.is_running()?0:(new Date()).getTime();this._update_display()},stop:function(A){if(this.display_timer!=null){window.clearTimeout(this.display_timer)}this.display_timer=null;if(!A){this.show_frame(0);this.oncomplete.call(this)}},show_frame:function(A){A=Math.min(this.frames.length-1,Math.max(0,A));return this.onupdate.call(this,this.frames[A])},_update_display:function(){var B=(new Date()).getTime();var D=Math.round((B-this.start_time)/this.delay);var A=this.show_frame(D);var C=(D<this.frames.length-1);if(A&&C){this.display_timer=window.setTimeout(this._bound_update_display,this.delay)}else{this.display_timer=null;this.oncomplete.call(this)}}});Animator.interpolate={_base:function(A,D){var B=[];for(var C=0;C<=A;C++){B.push(D(C))}return B},linear:function(E,A,C){var B=A-E;var D=B/C;return Animator.interpolate._base(C,function(F){return F*D+E})},root:function(D,A,C){var B=A-D;return Animator.interpolate._base(C,function(E){return Math.sqrt(E/C)*B+D})}};
/* /lib/tabs.js */
var SimpleTabs=Class.create();Object.extend(SimpleTabs.prototype,{initialize:function(){loadJS("lib/prototype/dom.js");this.onchange=function(){return true};this.tab_ids=Array();this.current_id=0},setup:function(D){for(var B=0;B<this.tab_ids.length;B++){var C=$(this.tab_ids[B]);var A=C.getElementsByTagName("a")[0];if(A){A.onclick=this.update.bind(this,B)}}if(this.tab_ids.length>0){this.update(D)}},update:function(D,B,C){if(D==null){D=this.current_id}if(typeof (C)=="undefined"){C=false}if(!C){if(!this.onchange(D,this.tab_ids[D])){return false}}for(var A=0;A<this.tab_ids.length;A++){this.setState(A,(A==D))}this.current_id=D;cancelEvent(false);return false},setState:function(B,A){Element[A?"addClassName":"removeClassName"](this.tab(B),"active")},tab:function(A){return $(this.tab_ids[A])||false},tab_id:function(A){for(var B=0;B<this.tab_ids.length;B++){if(this.tab_ids[B]==A){return B}}return false}});var TabBar=Class.create();Object.extend(TabBar.prototype,SimpleTabs.prototype);Object.extend(TabBar.prototype,{_tracking:false,initialize:function(B,A){SimpleTabs.prototype.initialize.call(this);this.name=B;this.current_id=(typeof (A)=="number"&&A>=0)?A:0;for(var C=0;tab=$(this.name+"-tab"+C);C++){this.tab_ids[C]=tab.id}this._tracking=false;this.setup();this._tracking=true},setState:function(F,E){SimpleTabs.prototype.setState.call(this,F,E);var A=this.panel(F);if(!A){return }if(E){A.style.display="block";if(this._tracking){var C=this.tab(F);var B=TrackingNode.collectData(C);if(typeof B.pageName=="undefined"||typeof B.module=="undefined"||typeof B.tabText=="undefined"){return }Tracking.resetVars();var D={events:"event13",hier4:TrackingNode.build_hierarchy([B.module[0],B.pageName[0],"tab",B.tabText[0]]),eVar12:[B.pageName[0],B.module[0]+" module",B.tabText[0]+" tab"].join("-")};Tracking.setData(D);s.tl(false,"o",D.eVar12);Tracking.resetVars()}}else{A.style.display="none"}},panel:function(A){return $(this.name+"-panel"+A)||false}});
/* /lib/shader.js */
var Shader={_opacity:0,_shade:null,initialize:function(){this._shade=document.createElement("div");this._shade.id="shade";this._shade.onclick=function(A){if(Window){Window.hide_all()}return cancelEvent(A)};if(l=document.getElementById("loading")){l.parentNode.insertBefore(this._shade,l)}else{document.body.appendChild(this._shade)}addEvent(window,"onresize",function(){Shader._shade.style.height=parseInt(document.body.offsetHeight)+"px"})},change:function(C,E,D){var D=D||function(){return };var B=Math.max(parseInt(E*0.015),1);var F=Animator.interpolate.linear(this._opacity,C,B);var A=new Animator(F,E);A.onupdate=function(G){Element.setOpacity(Shader._shade,G);Shader._opacity=G;return true};A.oncomplete=function(){if(Shader._opacity==0){Shader._shade.style.display="none";setAdVisibility(true);setCoverFlashVisibility(true);setVideoVisibility(true);setArticleFlashVisibility(true);if(Cover){Cover.run()}}D()};if(C!=0){setAdVisibility(false);setCoverFlashVisibility(true);setVideoVisibility(false);setArticleFlashVisibility(false);if(Cover){Cover.hold()}}window.onresize();this._shade.style.display="block";A.run()}};addLoadEvent(function(){Shader.initialize()});
/* /lib/window.js */
var Window=Class.create();Object.extend(Window.prototype,{initialize:function(A,B){this.onclose=function(){return true};this.onshow=function(){return };this.onhide=function(){return };this.show_window=function(){this.window.style.display="block"};this.hide_window=function(){this.window.style.display="none"};this.window=$(A);this.close=$(B);this.visible=false;if(this.close){this.close.onclick=(function(){if(this.onclose()){this.hide()}return false}).bind(this)}},_update_display:function(){if(Window.state=="shading"){Window.pending_windows.push(this);return }if(this.visible){this.show_window();this.onshow()}else{this.hide_window();this.onhide()}},set_display:function(A){if(this.visible==A){return }this.visible=A;if(this.visible&&Window.state=="inactive"){Window.state="shading";Shader.change(0.75,250,Window.shader_complete)}this._update_display();if(this.visible){Window.active_windows.push(this)}else{var B=this;Window.active_windows=Window.active_windows.reject(function(C){return C==B})}if(Window.active_windows.length==0){Window.state="inactive";Shader.change(0,250)}},show:function(){this.set_display(true)},hide:function(){this.set_display(false)}});Window.active_windows=[];Window.pending_windows=[];Window.state="inactive";Window.shader_complete=(function(){Window.state="active";this.pending_windows._each(function(A){A._update_display()});this.pending_windows=[];Window.state=Window.active_windows.length>0?"active":"inactive"}).bind(Window);Window.hide_all=function(){this.active_windows._each(function(A){A.hide()})};
/* /lib/handlers.js */
addLoadEvent(function(){var C=document.getElementsByTagName("a");for(var D=0;D<C.length;D++){assign_handlers(C[D])}var B=document.getElementsByTagName("form");var E=new RegExp("(^|\\s)newwindow(\\s|$)");for(var D=0,A=B.length;D<A;D++){if(!B[D].className.match(E)){continue}B[D].setAttribute("target","_blank")}});function assign_handlers(B){if(B.rel==""){return }var I="",K=B.rel;var G=[/^\s*(\w+)\((.*?)\)/,/^\s*(\w+)/];var D=[],F=[];while(K.length>0&&K!=I){var J,E=null;for(var C=0;C<G.length&&!E;C++){J=G[C];E=K.match(J)}I=K;K=K.replace(J,"");if(!E){continue}var A="handle_"+E[1];var H=E.length>2?E[2].split(/,\s*/):[];if(E.length>2&&E[2].match(/,$/)&&is_ie){H.push("")}if(typeof window[A]=="undefined"){continue}D.push(A);F.push(H)}delete G;delete K;if(D.length==0){return }B.onclick=function(M){var O=true;var M=window.event?window.event:M;for(var N=0;N<D.length;N++){var Q=D[N];M.ret_val=O;var P=[M].concat(F[N]);var L=window[Q].apply(B,P);if(typeof L!="undefined"){O=O&&L}}return O}}function handle_track(A,B){if(typeof s=="undefined"){return }if(A.ret_val==false){Tracking.resetVars();s.tl(this,"o",B)}}function handle_track_load(A,B){if(typeof s=="undefined"){return }Tracking.resetVars();s.tl(this,"o",B);document.location=this.href;return cancelEvent(A)}function handle_slideshow(A){A=A||window.event;var D=Event.findElement(A,"a");var E=D.getAttribute("href");var C=arguments[1]||0;var B=false;if(!E.match(/slideshow\/view/)){return true}if(arguments.length==3){B=arguments[1].split(".");C=arguments[2]||0}showOverlay(function(){return loadJS("modules/overlays/slideshow.js")?SlideshowWindow.create_window(C,"slideshow",B,E):false});return cancelEvent(A)}function handle_photooftheday(A){showOverlay(function(){return loadJS("modules/overlays/slideshow.js")?SlideshowWindow.create_window(0,"photooftheday"):false});return cancelEvent(A)}function handle_feedback(A){showOverlay(function(){return loadJS("modules/overlays/feedback.js")?FeedbackWindow.create_window():false});return cancelEvent(A)}function handle_adfeedback(A,D,B){A=A||window.event;var C=(A.srcElement)?A.srcElement:A.target;C=C.parentNode.parentNode;showOverlay(function(){return loadJS("modules/overlays/adfeedback.js")?AdFeedbackWindow.create_window(D,C):false});return cancelEvent(A)}function handle_emailthis(A){showOverlay(function(){return(loadJS("modules/overlays/emailthis.js"))?EmailthisWindow.create_window():false});return cancelEvent(A)}function handle_remoteapp(L,D,C,E,H,I,J,K,G,A,F){var B=this.id;if(A=="true"){B="dvrfirstuse"}showOverlay(function(){return loadJS("modules/overlays/remoteapp.js")?RemoteDVRWindow.create_window(B,D,C,E,H,I,J,K,G,F):false});return cancelEvent(L)}function handle_dvrnav(A){thetab=this.parentNode.id;RemoteDVRWindow.set_tabs(thetab)}function handle_onetimedetails(J,P,Q,D,L,A,E,R,B,G,F,O,N,K,H,C,I){therow=this.parentNode.id;allrows=jQuery(".listing-row");for(var M=0;M<allrows.length;M++){Element.removeClassName(allrows[M],"active");anchor=jQuery(allrows[M]).find("a.record-title")[0];jQuery(anchor).css("color","")}Element.addClassName(therow,"active");RemoteDVRWindow.onetimedetails(P,Q,D,L,A,E,R,B,G,F,O,N,K,H,C,I);return cancelEvent(J)}function handle_rdvraccordion(A){RemoteDVRWindow.rdvraccordion(this);return cancelEvent(A)}function handle_moreservices(A){toggleServices();return cancelTrackEvent(A)}function handle_dashboard(A){return toggleDashboard.call(this)?handle_track.call(this,A):cancelTrackEvent(A)}function handle_assistant(A){toggleAssistant();return cancelEvent(A)}var poppedCalendar=false;function handle_calendar(A){var B=$(this.className);if(B){if(Element.hasClassName(B,"poppedCal")){Element.removeClassName(B,"poppedCal")}else{hide_calendars();Element.addClassName(B,"poppedCal");poppedCalendar=B}addEvent(document.body,"onclick",hide_calendars)}return cancelEvent(A)}function hide_calendars(){if(poppedCalendar){Element.removeClassName(poppedCalendar,"poppedCal")}}var openDropDown=false;function handle_dropdown(A){var B=this;while(B.nodeName!="DL"&&B.nodeName!="BODY"){B=B.parentNode}if(B.nodeName=="DL"){if(Element.hasClassName(B,"open")){Element.removeClassName(B,"open")}else{Element.addClassName(B,"open");openDropDown=B}addEvent(document.body,"onclick",hide_dropdown);return cancelEvent(A)}}function hide_dropdown(){if(openDropDown){Element.removeClassName(openDropDown,"open")}}var defaultFeatures="scrollbars=no,status=no,location=no,toolbar=no,favorites=no,address=no,menubar=no,resizable=yes";var fanFeatures=defaultFeatures+",width=930,height=800";var askFeatures="scrollbars=yes,status=yes,location=no,toolbar=no,favorites=no,address=no,menubar=no,resizable=yes,width=480,height=451";var chatFeatures=defaultFeatures+",width=800,height=600,status=yes,toolbar=yes,scrollbars=yes";var radioFeatures="status=no,resizeable=no,scrollbars=no,toolbar=no,menubar=no,hotkeys=no,width=270,height=395";function handle_fan(A){if(hasRightVersion){window.open(this.href,"fan",fanFeatures);return cancelEvent(A)}else{document.location.href="http://www.comcast.net/flash/"}}function handle_ask(A){window.open(this.href,"ask",askFeatures);return cancelEvent(A)}function handle_chat(A){window.open(this.href,"chat",chatFeatures);return cancelEvent(A)}function handle_radio(A){window.open(this.href,"radio",radioFeatures);return cancelEvent(A)}function handle_external(){this.setAttribute("target","_blank")}function handle_signin(){newhref=this.getAttribute("href")+"?redirectUrl="+document.location;this.setAttribute("href",newhref)}function handle_signout(){deleteCookie("bunchball");newhref=this.getAttribute("href")+"?redirectUrl="+document.location;this.setAttribute("href",newhref)}function handle_email(){this.setAttribute("target","_blank")}function handle_print(A){this.setAttribute("target","_blank")}function handle_abcnewsnow(A){window.open(this.href,"abcnewsnow",defaultFeatures+",width=521,height=520");return cancelTrackEvent(A)}function handle_yahooNhlPlayer(A){window.open(this.href,"yahooNhlPlayer",defaultFeatures+",width=792,height=666");return cancelEvent(A)}function handle_hdcarousel(A,D,B){var C=getFlashMovie("inlineplayer");if(C){C.updateContent(D,B);easyScrollTo(0,172,500);return cancelEvent(A)}return true}function getFlashMovie(B){var A=navigator.appName.indexOf("Microsoft")!=-1;return(A)?window[B]:document[B]}function handle_rhapsody(A,B){if(typeof RhapsodyPlayer=="undefined"){return true}if(typeof B=="undefined"){B=(document.location.hash+"").split("#")[1]}RhapsodyPlayer.playRcid(B);return cancelEvent(A)}function handle_sethomepage(A){if(is_ie){this.setHomePage("http://www.comcast.net");return cancelEvent(A)}if(is_safari){location.href="/sethomesafari/";return cancelEvent(A)}toggle_hp(this.parentNode);return cancelEvent(A)}function toggle_hp(A,B){if(typeof B=="undefined"){B=Element.hasClassName(A,"active")}$(A.id+"-container").style.display=B?"none":"block";A.className=B?"":"active"}addLoadEvent(function(){var B=document.getElementsByTagName("a");for(var C=0;C<B.length;C++){if(B[C].rel&&B[C].rel.indexOf("sethomepage")!=-1){var A=B[C].parentNode.id+"-container";A.onclick=function(D){cancelTrackEvent(D);return true};addEvent(document.body,"onclick",toggle_hp.bind(document.body,B[C].parentNode,true))}}});function handle_set_grid_exact_time(A,B){console.log(B);if(B=="NOW"){B=(new Date()).getTime()}tvGrid.build_grid(B);return cancelEvent(A)}function handle_set_grid_time(B,A){console.log(A);tvGrid.time_update_grid(A);return cancelEvent(B)}function handle_set_grid_filter(A,C){var D=(A.srcElement)?A.srcElement:A.target;console.log(C);if(C.toLowerCase()=="all"||C==tvGrid.filter){jQuery("#gridfilter-capsule dd a:not(#gridfilter-all)").parent().removeClass("active");jQuery(D).parent().addClass("active");tvGrid.filter_update_grid(C);if(C.toLowerCase()=="all"){return cancelEvent(A)}}else{jQuery("#gridfilter-capsule dd a").parent().removeClass("active");jQuery("#gridfilter-capsule dd a:not(#gridfilter-all)").each(function(){var F=jQuery(this).attr("title");F=F.replace("Deactivate","Activate");jQuery(this).attr("title",F)})}var E=jQuery(D).attr("title");var B="Ac";if(E.match(/^Activate\b/)){B="Deac"}E=E.replace(/^(Ac|Deac)(?=tivate\b)/,B);jQuery(D).attr("title",E);jQuery(D).parent().toggleClass("active");if(C!="ALL"){if(jQuery(D).parent().hasClass("active")){jQuery("#gridfilter-all").parent().removeClass("active")}else{jQuery("#gridfilter-all").parent().addClass("active")}}tvGrid.filter_update_grid(C);return cancelEvent(A)}function closePlaxoShare(A){Element.removeClassName(A.parentNode,"poppedShare")}function handle_plaxoshare(A){closePlaxoShare(this);var B=basicGetPortalData();if(B){shareWidget.openPopup(true);return cancelEvent(A)}else{this.setAttribute("target","_blank");this.setAttribute("href",this.getAttribute("anonHref"))}}function handle_closeplaxoshare(A){closePlaxoShare(this);return cancelEvent(A)};
/* /lib/manglers.js */
addLoadEvent(function(){var B=document.getElementsByTagName("a");for(var C=0;C<B.length;C++){mangle_link(B[C])}var A=document.getElementsByTagName("form");for(var C=0;C<A.length;C++){mangle_form(A[C])}});function mangle_link(C){if(typeof C.href!="undefined"){var A=C.href;for(var B=0;B<Mangler.list.length;B++){A=Mangler.list[B].apply(A)}C.href=A}}function mangle_form(B){if(typeof B.action!="undefined"){var C=B.action;for(var A=0;A<Mangler.list.length;A++){C=Mangler.list[A].apply(C)}B.action=C}}var Mangler=Class.create();Object.extend(Mangler.prototype,{initialize:function(A,B){this.re=A;this.func=B;Mangler.list.push(this)},apply:function(A){var A=A+"";return this.re.test(A)?this.func(A):A}});Mangler.list=[];new Mangler({re:/:\/\/(www.)?fancast.com/,test:function(A){return readCookie("session@comcast.net")!==null&&this.re.test(A)}},function(A){if(document.config.fancastSSO==""){return A}var B=A.match(/https?:\/\/(.*?)(\/.*)/);if(!B){return A}return document.config.fancastSSO+"&TARGET="+encodeURI(B[2])});new Mangler(/\/(music|entertainment|sports|finance|tv|news)\/.*?\/slideshow\/view/,function(A){var B=A.match(/\/((music|entertainment|sports|finance|tv|news)\/.*)\/slideshow\/view/);return"/slideshow/"+B[1].replace(/\//g,"-")+"/"});
/* /lib/flash.js */
var flash2Installed=false;var flash3Installed=false;var flash4Installed=false;var flash5Installed=false;var flash6Installed=false;var flash7Installed=false;var flash8Installed=false;var flash9Installed=false;var maxVersion=9;var actualVersion=0;var requiredVersion=7;var hasRightVersion=false;var jsVersion=1;var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;jsVersion=1.1;if(isIE&&isWin){document.write('<SCRIPT LANGUAGE="VBScript"> \n');document.write("on error resume next \n");document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');document.write("</SCRIPT> \n")}function detectFlash(){if(navigator.plugins){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var isVersion2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+isVersion2].description;var flashVersion=parseInt(flashDescription.substring(16));flash2Installed=flashVersion==2;flash3Installed=flashVersion==3;flash4Installed=flashVersion==4;flash5Installed=flashVersion==5;flash6Installed=flashVersion==6;flash7Installed=flashVersion==7;flash8Installed=flashVersion==8;flash9Installed=flashVersion>=9}}for(var i=2;i<=maxVersion;i++){if(eval("flash"+i+"Installed")==true){actualVersion=i}}if(navigator.userAgent.indexOf("WebTV")!=-1){actualVersion=4}if(actualVersion<requiredVersion){}else{hasRightVersion=true}}function writeFlash(C,D,E,A,B,F){B=(B==null)?"#FFFFFF":B;F=(F==null)?"opaque":F;document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' id='"+C+"' width='"+E+"' height='"+A+"'>");document.write('  <param name="allowScriptAccess" value="sameDomain" />');document.write("  <param name='movie' value='"+D+"'>");document.write("  <param name='wmode' value='"+F+"'>");document.write("  <param name='quality' value='high'>");document.write("  <param name='bgcolor' value='"+B+"'>");document.write("  <param name='menu' value='false'>");document.write("  <embed src='"+D+"' bgcolor='"+B+"' name='"+C+"' width='"+E+"' height='"+A+"' wmode='"+F+"' quality='high' menu='false' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>");document.write("</object>")}detectFlash();
/* /lib/prefs.js */
PrefStore={no_value:"No Value",not_implemented:"Not Implemented",commit:function(){throw this.not_implemented},get:function(A){throw this.not_implemented},set:function(A,B){throw this.not_implemented},remove:function(A){throw this.not_implemented}};CookieStore=Object.compose({},PrefStore,{_name:null,_longevity:null,_buffer:null,_read_cookie:function(){if(this._buffer!=null){return }var A=readCookie(this._name)||"";this._buffer=$H(A.split("&").inject({},function(D,C){var B=C.split("=");D[B[0]]=unescape(B[1]);return D}))},_write_cookie:function(){if(this._buffer==null){return }var A=this._buffer.collect(function(B){if(B.key==""){throw $continue}return[B.key,escape(B.value)].join("=")}).join("&");createCookie(this._name,A,this._longevity)},commit:function(){this._write_cookie();this._buffer=null},get:function(A){this._read_cookie();if(!this._buffer.keys().include(A)){throw this.no_value}return this._buffer[A]},set:function(A,B){this._read_cookie();this._buffer[A]=B},remove:function(A){this._read_cookie();this._buffer=this._buffer.reject(function(B){return B.key==A})}});PersistentCookieStore=Object.compose({},CookieStore,{_name:"prefs",_longevity:1000});SessionCookieStore=Object.compose({},CookieStore,{_name:"session_prefs",_longevity:null});ServerStore=Object.compose({},PrefStore,{commit:function(){PersistentCookieStore.commit()},get:function(A){PersistentCookieStore.get(A)},set:function(A,B){PersistentCookieStore.set(A,B)},remove:function(A){PersistentCookieStore.remove(A)}});Prefs={COOKIE:"persistent",SESSION_COOKIE:"session",SERVER:"server",_stores:{persistent:PersistentCookieStore,session:SessionCookieStore,server:ServerStore},_default_location:"persistent",_search_order:["persistent","session","server"],commit:function(){for(var B=0;B<this._search_order.length;B++){var A=this._search_order[B];this._stores[A].commit()}},get:function(name,fallback){var value;for(var i=0;i<this._search_order.length&&!value;i++){try{var location=this._search_order[i];value=this._stores[location].get(name)}catch(e){if(e!=PrefStore.no_value){throw e}}}if(value){try{return eval("("+value+")")}catch(e){}}return fallback},set:function(B,C,A){var A=A||this._default_location;var C=C.inspect?C.inspect():(C+"");this._stores[A].set(B,C);this.commit()},remove:function(B,A){var A=A||this._default_location;this._stores[A].remove(B);this.commit()},lockout:function(C){var A=this.set;this.set=function(){};try{C()}catch(B){this.set=A;throw B}this.set=A},bundle:function(C){var A=this.commit;this.commit=function(){};try{C()}catch(B){this.commit=A;this.commit();throw B}this.commit=A;this.commit()}};
/* /lib/authcookie.js */
if(!(rc("MYPORTAL"))){if(rc("edata")){deleteCookie("edata")}if(rc("xedata")){deleteCookie("xedata")}}function rc(C){var F=C+"=",B=document.cookie.split(";"),E=/\s*(.*)/,D,G,A;for(D=0,A=B.length;D<A;D++){G=B[D].match(E)[1];if(G.indexOf(F)==0){return G.substring(F.length,G.length)}}return null}function dc(A){createCookie(A,"",-1)}function basicGetPortalData(){var G=false;var D=["guid","zip","gt","em"];var F=(document.cookie||"").match(/\s*MYPORTAL=([^;]*);?/);if(F){var G={},E=F[1].split("&");for(var C=0,A=E.length;C<A;C++){var B=E[C].split("=");B[1]=B[1].replace(/\+/g," ");G[B[0]]=unescape(B[1])}Prefs.bundle(function(){D.each(function(I){if(G[I]){Prefs.set("portal."+I,G[I],Prefs.SERVER)}})})}else{var H=(document.cookie||"").match(/\s*session@comcast.net=([^;]*);?/);if(H){var G={};D.each(function(I){G[I]=Prefs.get("portal."+I,"")})}}return G}function getPortalData(){var A=basicGetPortalData();return(window.getPortalData=function(){return A})()}if(!getPortalData()){deleteCookie("edata");deleteCookie("xedata");deleteCookie("entitlementPageViewCount")}function isPrimary(){var is_primary=false;var req=new Ajax.Request("/user/authkey/checkaccount/",{method:"get",asynchronous:false});if(req.responseIsSuccess()){try{var json=stripComments(req.transport.responseText);var data=eval("("+json+")");is_primary=data.is_primary}catch(e){}}return(this.isPrimary=function(){return is_primary})()}function getAuthKey(){var authkey=Prefs.get("authkey","");if(authkey==""){var req=new Ajax.Request("/user/authkey/",{method:"get",parameters:Ajax.parameters({ts:parseInt((new Date).getTime()/1000)}),asynchronous:false});if(req.responseIsSuccess()){try{var json=req.transport.responseText.replace("/*","").replace("*/","");var data=eval("("+json+")");authkey=data.authkey}catch(e){}}}if(authkey!=""){Prefs.set("authkey",authkey,Prefs.SESSION_COOKIE);return(this.getAuthKey=function(){return authkey})()}return""};
/* /lib/widgets/widgets_core.js */
var Widgets={updateLabelClass:function(A){var A=$(A);var C=Array(Array("checkbox","checkbox-small","radio","radio-small"),Array("hover","default"),Array("checked","unchecked"));var B=C.collect(function(){return 0});var D=C.length;while(!B[D]){var E=C.collect(function(G,F){return G[B[F]]});Element.removeClassName(A,E.join("-"));B[0]++;B.each(function(G,F){if(F==D||G<C[F].length){throw $continue}B[F]=0;B[F+1]=(B[F+1]||0)+1})}var E=C.collect(function(F){return F.find(function(G){return Element.hasClassName(A,G)})});if(Element.hasClassName(A,"disabled")){E[1]="default"}Element.addClassName(A,E.join("-"))},getLabelForControl:function(A){var C=$(A).id;var B=$(A).parentNode.getElementsByTagName("label");return $A(B).find(function(D){return C==D.htmlFor})},build:function(A){var B=document.getElementsByClassName("widget",$(A));$A(B)._each(function(G){var F=G.getElementsByTagName("button");$A(F)._each(function(H){loadJS("lib/widgets/button.js");new Button(H)});var D=G.getElementsByTagName("input");$A(D)._each(function(H){switch(H.type){case"checkbox":if(Element.hasClassName(H,"fancy-checkbox")){loadJS("lib/widgets/check_box.js");new CheckBox(H)}break;case"radio":if(Element.hasClassName(H,"fancy-radio")){loadJS("lib/widgets/radio_button.js");new RadioButton(H)}else{H.onclick=function(){if(typeof RadioButton!="undefined"){RadioButton.clearGroup(this.name)}}}break;case"text":loadJS("lib/widgets/text_field.js");new TextField(H);break}});var C=G.getElementsByTagName("textarea");if(C.length>0){loadJS("lib/widgets/text_area.js")}$A(C)._each(function(H){new TextArea(H)});var E=G.getElementsByTagName("select");if(E.length>0){loadJS("lib/widgets/select_list.js")}$A(E)._each(function(H){if(!Element.hasClassName(H,"standard")){new SelectList(H)}});if(Element.hasClassName(G,"dropdown")){loadJS("lib/widgets/drop_down.js");new DropDown(G)}})}};addLoadEvent(function(){loadJS("lib/prototype/dom.js");Widgets.build(document)});
/* /lib/widgets/button.js */
var Button=Class.create();Object.extend(Button.prototype,{handlers:{mouseover:function(){Element.addClassName(this.element,"hover");if(this.mousedown){Element.addClassName(this.element,"active")}},mouseout:function(){if(!this.focused){Element.removeClassName(this.element,"hover")}Element.removeClassName(this.element,"active")},mousedown:function(){this.mousedown=true;Element.removeClassName(this.element,"active")},mouseup:function(){this.mousedown=false;Element.removeClassName(this.element,"active")},focus:function(){this.focused=true;this.handlers.mouseover.call(this)},blur:function(){this.focused=false;this.mousedown=false;this.handlers.mouseout.call(this)}},initialize:function(A){this.element=$(A);this.element.proxy=this;this.focused=false;this.mousedown=false;this.element.onmouesover=this.handlers.mouseover.bind(this);this.element.onmouseout=this.handlers.mouseout.bind(this);this.element.onmousedown=this.handlers.mousedown.bind(this);this.element.onmouseup=this.handlers.mouseup.bind(this);this.element.onfocus=this.handlers.focus.bind(this);this.element.onblur=this.handlers.blur.bind(this)}});
/* /lib/widgets/text_field.js */
var TextField=Class.create();TextField.STATUS_DEFAULT="default";TextField.STATUS_FAILED="failed";TextField.STATUS_PASSED="passed";Object.extend(TextField.prototype,{handlers:{focus:function(){this.inputParent.className="focus";if(this.unchanged&&this.origValue!=""){this.element.value=""}this.focusValue=this.element.value},blur:function(){this.inputParent.className=this.status;this.unchanged=(this.focusValue==this.element.value)?true:false;if(this.unchanged&&this.origValue!=""){this.element.value=this.origValue}},keypress:function(A){var A=A||window.event;if(A.keyCode!=9&&A.keyCode!=25){this.unchanged=false}}},initialize:function(A){this.element=$(A);this.element.proxy=this;this.inputParent=this.element.parentNode;this.origValue=this.element.value;this.focusValue=this.origValue;this.unchanged=true;this.status="default";this.element.onfocus=this.handlers.focus.bind(this);this.element.onblur=this.handlers.blur.bind(this);this.element.onkeypress=this.handlers.keypress.bind(this)},set_status:function(A){this.status=A;if(this.inputParent.className!="focus"){this.inputParent.className=this.status}}});
/* /lib/widgets/check_box.js */
var CheckBox=Class.create();Object.extend(CheckBox.prototype,{handlers:{mouseover:function(){Element.addClassName(this.label,"hover");Element.removeClassName(this.label,"default");Widgets.updateLabelClass(this.label)},mouseout:function(){if(this.focused){return }Element.addClassName(this.label,"default");Element.removeClassName(this.label,"hover");Widgets.updateLabelClass(this.label)},click:function(){if(this.disabled){return }this.status=!this.status;this.updateDisplay();window.setTimeout((function(){this.element.checked=this.status}).bind(this),10)},focus:function(){this.focused=true;this.handlers.mouseover.call(this)},blur:function(){this.focused=false;this.handlers.mouseout.call(this)},keypress:function(A){if((window.event?window.event.keyCode:A.which)!=32){return }if(this.disabled){return }this.status=!this.element.checked;this.updateDisplay()}},initialize:function(B){this.element=$(B);this.element.proxy=this;this.label=Widgets.getLabelForControl(this.element);this.status=this.element.checked;this.disabled=this.element.disabled;this.focused=false;var A=Element.hasClassName(this.element,"checkbox-small")?"checkbox-small":"checkbox";Element.addClassName(this.label,A);Element.addClassName(this.label,"default");Element.addClassName(this.label,this.status?"checked":"unchecked");Widgets.updateLabelClass(this.label);this.label.onmouseover=this.handlers.mouseover.bind(this);this.label.onmouseout=this.handlers.mouseout.bind(this);this.label.onclick=this.handlers.click.bind(this);this.element.onfocus=this.handlers.focus.bind(this);this.element.onblur=this.handlers.blur.bind(this);this.element.onkeypress=this.handlers.keypress.bind(this)},updateDisplay:function(){Element.addClassName(this.label,this.status?"checked":"unchecked");Element.removeClassName(this.label,this.status?"unchecked":"checked");Widgets.updateLabelClass(this.label)},setStatus:function(A){this.element.checked=this.status=A;this.updateDisplay()},setDisabled:function(A){this.element.disabled=this.disabled=A;Element[A?"addClassName":"removeClassName"](this.label,"disabled");this.updateDisplay()}});
/* /lib/widgets/select_list.js */
var SelectList=Class.create();SelectList.blur_current=function(){if(SelectList.focused){SelectList.focused.element.blur()}};Object.extend(SelectList.prototype,{handlers:{mouseover:function(){Element.addClassName(this.container,this.classPrefix+"hover");Element.addClassName(this.container,"hover")},mouseout:function(){if(!this.focused){Element.removeClassName(this.container,this.classPrefix+"hover");Element.removeClassName(this.container,"hover")}},item_mouseover:function(A){this.clear_selected(A)},item_mouseout:function(){this.clear_selected()},mousedown:function(){this.mousedown=true},mouseup:function(){this.mousedown=false},trigger_mousedown:function(){this.handlers.mousedown.call(this);Element.addClassName(this.container,this.classPrefix+"active");Element.addClassName(this.ctonainer,"active")},trigger_mouseup:function(){if(this.mousedown){window.setTimeout((function(){this.handlers.mouseup.call(this);Element.removeClassName(this.container,this.classPrefix+"active");Element.removeClassName(this.continaer,"active");this.toggle();this.element.focus()}).bind(this),10)}},click:function(A){this.select(A);this.collapse();this.element.focus()},focus:function(){if(this.blur_timeout){window.clearTimeout(this.blur_timeout);this.blur_timeout=null}SelectList.focused=this;this.focused=true;this.handlers.mouseover.call(this)},blur:function(){this.blur_timeout=window.setTimeout((function(){if(this.mousedown){return }this.collapse();this.focused=false;this.handlers.mouseout.call(this);if(SelectList.focused==this){SelectList.focused=null}}).bind(this),10)},keyup:function(A){A=window.event?window.event:A;if(A.keyCode==this.ignore_keycode){return }switch(A.keyCode){case 38:if(A.altKey){this.toggle()}else{this.select(this.selected_index-1)}break;case 40:if(A.altKey){this.toggle()}else{this.select(this.selected_index+1)}break;case 33:this.select(0);break;case 34:this.select(this.element.options.length-1);break;case 32:this.toggle();break;case 27:this.collapse();break;default:var D=String.fromCharCode(A.keyCode);var B=this.selected_index;for(var C=0;C<this.item_keys.length;C++){B=(B+1)%this.item_keys.length;if(this.item_keys[B]!=D){continue}this.select(B);break}break}this.ignore_keycode=A.keyCode;window.setTimeout((function(){this.ignore_keycode=-1}).bind(this),10)},keypress:function(A){A=window.event?window.event:A;A.cancelBubble=(A.keyCode!=9&&A.keyCode!=25);if(A.cancelBubble&&A.preventDefault){A.preventDefault()}return !(A.returnVal=A.cancelBubble)},nav_up_mousedown:function(){this.mousedown=true;this.scroll_list(25)},nav_up_mouseup:function(){this.mousedown=false;this.scroll_list(0);this.element.focus()},nav_down_mousedown:function(){this.mousedown=true;this.scroll_list(-25)},nav_down_mouseup:function(){this.mousedown=false;this.scroll_list(0);this.element.focus()}},initialize:function(D){this.element=$(D);this.element.proxy=this;this.label=document.createTextNode("");this.list_items=Array();this.item_keys=Array();this.focused=false;this.mousedown=false;this.selected_index=-1;this.ignore_keycode=-1;var I=document.createElement("a");I.appendChild(this.label);var H=document.createElement("b");H.appendChild(I);var B=document.createElement("dt");B.appendChild(H);B.onmouseover=this.handlers.mouseover.bind(this);B.onmouseout=this.handlers.mouseout.bind(this);B.onmousedown=this.handlers.trigger_mousedown.bind(this);B.onmouseup=this.handlers.trigger_mouseup.bind(this);var G=document.createElement("ul");var J=document.createElement("dd");J.appendChild(G);var C=document.createElement("div");C.className="select-nav-up";var E=document.createElement("b");E.innerHTML="Up";C.onmousedown=this.handlers.nav_up_mousedown.bind(this);C.onmouseup=this.handlers.nav_up_mouseup.bind(this);C.appendChild(E);J.appendChild(C);var A=document.createElement("div");A.className="select-nav-down";var F=document.createElement("b");F.innerHTML="Down";A.onmousedown=this.handlers.nav_down_mousedown.bind(this);A.onmouseup=this.handlers.nav_down_mouseup.bind(this);A.appendChild(F);J.appendChild(A);Array("ul","ur","lr","ll").each(function(K){var L=document.createElement("i");L.className=K;J.appendChild(L)});this.container=document.createElement("dl");this.container.className="select "+D.className;this.classPrefix="";if(Element.hasClassName(this.container,"small")){Element.addClassName(this.container,"select-small");this.classPrefix="select-small-"}Element.addClassName(this.container,this.classPrefix+"default");Element.addClassName(this.container,"default");this.container.appendChild(B);this.container.appendChild(J);this.item_list=G;this.item_list_container=J;this.scroll_offset=0;this.scroll_timer=null;this.element.parentNode.insertBefore(this.container,this.element.nextSibling);this.element.onfocus=this.handlers.focus.bind(this);this.element.onblur=this.handlers.blur.bind(this);this.element.onkeyup=this.handlers.keyup.bind(this);this.element.onkeypress=this.handlers.keypress.bind(this);this.init_list()},init_list:function(){var F=this.container.getElementsByTagName("ul")[0];while(F.childNodes.length>0){F.removeChild(F.firstChild)}this.list_items=[];this.item_keys=[];for(var E=0;E<this.element.options.length;E++){var D=this.element.options[E];var B=document.createElement("b");B.appendChild(document.createTextNode(D.text));var C=document.createElement("a");C.appendChild(B);C.onclick=this.handlers.click.bind(this,E);C.onmouseover=this.handlers.item_mouseover.bind(this,E);C.onmouseout=this.handlers.item_mouseout.bind(this);C.onmousedown=this.handlers.mousedown.bind(this);C.onmouseup=this.handlers.mouseup.bind(this);var A=document.createElement("li");A.appendChild(C);F.appendChild(A);this.list_items.push(A);this.item_keys.push(D.text.charAt(0).toUpperCase());if(D.selected){this.select(E)}}if(this.selected_index==-1){this.select(0)}else{this.select(this.selected_index)}},scroll_list:function(A){if(this.container_bounds.length==0||this.list_bounds.length==0){this.find_boundaries()}this.scroll_offset+=A;this.scroll_offset=Math.min(0,this.scroll_offset);this.scroll_offset=Math.max(this.container_bounds[1]-this.list_bounds[1],this.scroll_offset);this.item_list.style.marginTop=this.scroll_offset+"px";if(A!=0){if(this.scroll_timer){window.clearTimeout(this.scroll_timer)}this.scroll_timer=window.setTimeout(this.scroll_list.bind(this,A),10)}else{window.clearTimeout(this.scroll_timer);this.scroll_timer=null}},find_boundaries:function(){this.container_bounds=[Element.getPosition(this.item_list_container).y];this.container_bounds[1]=this.container_bounds[0]+Element.getDimensions(this.item_list_container).height;var A=this.item_list.getElementsByTagName("li");var B=Element.getDimensions(A[0]).height;var C=A.length*B+3;this.list_bounds=[Element.getPosition(this.item_list).y];this.list_bounds[1]=this.list_bounds[0]+C;if(this.item_list_container.className=="oversized"){this.list_bounds[1]+=18}},expanded:function(){return Element.hasClassName(this.container,this.classPrefix+"open")},expand:function(){if(this.expanded()){return }Element.addClassName(this.container,this.classPrefix+"open");Element.addClassName(this.container,"open");this.clear_selected(this.selected_index);if(this.element.onexpand){this.element.onexpand.call(this.element)}var A=999999;this.container.style.zIndex=A;var B=this.container.parentNode;while(B){A-=1;if(B.style){B.style.zIndex=A}B=B.parentNode}this.scroll_offset=0;this.item_list.style.marginTop=0;this.find_boundaries();if(this.list_bounds[1]-this.list_bounds[0]>300){this.item_list_container.className="oversized";this.container_bounds=[];this.list_bounds=[]}else{this.item_list_container.className=""}this.container_bounds=[]},collapse:function(){if(!this.expanded()){return }Element.removeClassName(this.container,this.classPrefix+"open");Element.removeClassName(this.container,"open");var A=this.container;while(A){if(A.style){A.style.zIndex=""}A=A.parentNode}if(this.element.oncollapse){this.element.oncollapse.call(this.element)}},toggle:function(){this[this.expanded()?"collapse":"expand"]()},select:function(A,C){if(A<0){return }if(A>=this.element.options.length){return }this.selected_index=A;var B=this.element.options[A];this.label.replaceData(0,this.label.length,B.text);if(!C){this.element.value=B.value;if(this.element.onchange){this.element.onchange.call(this.element)}}if(this.expanded()){this.scroll_offset=-28*A;this.scroll_list(0)}this.clear_selected(A)},clear_selected:function(A){this.list_items.each(function(D,C){var B=D.getElementsByTagName("a")[0];Element[(C==A)?"addClassName":"removeClassName"](B,"hover")})}});
/* /lib/migcookie.js */
function isMigrated(){return true}if(getPortalData()){var userIsMigrated=isMigrated()};
/* /lib/mctunnel.js */
if(typeof deconcept=="undefined"){alert("SWFObject is required.")}var McTunnel={swf:null,setSWF:function(A){this.swf=A},isLoaded:function(){}};McTunnel.Callback={};McTunnel.Manager=function(){return this.getInstance.apply(this)};McTunnel.Manager._instance=null;Object.extend(McTunnel.Manager.prototype,{_queue:[],proxy:null,getInstance:function(){if(!McTunnel.Manager._instance){this.initialize();McTunnel.Manager._instance=this}return McTunnel.Manager._instance},initialize:function(){if(McTunnel.swf==null){return }var B=new SWFObject(McTunnel.swf,"McTunnelManager","1","1","9","transparent");B.addParam("allowScriptAccess","always");var C=document.createElement("div");C.setAttribute("id","McTunnelManagerContainer");C.style.width="1px";C.style.height="0px";C.style.overflow="hidden";document.body.appendChild(C);B.write("McTunnelManagerContainer");var A=this;setTimeout(function(){A.checkLoaded()},50)},runQueue:function(){var A=this;if(this._queue.length){this._queue.invoke("apply",A)}},checkLoaded:function(){if($("McTunnelManager")&&typeof ($("McTunnelManager").create)=="function"){this.proxy=$("McTunnelManager");this.runQueue();return true}var A=this;setTimeout(function(){A.checkLoaded()},50);return false},create:function(C,B,E,A){if(!this.proxy){this._queue.push(function(){this.create(C,B,E,A)});return }try{this.proxy.create(C,B,E,A)}catch(D){console.log(D)}},setVariable:function(A,B,C){if(!this.proxy){this._queue.push(function(){this.setVariable(A,B,C)});return }this.proxy.addVariable(A,B,C)},send:function(B){var A=this;if(!this.proxy){this._queue.push(function(){this.send(B)});return }try{this.proxy.send(B)}catch(C){console.log(C)}}});McTunnel.Request=Class.create();Object.extend(McTunnel.Request.prototype,{initialize:function(name,url,callback){var responseType=arguments[3]||"xml";this.name=name;McTunnel.Callback[name]=function(json){eval("var obj = "+json);callback(obj)};this.manager=new McTunnel.Manager();this.manager.create(name,url,"McTunnel.Callback."+name,responseType)},setVariable:function(A,B){this.manager.setVariable(this.name,A,B)},send:function(){this.manager.send(this.name)}});McTunnel.setSWF("/ui/swf/McTunnelManager.swf");
/* /modules/articlelist.js */
var ArticleListTabs=Class.create();Object.extend(ArticleListTabs.prototype,TabBar.prototype);Object.extend(ArticleListTabs.prototype,{tab_name:function(A){return A&&decodeURI(A.getElementsByTagName("a")[0].href.split("#")[1])},tab_list:function(){var D=[];for(var B=0,A=this.tab_ids.length;B<A;B++){var C=$(this.tab_ids[B]);D.push(this.tab_name(C))}return D},set_enabled:function(A){for(var E=0,B=this.tab_ids.length;E<B;E++){var F=$(this.tab_ids[E]);var D=this.tab_name(F);var C=$A(A).detect(function(G){return D==G});Element[C?"addClassName":"removeClassName"](F,"enabled")}},select_tab:function(B){for(var C=0,A=this.tab_ids.length;C<A;C++){var D=$(this.tab_ids[C]);if(this.tab_name(D)==B){this.update(C)}}}});var ArticleList={initialize:function(A){this.tabs=A;if(this.prefs=$("articlelist-prefs")){this.check_list=$A(this.prefs.getElementsByTagName("ul")[0].getElementsByTagName("input"))}},show_prefs:function(){var B=Prefs.get("articlelist.enabled_tabs",[]);var A=Prefs.get("articlelist.default_tab","");this.set_checks(B);this.set_default(A);this.prefs.style.display="block"},hide_prefs:function(){this.prefs.style.display="none"},save_prefs:function(){var B=[];var A="";this.check_list.each(function(C){if(Element.hasClassName(C.proxy.label,"default-tab")){A=C.value}if(C.proxy.status){B.push(C.value)}});if(B.length==0){throw"You must choose at least one category."}this.enact_prefs(B,A)},enact_prefs:function(B,A){Prefs.bundle(function(){Prefs.set("articlelist.enabled_tabs",B,Prefs.SERVER);Prefs.set("articlelist.default_tab",A,Prefs.SERVER)});this.tabs.set_enabled(B);this.tabs.select_tab(A)},set_default:function(A){this.check_list.each(function(B){if(B.proxy.status&&B.value==A){Element.addClassName(B.proxy.label,"default-tab")}else{Element.removeClassName(B.proxy.label,"default-tab")}});this.force_default()},set_checks:function(A){this.check_list.each(function(C){var D=false;for(var E=0,B=A.length;E<B;E++){if(C.value==A[E]){D=true}}C.proxy.setStatus(D)});this.limit_selection()},force_default:function(){var C=false;this.check_list.each(function(D){if(D.proxy.status&&Element.hasClassName(D.proxy.label,"default-tab")){C=true}});if(C){return }for(var B=0,A=this.check_list.length;B<A;B++){if(this.check_list[B].proxy.status){this.set_default(this.check_list[B].value);return }}},limit_selection:function(){var A=0;this.check_list.each(function(B){if(B.proxy.status){A++}});if(A==5){this.check_list.each(function(B){if(!B.proxy.status){B.proxy.setDisabled(true)}})}else{this.check_list.each(function(B){B.proxy.setDisabled(false)})}}};addLoadEvent(function(){loadJS("lib/tabs.js");var A=$("articlecategories-container");if(A){for(var E=0;E<A.childNodes.length;E++){if(A.childNodes[E].nodeType!=1){continue}new TabBar(A.childNodes[E].id)}}new TabBar("mostpopular");var H=new ArticleListTabs("articlelist");H.onchange=function(O){var N=this.tab(O),M=this.panel(O);if(!N||!M){return false}var K=this.tab_name(N);var L=M.getElementsByTagName("div")[0].className;if(L=="success"){return true}new Ajax.Request("./articlelist/"+K+"/",{method:"GET",onSuccess:function(T){M.innerHTML=T.responseText;var Q=M.getElementsByTagName("span");$A(Q).each(function(V){if(V.className=="timestamp"){var W=$A(V.childNodes).detect(function(X){return X.nodeType==8}).nodeValue;var U=$A(V.childNodes).detect(function(X){return X.nodeType==3}).nodeValue;V.innerHTML=elapsedTimestamp(W,U)}});var S=$("articlelist").getElementsByTagName("i");for(var P=0;P<S.length;P++){var R=S[P].className;S[P].className="";S[P].className=R}},onError:function(){var P=document.createElement("div");P.className="error";P.innerHTML="Unable to retrieve article list";M.innerHTML="";M.appendChild(P)}});return true};H._tracking=false;var C=$("articlelist-change-prefs");if(C){C.onclick=function(K){ArticleList.show_prefs();return cancelEvent(K)};if(Prefs.get("articlelist.changed_prefs",0)==1){C.innerHTML="Edit Preferences"}C.style.display="inline"}else{if(document.body.id=="smartzone-module"){H._tracking=false;var F=0;for(var E=0;tab=H.tab(E);E++){if(Element.hasClassName(tab,"default")){F=E}}H.update(F);return }else{H.update(0);H._tracking=true;return }}ArticleList.initialize(H);var G=H.tab_list();var D=Prefs.get("articlelist.enabled_tabs",[]);var J=false;for(var E=0;E<D.length;E++){if($A(G).detect(function(K){return K==D[E]})){J=true;break}}if(D.length==0||!J){D=[G[0],G[1],G[2],G[3],G[4]]}var I=Prefs.get("articlelist.default_tab","");if(!D.detect(function(K){return K==I})){I=D[0]}var B=true;for(var E=0;E<D.length;E++){if(I==D[E]){B=false}}if(B){I=D[0]}ArticleList.enact_prefs(D,I);$("articlelist-prefs-close").onclick=function(K){ArticleList.hide_prefs();return cancelEvent(K)};$("articlelist-prefs-cancel").onclick=function(K){ArticleList.hide_prefs();return cancelEvent(K)};$("articlelist-prefs-save").onclick=function(K){Prefs.set("articlelist.changed_prefs",1);C.innerHTML="Edit Preferences";try{ArticleList.save_prefs();ArticleList.hide_prefs()}catch(M){alert(M)}Tracking.resetVars();var L=$A(Prefs.get("articlelist.enabled_tabs",[])).collect(function(N){return N.replace(/-tab$/,"")}).join(":");Tracking.setVar("prop20",L);s.tl(this,"o","In The News Module - Customized Window - Save Button");return cancelEvent(K)};ArticleList.check_list.each(function(K){K.onchange=function(M){ArticleList.limit_selection();ArticleList.force_default()};var L=K.proxy.label.getElementsByTagName("a")[0];L.onclick=function(M){ArticleList.set_default(K.value);return cancelEvent(M)}});H._tracking=true});
/* /modules/articles/articles.js */
function videoEmbed(){var F=$("related-article-embed");if(!F){return }F.parentNode.removeChild(F);var C=F.getElementsByTagName("object");var E=F.getElementsByTagName("embed");if(C.length==0&&E.length==0){return }var D=document.getElementById("article");if(D==null){return false}var A=D.getElementsByTagName("p");if(A.length>article_embed_pos+1){var B=A[article_embed_pos+1]}else{var B=A[A.length-1].nextSibling}B.parentNode.insertBefore(F,B);return }addLoadEvent(function(){videoEmbed()});function articleAnchorTargets(){var D=document.getElementById("article");if(D==null){return false}var C=D.getElementsByTagName("p");for(i=0;i<C.length;i++){var A=C[i].getElementsByTagName("a");var B="";for(j=0;j<A.length;j++){B=A[j].getAttribute("href");if(B.indexOf("comcast.net")==-1){A[j].setAttribute("target","_blank")}}}}addLoadEvent(function(){articleAnchorTargets()});var URItoMG=Class.create();Object.extend(URItoMG.prototype,{initialize:function(){this.pcp=document.config.pathContext.substring(1,document.config.pathContext.length-1).split("/");this.articles=this.pcp[0];this.channel=this.pcp[1];if(this.channel.indexOf("-")!=-1){this.channel=this.pcp[1].substring(0,this.pcp[1].indexOf("-"));this.subchannels=this.pcp[1].substring(this.pcp[1].indexOf("-")+1).replace("-","/")+"/"}else{this.subchannels=""}this.date=this.pcp[2].substring(0,4)+"/"+this.pcp[2].substring(4,6)+"/"+this.pcp[2].substring(6,8);this.slug=this.pcp[3]},buildMgUrl:function(){return"/"+this.channel+"/articles/"+this.subchannels+this.date+"/"+this.slug+".xml"}});var MGtoArticleURL=Class.create();Object.extend(MGtoArticleURL.prototype,{initialize:function(A){this.path=A.substring(A.indexOf("/api/data")+10);this.pcp=this.path.split("/");this.pcpLength=this.pcp.length;this.articles=this.pcp[1];this.channel=this.pcp[0];if(this.pcpLength>6){this.subchannels="-"+this.pcp[2];if(this.pcpLength==8){this.subchannels+="-"+this.pcp[3]}}else{this.subchannels=""}this.date=this.pcp[this.pcpLength-4]+this.pcp[this.pcpLength-3]+this.pcp[this.pcpLength-2];this.slug=this.pcp[this.pcpLength-1]},buildUrl:function(){return"/articles/"+this.channel+this.subchannels+"/"+this.date+"/"+this.slug.slice(0,-4)+"/"}});var RelatedArticles={initialize:function(){var A=$("related-articles");if(A){var B=this.getAjaxUrl();new Ajax.Request(B,{method:"GET",encoding:"UTF-16",onSuccess:function(C){var E;if(jQuery.browser.msie){E=new ActiveXObject("Microsoft.XMLDOM");E.async=false;E.loadXML(C.responseText)}else{E=C.responseXML}var F=E.getElementsByTagName("RESULT");if(F&&F.length>0){var I="<ul>";var H=0;$A(F).each(function(L){if(H<4){var M=new MGtoArticleURL(L.getElementsByTagName("ID")[0].firstChild.nodeValue);var N=L.getElementsByTagName("TITLE")[0].firstChild.nodeValue;I+='<li><a href="'+M.buildUrl()+'" rel="default" title="'+N+'">'+N+"</a></li>"}H++});I+="</ul>";var G='<div class="related"><h2 class="media">Related Articles</h2>';var J='<i class="ul"></i><i class="ur"></i><i class="lr"></i><i class="ll"></i></div>';A.innerHTML=G+I+J;A.appendChild(TrackingNode.build_comment("META",{module:["relatedarticles"]}));var K=A.getElementsByTagName("a");for(var D=0;D<K.length;D++){K[D].appendChild(TrackingNode.build_comment("META",{linkType:["basic"]}))}}}})}},getAjaxUrl:function(){var E="/apolloapi/FGetSimilarNewsFromId?SourceID=";var C=document.config.ssMgProxy;var B="/midgard/cachesvc/api/data";var A=new URItoMG;var D=A.buildMgUrl();return E+C+B+D}};addLoadEvent(function(){if(document.config.ssMgProxy){RelatedArticles.initialize()}});var RelatedVideos={initialize:function(A){var B=$("related-videos");if(B){var C=this.getAjaxUrl(A);new Ajax.Request(C,{method:"GET",onSuccess:function(E){var G;if(jQuery.browser.msie){G=new ActiveXObject("Microsoft.XMLDOM");G.async=false;G.loadXML(E.responseText)}else{G=E.responseXML}var H;try{H=G.getElementsByTagName("results")[0].getElementsByTagName("content")}catch(K){if(K instanceof TypeError){document.getElementById("latestvideos").style.display="block";document.getElementById("related-videos").style.display="none";return }else{throw K}}if(H&&H.length>0){var L="<ul>";$A(H).each(function(O){var Q=O.getElementsByTagName("title")[0].firstChild.nodeValue;var V=O.getElementsByTagName("linkText")[0].firstChild.nodeValue;if(!V||V=="null"||V.trim()=="More News"){V="Associated Press"}var U=O.getElementsByTagName("thumbnailURL")[0].firstChild.nodeValue;var R=O.getElementsByTagName("thePlatformURL")[0].firstChild.nodeValue;var S=/popup\.html/;var T=S.test(R);if(T){var P="http://www.comcast.net/data/fan/html/popup.html"+unescape(R.substring(R.indexOf("popup.html")+10))+"&cid=fanlink&attr="+document.config.dataPackageContext.split("/")[1]+"article_related"}else{var P=unescape(R.substring(R))}L+="<li>";L+='<a href="'+P+'" rel="';if(T){L+="fan "}L+='track" title="'+Q+'"><img src="'+U+'" alt="'+Q+'" /></a>';L+='<a href="'+P+'" rel="';if(T){L+="fan "}L+='track" title="'+Q+'">'+Q.limit(35)+"</a>";L+="<p>"+V+"</p>";L+="</li>"});L+="</ul>";var J="<i class='ul'></i><i class='ur'></i><i class='lr'></i><i class='ll'></i>";var I='<h2 class="media video">Related Videos</h2><div class="capsule medium fixed-small clearfix">';var M="</div>";B.innerHTML=I+L+J+M;B.appendChild(TrackingNode.build_comment("META",{module:["relatedvideos"]}));var N=B.getElementsByTagName("a");for(var F=0;F<N.length;F++){assign_handlers(N[F]);N[F].appendChild(TrackingNode.build_comment("META",{linkType:["basic"]}));var D=N[F].getElementsByTagName("img");if(D.length>0){N[F].appendChild(TrackingNode.build_comment("META",{linkText:[D[0].alt]}))}}}else{$("related-videos").style.display="none";$("latestvideos").style.display="block"}}})}},getAjaxUrl:function(B){var B=B||6;var F="/apolloapi/FGetSimilarVideoFromNewsId?resultsFormat=FAST&numResults="+B+"&SourceID=";var D=document.config.ssMgProxy;var C="/midgard/cachesvc/api/data";var A=new URItoMG;var E=A.buildMgUrl();return F+D+C+E}};addLoadEvent(function(){if(document.config.ssMgProxy){RelatedVideos.initialize(5)}});
/* /modules/cover_transitions.js */
CoverTransition=Class.create();Object.extend(CoverTransition.prototype,{initialize:function(C,B,A){this.frames=C||[];this.time=B||0;this.setup=A||function(){return false}},animate:function(B,C,F){if(this.frames.length==0){return false}var A={old_cover:Cover.getById(B),new_cover:Cover.getById(C)};if(!A.old_cover||!A.new_cover){return false}for(var D in A){if(Element.hasClassName(A[D].getElementsByTagName("div")[0],"flash")){return false}}var E=new Animator(this.frames,this.time);Object.extend(E,A);return this.setup(E,F)}});var defaultTransition="reveal";var width=550;var frames=60;var time=1000;var Transitions={none:new CoverTransition(),slide:new CoverTransition(Animator.interpolate.root(0,-width,frames),time,function(anim,direction){with(anim.new_cover.style){left=(direction*width)+"px";display="block"}anim.onupdate=function(value){this.new_cover.style.left=direction*(width+value)+"px";this.old_cover.style.left=direction*value+"px";return true};anim.oncomplete=function(){this.old_cover.style.display="none";this.old_cover.style.left=0};return anim}),half_slide:new CoverTransition(Animator.interpolate.root(0,-width,frames),time,function(A,B){A.new_cover.style.display="block";A.new_cover.style.zIndex=B<0?2:1;A.old_cover.style.zIndex=B<0?1:2;A.onupdate=function(C){if(B<0){this.new_cover.style.left=-(width+C)+"px"}else{this.old_cover.style.left=C+"px"}return true};A.oncomplete=function(){this.old_cover.style.display="none";this.old_cover.style.left=0;this.old_cover.style.zIndex="";this.new_cover.style.zIndex=""};return A}),fade:new CoverTransition(Animator.interpolate.linear(0,1,10),time/2,function(A){A.onupdate=function(B){Element.setOpacity(this.old_cover,1-B);return true};A.oncomplete=function(){this.old_cover.style.display="none";Element.setOpacity(this.old_cover,1);this.new_cover.style.display="block";this.onupdate=function(B){Element.setOpacity(this.new_cover,B);return true};this.oncomplete=function(){Element.setOpacity(this.old_cover,"");Element.setOpacity(this.new_cover,"")};this.run()};return A}),cross_fade:new CoverTransition(Animator.interpolate.linear(1,0,10),time,function(A){A.new_cover.style.display="block";A.new_cover.style.zIndex=1;A.old_cover.style.zIndex=2;A.onupdate=function(B){Element.setOpacity(this.old_cover,B);return true};A.oncomplete=function(){this.old_cover.style.display="none";this.old_cover.zIndex="";this.new_cover.zIndex="";Element.setOpacity(this.old_cover,"")};return A}),slide_fade:new CoverTransition(Animator.interpolate.linear(0,-width,frames),time,function(anim,direction){anim.new_cover.style.display="block";anim.new_cover.style.zIndex=direction<0?2:1;anim.old_cover.style.zIndex=direction<0?1:2;anim.onupdate=function(value){var percent=value/-width;if(direction<0){this.new_cover.style.left=-(width+value)+"px";Element.setOpacity(this.new_cover,percent)}else{percent=1-percent;this.old_cover.style.left=value+"px";Element.setOpacity(this.old_cover,percent)}return true};anim.oncomplete=function(){with(this.old_cover.style){display="none";left=0;zIndex=""}with(this.new_cover.style){left=0;zIndex=""}Element.setOpacity(this.old_cover,"");Element.setOpacity(this.new_cover,"")};return anim}),reveal:new CoverTransition(Animator.interpolate.root(width,0,frames),time,function(anim,direction){anim.new_cover.style.display="block";anim.new_cover.style.zIndex=1;anim.old_cover.style.zIndex=2;anim.onupdate=function(value){var rect;if(direction<0){rect="rect(auto auto auto "+(width-value)+"px)"}else{rect="rect(auto "+value+"px auto auto)"}this.old_cover.style.clip=rect;return true};anim.oncomplete=function(){with(this.old_cover.style){display="none";clip=is_ie?"rect(auto auto auto auto)":"";zIndex=""}this.new_cover.style.zIndex=""};return anim})};
/* /modules/cover.js */
addLoadEvent(function(){if(!$("cover")){return }loadJS("lib/prototype/dom.js");loadJS("lib/animator.js");loadJS("modules/cover_transitions.js");Cover.initialize();var A=function(J,L){J=$(J);if(!J){return false}var K=J.getElementsByTagName("a");if(!K||K.length==0){return false}K[0].onclick=L;K[0].onmouseover=function(){Element.addClassName(this,"hover")};K[0].onmouseout=function(){Element.removeClassName(this,"hover");Element.removeClassName(this,"active")};K[0].onmousedown=function(){Element.addClassName(this,"active")};K[0].onmouseup=function(){Element.removeClassName(this,"active")};return true};A("c-previous",function(){Cover.pause();Cover.change(-1);return false});A("c-next",function(){Cover.pause();Cover.change(1);return false});A("c-play",function(){Cover.play();return false});A("c-pause",function(){Cover.pause();return false});Element.removeClassName("c-controls","hidden");var E=function(J){return function(K){Cover.pause();Cover.jump_to(J);return cancelEvent(K)}};var H=$("c-pagination");if(H){if(H.getElementsByTagName("li").length==0){for(var C=0,B=Cover.count();C<B;C++){var I=document.createElement("li");var F=document.createElement("a");F.href="#";F.innerHTML=C+1;I.appendChild(F);H.appendChild(I)}}var G=H.getElementsByTagName("a");for(var C=0,B=Cover.count();C<B;C++){G[C].onclick=E(C)}Element.removeClassName("c-pagination","hidden")}Cover.play();var D=/trans=([^&#]*)/.exec(document.location.href);if(D&&Transitions[D[1]]){defaultTransition=D[1]}});Cover={_current:-1,_timer:null,_wait:15000,_running:false,_anim:null,_shown_covers:[],_next_timeout:function(){Cover.change(1);Cover._timer=window.setTimeout(Cover._next_timeout,Cover._wait)},initialize:function(){var B=Cover.count();for(var A=0;A<B;A++){Cover.setDisplay(A,false);Cover._shown_covers[A]=false}},hold:function(){if(Cover._timer!=null){window.clearTimeout(Cover._timer)}Cover._timer=null},run:function(){if(Cover._timer==null&&Cover._running){Cover._next_timeout()}},change:function(D){if(Cover._anim&&Cover._anim.is_running()){Cover._anim.run();return }var A=Cover._current;var C=Cover.count();var B=Cover._current=(Cover._current+D+C)%C;Cover._update_display(A,B,D)},jump_to:function(C){if(!Cover.getById(C)){return }var A=Cover._current;var B=Cover._current=C;Cover._update_display(A,B,B<A?-1:1)},_update_display:function(A,B,D){var C=Cover.count();if(C<2){Cover.setDisplay(B,true);return }var E=function(){if(Cover._shown_covers[Cover._current]){return }Cover._shown_covers[Cover._current]=true;var M=Cover.getById(Cover._current);var L=M.getElementsByTagName("h3");var K=L.length>0?L[0].innerHTML:"No Header";var G=[";","cover",Tracking.pageName,K].join("/");Tracking.resetVars();var P=M.getElementsByTagName("a");var N=[];for(var I=0,H=P.length;I<H;I++){var J=P[I].getElementsByTagName("img");var O=P[I].parentNode.className=="more"?"more: ":"";if(J.length==0){O+=TrackingNode.getNodeText(P[I]).replace(/^\s*/g,"")}else{O+="image: "+J[0].alt}O=O.replace(/[;,$=|]/g," ");N.push([G,O].join("/"))}Tracking.setData({events:"event2",products:N.join(",")});s.tl(location.href,"o","Cover Impressions");Tracking.resetVars()};var F=function(){Cover.setDisplay(A,false);Cover.setDisplay(B,true)};Cover._anim=Transitions[defaultTransition].animate(A,B,D);Cover._anim.cleanup=Cover._anim.oncomplete;Cover._anim.oncomplete=function(){this.cleanup();F()};if(Cover._anim){Cover._anim.run()}else{F()}},play:function(){if(play=$("c-play")){Element.hide(play)}if(pause=$("c-pause")){Element.show(pause)}Cover._running=true;Cover.run()},pause:function(){if(play=$("c-play")){Element.show(play)}if(pause=$("c-pause")){Element.hide(pause)}Cover._running=false;Cover.hold()},getById:function(A){return $("cover"+A)||false},getPaginationById:function(C){var A=$("c-pagination");if(!A){return false}var B=A.getElementsByTagName("li");if(C<0||C>=B.length){return false}return B[C]},setDisplay:function(B,A){if(cvr=Cover.getById(B)){cvr.style.display=A?"block":"none"}if(page=Cover.getPaginationById(B)){Element[A?"addClassName":"removeClassName"](page,"active")}},count:function(){var B=/cover([0-9]+)/;var C=Cover.getById(0).parentNode.childNodes;for(var A=C.length-1;A>=0;A--){if(C[A].nodeType!=1){continue}if(match=C[A].id.match(B)){return parseInt(match[1])+1}}return 0},linkClicked:function(E,A,C,F){var B=$("cover"+C);if(!B){return }var D=document.createElement("a");D.href="#";D.appendChild(TrackingNode.build_comment("META",{position:[(F==2?"img":"link")+A],linkText:[E],linkType:["basic","positional","cover"]}));B.appendChild(D);s.tl(D,"o");B.removeChild(D);return }};
/* /modules/nav.js */
function toggleServices(A){if(typeof $=="undefined"){return false}var C=$("more");var B=$("n-more");if(!C||!B){return false}loadJS("lib/prototype/dom.js");var D=Element.hasClassName(B,"active");if(typeof A=="undefined"){A=!D}if(A!=D){setAdVisibility(!A);setCoverFlashVisibility(!A);setVideoVisibility(!A)}if(A){C.style.display="block";Element.addClassName(B,"active")}else{C.style.display="none";Element.removeClassName(B,"active")}return false}addLoadEvent(function(){if(m=$("more")){m.onclick=function(A){cancelTrackEvent(A);return true};addEvent(document.body,"onclick",toggleServices.bind(document.body,false))}});
/* /modules/dashboard.js */
if(document.config.cimaPassiveCheck=="true"&&getPortalData()&&!(document.cookie||"").match(/\s*session@comcast.net=([^;]*);?/)){document.location=document.config.tsSigninUrl+encodeURIComponent(document.config.requestURL)+"&passive=1"}function toggleDashboard(B){if(typeof $=="undefined"){return false}var E=$("dashboard");if(!E){return false}var A=this.parentNode?this.parentNode.id.substr(2):"";var D=$A($("dashboard-tabs").getElementsByTagName("li")).collect(function(F){return F.id.substr(2)});loadJS("lib/prototype/dom.js");var C=Element.hasClassName(E,"expanded");if(typeof B=="undefined"){B=!Element.hasClassName(E,A)}if(B!=C){setCoverFlashVisibility(!B)}if(B){if(A=="email"){return true}if(A=="voice"&&Element.hasClassName("p-voice","authed")){vmcs.requestData()}Element.addClassName(E,"expanded");D._each(function(F){Element[F==A?"addClassName":"removeClassName"](E,F);Element[F==A?"addClassName":"removeClassName"]($("vault"),F)})}else{Element.removeClassName(E,"expanded");D._each(function(F){Element.removeClassName(E,F);Element.removeClassName($("vault"),F)})}return false}function populateEmail(B){if(loading_state=$("p-email-state-loading")){Element.hide(loading_state)}if(!B){return }B=B.channel;if(typeof (B.item)=="object"&&typeof (B.item.length)=="undefined"){B.item=[B.item]}if(B.status!="SUCCESS"){var F=$("p-email");didYHMFail=true;if(F){Element.addClassName(F,"error")}return }var H=getPortalData();var G=H?true:false;var I=$("d-email");if(I){var E=I.getElementsByTagName("b")[0];if(G||B.item.length>0){E.innerHTML=(G?"":" ")+B.newmail}var A=buildEmaiLink(I.getElementsByTagName("a")[0],B.inbox)}var C=buildEmaiLink($("email-link-inbox"),B.inbox);var D=buildEmaiLink($("email-link-compose"),B.compose);isYHMLoaded=true}function buildEmaiLink(B,A){if(A&&B){if(A.indexOf("smartzone")==-1){B.href=A}}}function initEmail(B,C){var A=$("p-email");if(A){Element.addClassName(A,C?"authed":"nonauthed")}if(!C){return }continueEmail(B,C,A,userIsMigrated);managerNeedsFlash()}function continueEmail(D,F,C,A){if(loading_state=$("p-email-state-loading")){Element.show(loading_state)}var B=$("d-email").getElementsByTagName("a")[0];var E=new McTunnel.Request("yhm",document.config.yhmUrl,populateEmail,"xml");E.send()}function managerNeedsFlash(){var B=$("p-email");var A=$("McTunnelManagerContainer");if(A.childNodes.length==0){Element.addClassName(B,"need-flash")}}var isYHMLoaded=false;var didYHMFail=false;addLoadEvent(function(){var F=getPortalData();var B=$("login");if(B){B.className=F?"sign-out":"sign-in"}var D=$("user-name");if(D){var E=F?true:false;var C=(function(){if(!F){return"Guest"}var G=Prefs.get("local.name","");if(G==""){G=F.gt}return G})();D.innerHTML=(F?"Hi":"Welcome")+" <b>"+(F?C.limit(15):"Guest")+"</b>"}var A=$("vault");if(A){A.onclick=function(G){cancelTrackEvent(G);return true};addEvent(document.body,"onclick",toggleDashboard.bind(document.body,false));initEmail(E,!!F)}});
/* /modules/search.js */
addLoadEvent(function(){loadJS("lib/tabs.js");var F=document.getElementById("searchfield");if(F==null){return }if(!is_safari){F.focus()}var G="s-web";var B=new SimpleTabs();var D=document.getElementById("search-tabs");if(!D){return false}for(var C=0;C<D.childNodes.length;C++){var E=D.childNodes[C];if(E.nodeType!=1){continue}if(E.id=="s-more"){continue}B.tab_ids.push(E.id)}var A=function(J,H){var I=$("search-form");for(n in HeaderSearch){HeaderSearch[n].uninstall(I)}if(HeaderSearch[H]){HeaderSearch[H].install(I)}return true};B.onchange=A;B.setup(B.tab_id(G));B.onchange=function(K,H){A(K,H);var I=$("search-form"),J=$("searchfield");J.focus();if(J.value!=""&&I.onsubmit()!=false){I.submit()}return true}});var HdrSearch=Class.create();Object.extend(HdrSearch.prototype,{initialize:function(B,C,A){this.action=B;this.searchField=C||"q";this.fields=A||{};this.installed=false},install:function(A){if(this.installed){return false}A.action=this.action;$("searchfield").name=this.searchField;for(name in this.fields){var B=this.fields[name];var C=document.createElement("input");C.type="hidden";C.id=C.name=name;C.value=B;A.appendChild(C)}this.installed=true;return true},uninstall:function(A){if(!this.installed){return false}for(name in this.fields){var B=document.getElementById(name);if(B!=null){B.parentNode.removeChild(B)}}this.installed=false;return true}});var DblHdrSearch=Class.create();Object.extend(DblHdrSearch.prototype,HdrSearch.prototype);Object.extend(DblHdrSearch.prototype,{initialize:function(B,C,A){this.searchFields=C||Array("q","q2");HdrSearch.prototype.initialize.call(this,B,this.searchFields[0],A)},install:function(B){if(!HdrSearch.prototype.install.call(this,B)){return false}var C=document.createElement("input");C.type="text";C.id="searchfield2";C.name=this.searchFields[1];var A=$("searchfield");A.parentNode.insertBefore(C,A.nextSibling);C.parentNode.parentNode.className="local";return true},uninstall:function(A){if(!HdrSearch.prototype.uninstall.call(this,A)){return false}var B=document.getElementById("searchfield2");B.parentNode.parentNode.className="default";B.parentNode.removeChild(B);return true}});var search_url="http://search.comcast.net/";var video_url="http://videosearch.comcast.net/ss-query/videosearch.jsp";var shop_url="http://shopping.comcast.net/search.php";var search_account=typeof search_account=="undefined"?"Preview":search_account;var HeaderSearch={"s-web":new HdrSearch(search_url,"q",{cat:"Web",con:search_account}),"s-video":new HdrSearch(video_url,"q",{dr:"1",cp:"1"}),"s-images":new HdrSearch(search_url,"q",{cat:"images",con:search_account}),"s-news":new HdrSearch(search_url,"q",{cat:"news",con:search_account}),"s-shop":new HdrSearch(shop_url,"form_keyword"),"s-yellow":new DblHdrSearch(search_url,["q","l"],{cat:"yp",con:search_account})};HeaderSearch["s-web"].installed=true;function videoSearchValidation(B){var A=B.searchfield;if(A.value==""){A.focus();A.select();return false}else{return true}};
/* /modules/footer.js */
addLoadEvent(function(){var C=$("copy-year-cim");if(!C){return }loadJS("lib/prototype/dom.js");var A=C.getElementsByTagName("span")[0];if(Element.hasClassName(A,"year")){var B=new Date();A.innerHTML+="&nbsp;"+B.getFullYear()}});
/* /modules/polls.js */
var PoleComm=Class.create();Object.extend(PoleComm.prototype,{api_root:"http://comcastportal.lithium.com/restapi/vc/polls",initialize:function(B,A){this.poll_id=B;this.onerror=A||function(){}},_req_name:function(B){var A=(new Date()).getTime();return[B,this.poll_id,A].join("_")},_is_error:function(A){return typeof A["@status"]!="undefined"&&A["@status"]=="error"},get_choices:function(A){var C=this;var B=new McTunnel.Request(this._req_name("choices"),[this.api_root,"id",this.poll_id,"choices"].join("/"),function(D){if(C._is_error(D)){C.onerror(D.error);return }var E=[];$A(D.pollchoices.pollchoice).each(function(F){E.push({id:F.id["@nodeText"],text:F.text["@nodeText"],votes:F.votes.count["@nodeText"]})});if(A){A.call(this,E)}});B.send()},get_end_time:function(A){var C=this;var B=new McTunnel.Request(this._req_name("endtime"),[this.api_root,"id",this.poll_id,"end_time"].join("/"),function(E){if(C._is_error(E)){C.onerror(E.error);return }var D=E.value["@nodeText"];var F=D.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/);var G=new Date();G.setUTCFullYear(F[1]);G.setUTCMonth(parseInt(F[2],10)-1);G.setUTCDate(parseInt(F[3],10));G.setUTCHours(parseInt(F[4],10));G.setUTCMinutes(parseInt(F[5],10));G.setUTCSeconds(parseInt(F[6],10));if(A){A.call(this,G)}});B.send()},get_question:function(A){var C=this;var B=new McTunnel.Request(this._req_name("question"),[this.api_root,"id",this.poll_id,"question"].join("/"),function(D){if(C._is_error(D)){C.onerror(D.error);return }if(A){A.call(this,D.value["@nodeText"])}});B.send()},get_vote_count:function(A){var C=this;var B=new McTunnel.Request(this._req_name("vote_count"),[this.api_root,"id",this.poll_id,"votes/count"].join("/"),function(D){if(C._is_error(D)){C.onerror(D.error);return }if(A){A.call(this,parseInt(D.value["@nodeText"],10))}});B.send()},can_vote:function(B){var D=this;var A=readCookie("poll_"+this.poll_id);if(A!=null){B.call(this,false,"voted");return }var C=new McTunnel.Request(this._req_name("can_vote"),[this.api_root,"id",this.poll_id,"votes/place/allowed"].join("/"),function(E){if(D._is_error(E)){D.onerror(E.error);return }if(B){if(E.value["@nodeText"]=="true"){B.call(this,true,"")}else{D.get_end_time(function(G){var F=new Date();B.call(this,false,F<G?"unknown":"expired")})}}});C.send()},place_vote:function(A,B){var D=this;var C=new McTunnel.Request(this._req_name("place_vote"),[this.api_root,"id",this.poll_id,"votes/place"].join("/"),function(G){var E=(G["@status"]=="success");var F=(D._is_error(G))?G.error.message:"";if(E){D.get_end_time(function(I){var H=new Date();var J=parseInt((I.getTime()-H.getTime())/86400000)+7;createCookie("poll_"+D.poll_id,A,J)})}if(B){B.call(this,E,F)}});C.setVariable("poll.choice","id/"+A);C.send()}});var Pole=Class.create();Object.extend(Pole.prototype,{initialize:function(A){this.node=$(A);this.form=this.node.getElementsByTagName("form")[0];this.container=this.form.parentNode;this.message=$A(this.container.getElementsByTagName("p")).detect(function(D){return Element.hasClassName(D,"message")});this.error=$A(this.container.getElementsByTagName("p")).detect(function(D){return Element.hasClassName(D,"error")});var C=this;this.poll_id=this.form.action.split("#")[1];this.comm=new PoleComm(this.poll_id,function(D){C.set_display(C.DISP_ERROR);C.error.innerHTML="An error has occurred.";C.error.style.display="block"});this.form.onsubmit=function(){if(C.get_display()==C.DISP_RESULTS){C.set_display(C.DISP_VOTING);return false}var D=$A(this.getElementsByTagName("input")).collect(function(E){return E.checked?E.value:false}).detect(function(E){return E!==false});if(typeof D=="undefined"){C.error.innerHTML="Please choose an item.";C.error.style.display="block";return false}C.comm.place_vote(D,function(F,E){if(F){C.message.innerHTML="Thank you. Your vote has been submitted.";C.show_vote(false);C.update_counts()}else{C.error.innerHTML="Failed to place vote: "+E;C.error.style.display="block"}});return false};var B=$A(this.container.getElementsByTagName("a")).detect(function(D){return Element.hasClassName(D,"poll-results")});B.onclick=function(D){C.message.innerHTML="Thank you for viewing the poll. Click Vote to return and submit a vote.";C.show_vote(true);C.update_counts();return cancelEvent(D)};this.comm.get_question(function(D){C.fill_question(D)});this.comm.can_vote(function(D,F){if(D){C.update_answers()}else{var E;switch(F){case"voted":E="Thank you. Your vote has been submitted.";break;case"expired":E="Voting for this poll has ended.";break;default:E="This poll is currently closed."}C.message.innerHTML=E;C.show_vote(false);C.update_counts()}})},DISP_VOTING:"voting",DISP_RESULTS:"results",DISP_LOADING:"loading",DISP_ERROR:"error",set_display:function(B){if(B==this.DISP_LOADING){var A=Element.getDimensions(this.container).height;this.container.style.height=A+"px"}else{this.container.style.height=is_ie?"1%":""}Element.removeClassName(this.container,"loading");Element.removeClassName(this.container,"voting");Element.removeClassName(this.container,"results");Element.addClassName(this.container,B);this.error.style.display="none"},get_display:function(){var B=[this.DISP_VOTING,this.DISP_RESULTS,this.DISP_LOADING,this.DISP_ERROR];for(var A=0;A<B.length;A++){if(Element.hasClassName(this.container,B[A])){return B[A]}}return""},show_vote:function(A){Element[A?"removeClassName":"addClassName"](this.container,"hide-vote")},update_counts:function(){var A=this;this.set_display(A.DISP_LOADING);this.comm.get_vote_count(function(B){A.fill_vote_count(B);A.comm.get_choices(function(D){var C=$A(D).inject({},function(E,F){E[F.text]=B?parseInt(F.votes/B*100):0;return E});A.fill_percents(C);A.set_display(A.DISP_RESULTS)})})},update_answers:function(){var A=this;this.set_display(A.DISP_LOADING);this.comm.get_choices(function(C){var B=$A(C).inject({},function(D,E){D[E.id]=E.text;return D});A.fill_answers(B);A.show_vote(true);A.set_display(A.DISP_VOTING)})},fill_vote_count:function(A){$A(this.form.getElementsByTagName("p")).each(function(B){if(B.className=="vote-count"){B.getElementsByTagName("span")[0].innerHTML=A}})},fill_percents:function(B){var D=Element.getDimensions(this.container).width-50;var A=this.container.getElementsByTagName("dl")[0];var F=[];while(A.childNodes.length>0){A.removeChild(A.firstChild)}$H(B).each(function(J){var I=document.createElement("dd");var H=document.createElement("b");I.appendChild(H);I.appendChild(document.createTextNode(J.value+"%"));var G=document.createElement("dt");G.appendChild(document.createTextNode(J.key));A.appendChild(I);A.appendChild(G);F.push({node:H,width:(D*J.value/100)})});var E=Animator.interpolate.linear(0,1,50);var C=new Animator(E,500);C.onupdate=function(J){for(var H=0,G=F.length;H<G;H++){var I=F[H];I.node.style.width=(I.width*J)+"px"}return true};C.run()},fill_question:function(A){var B=$A(this.container.getElementsByTagName("p")).detect(function(C){return C.className=="question"});B.innerHTML=A},fill_answers:function(B){var A=this.container.getElementsByTagName("ul")[0];$H(B).each(function(F){var E=document.createElement("li");var D=document.createElement("input");D.className="fancy-radio";D.type="radio";D.name="poll-option";D.id="poll-"+F.key;D.value=F.key;var C=document.createElement("label");C.htmlFor="poll-"+F.key;C.innerHTML=F.value;E.appendChild(D);E.appendChild(C);A.appendChild(E);new RadioButton(D)})}});addLoadEvent(function(){if(p=$("poll")){loadJS("lib/widgets/radio_button.js");new Pole(p)}});
/* /modules/vmcs.js */
var vmcs={url:"/user/authkey/vmcs/",totalUMCount:0,dispContainer:false,countContainer:false,enabled:false,requestMade:false,initialize:function(){var A=getPortalData();var B=!!A;this.preview=$("p-voice");if(this.preview){Element.addClassName(this.preview,B?"authed":"nonauthed")}this.countContainer=$("d-voice").getElementsByTagName("b")[0];this.dispContainer=$("p-voice-state-primary");if(!getPortalData()){return false}this.enabled=true},requestData:function(){if(this.dispContainer&&this.enabled&&!this.requestMade){if(isPrimary()){this.getData()}else{this.displaySecondary()}}this.requestMade=true},entryTemplate:function(A,E){var D=A.substring(0,3);var C=A.substring(3,6);var B=A.substring(6);return"<div class='vmcsEntry'><h3>("+D+") "+C+"-"+B+"</h3><p>"+E+" unheard</p></div>"},getData:function(){Element.show("p-voice-state-loading");new Ajax.Request(this.url,{method:"GET",onSuccess:this.requestSuccess,onFailure:this.requestFailure})},displaySecondary:function(){Element.addClassName(this.preview,"secondary")},requestSuccess:function(trans){Element.hide("p-voice-state-loading");var json=stripComments(trans.responseText);var data=eval("("+json+")");if(!data.fault){var counts=data.umcount.pluck("new");if(counts.any(function(item){return(item>0)})){vmcs.dispContainer.innerHTML="";data.umcount._each(vmcs.createEntry.bind(vmcs));Element.addClassName(vmcs.preview,"primary")}else{Element.addClassName(vmcs.preview,"uninit")}}else{if(data.code==105){Element.addClassName(vmcs.preview,"upsell")}else{vmcs.showUnhandledError(data)}}},showUnhandledError:function(A){Element.addClassName(this.preview,"error");$("p-voice-errorcode").innerHTML=A.code},requestFailure:function(){Element.hide("p-voice-state-loading")},setUMCount:function(A){A=parseInt(A);this.totalUMCount+=A;this.countContainer.innerHTML=A},createEntry:function(C){this.setUMCount(C["new"]);var B=this.entryTemplate(C.tn,C["new"]);var A=document.createElement("div");A.innerHTML=B;B=A.getElementsByTagName("div")[0];this.dispContainer.appendChild(B);return true}};
/* /modules/overlays/adfeedback.js */
var AdFeedbackWindow={fields:["afadCall","afadResponse","afpage","afbrowser","subject","fromAddress","afcomments","toAddresses"],create_window:function(C,B){if(!$("adfeedback")&&!this.load_overlay()){alert("Failed to load the feedback form. Please try again.");return false}if(!loadJS("lib/prototype/form.js")){alert("Failed to load the feedback form. Please try again.");return false}var A=new Window("adfeedback","adfeedback-close");A.onhide=function(){$("adfeedback").getElementsByTagName("form")[0].style.display="block";$("adfeedback-confirm").style.display="none";$("adfeedback-error").style.display="none"};A.onshow=function(){var I=$("afcomments");var F=$("afadCall");var G=$("afpage");var D=$("afbrowser");var H=$("afadResponse");var E=$("subject");E.value="Ad Feedback for "+window.location;H.value=escape(B.innerHTML);G.value=window.location;F.value=C;D.value=navigator.userAgent;I.focus()};return A},load_overlay:function(){var C=new Ajax.Request("./overlays/adfeedback/",{method:"get",asynchronous:false});if(C.responseIsFailure()){return false}var E=document.createElement("div");E.innerHTML=C.transport.responseText;document.body.appendChild(E);var A=$("adfeedback");var D=A.getElementsByTagName("button")[0];var B=A.getElementsByTagName("form")[0];Widgets.build(A);D.onclick=function(F){var G=AdFeedbackWindow.fields.inject({},function(I,H){I[H]=$F(H);return I});new Ajax.Request(B.action,{method:"post",onSuccess:function(){B.style.display="none";$("adfeedback-confirm").style.display="block"},onFailure:function(H){B.style.display="none";$("adfeedback-error").style.display="block";$("error-text").innerHTML=H.responseText||"unknown error"},parameters:Ajax.parameters(G)});return cancelEvent(F)};return true}};
/* /modules/overlays/slideshow.js */
var SlideshowWindow={add_click:function(A,C){A=$(A);var B=A.getElementsByTagName("a");if(B.length==0){return }B[0].onclick=C;B[0].onmouseover=function(){if(!Element.hasClassName(this.parentNode,"disable")){Element.addClassName(this,"hover")}};B[0].onmouseout=function(){if(!Element.hasClassName(this.parentNode,"disable")){Element.removeClassName(this,"hover")}Element.removeClassName(this,"active")};B[0].onmousedown=function(){if(!Element.hasClassName(this.parentNode,"disable")){Element.addClassName(this,"active")}};B[0].onmouseup=function(){if(!Element.hasClassName(this.parentNode,"disable")){Element.removeClassName(this,"active")}}},create_gallery_window:function(selected_image,data,gallery_id,galleryTitle){gallery_id=(gallery_id+"").replace(/\/data.*/,"").replace(/^\//,"").replace(/\/$/,"");if(gallery_id.match(/^(music|entertainment|sports|finance|tv|news)/)){document.location=["","slideshow",gallery_id.replace("/","-"),selected_image,""].join("/");return }var _this=this;data=eval(data);$A(data).each(function(item,i){var has_caption=$H(item).keys().include("ss-caption/innerHTML");var has_title=$H(item).keys().include("ss-title/innerHTML");if(has_caption&&!has_title){data[i]["ss-title/innerHTML"]=data[i]["ss-caption/innerHTML"];data[i]["ss-caption/innerHTML"]=""}if((has_caption&&has_title)&&(item["ss-title/innerHTML"]==item["ss-caption/innerHTML"])){data[i]["ss-caption/innerHTML"]=""}return true});showOverlay(function(){return _this.create_window_data(selected_image,"slideshow",data,galleryTitle)})},create_window:function(D,C){var B=arguments[2]||false;var F=arguments[3]||false;var E=this.load_data(C,B,F);if(!E){alert("Failed to load the slideshow. Please try again.");return false}var A=E.title;if(A==""){A=null}E=E.photos;return this.create_window_data(D,C,E,A)},create_window_data:function(K,D,H,B){var P="",C="";switch(D){case"slideshow":P="ss";C="slideshow";break;case"photooftheday":P="pod";C="pod-overlay";break;default:alert("Invalid type specified: "+D);return false}if(!$(C)&&!this.load_overlay(D)){alert("Failed to load the slideshow. Please try again.");return false}if(!loadJS("lib/prototype/event.js")){alert("Failed to load the slideshow. Please try again.");return false}if(B&&$(P+"-head")){$(P+"-head").innerHTML=B}var S=$(P+"-slide").getElementsByTagName("ul")[0];S.innerHTML="";for(var Q=0,O=H.length;Q<O;Q++){var T=document.createElement("li");var M=document.createElement("img");M.src=H[Q].thumbnail_url;T.appendChild(M);S.appendChild(T)}var N=new Slideshow(P+"-slide");var L=0;var R=$(P+"-ad");N.onchange=function(a){var X=$(P+"-count");X.innerHTML=(a+1)+" of "+this.images.length;if(a<0||a>=H.length){return }var W=$(P+"-fullsize");var V=W.parentNode;var c=document.createElement("img");c.id=P+"-fullsize";c.style.position="relative";c.style.left="-10000px";c.onload=function(){var e=Animator.interpolate.linear(0,1,10);var d=new Animator(e,500);d.onupdate=function(f){Element.setOpacity(c,f);return true};c.style.left="";c.style.position="static";Element.setOpacity(c,0);d.run()};var b=Animator.interpolate.linear(1,0,10);var Y=new Animator(b,500);Y.onupdate=function(d){Element.setOpacity(W,d);return true};Y.oncomplete=function(){V.replaceChild(c,W);var g=H[a];for(var e in g){var j=e.split("/");var f=$(j[0]);if(!f){continue}f[j[1]]=g[e]}var h=$(P+"-related");if(h){var d=g[P+"-related-a/href"];h.style.display=(d!="")?"block":"none"}};Y.run();L++;if(L%3==0&&R){while(R.childNodes.length>0){R.removeChild(R.childNodes[0])}loadJS("lib/ads.js");var Z=new Ad();Z.set_location("LREC");Z.set_background("000000");Z.render_full(R,true,"iab300x250")}};var G=function(){if(N.image_id<=0){Element.addClassName($(P+"-prev"),"disable")}else{Element.removeClassName($(P+"-prev"),"disable")}if(N.image_id>=N.images.length-1){Element.addClassName($(P+"-next"),"disable")}else{Element.removeClassName($(P+"-next"),"disable")}};this.add_click(P+"-prev",function(V){N.animate_to_image(N.image_id-1);G();return cancelEvent(V)});this.add_click(P+"-next",function(V){N.animate_to_image(N.image_id+1);G();return cancelEvent(V)});var J=0;for(var Q=0,O=H.length;Q<O;Q++){if(H[Q].identifier==K){J=Q;break}}var A;var F=new Window(C,P+"-close");F.onshow=function(){A=(new Date()).getTime();var V=$(P+"-fullsize");var W=document.createElement("img");W.id=P+"-fullsize";W.style.position="relative";W.style.left="-10000px";V.parentNode.replaceChild(W,V);L=-1;N.reinitialize(J);L=1;Tracking.resetVars();Tracking.setVar("pageName","Slideshow-"+Tracking.pageLocation);Tracking.setVar("eVar6",Tracking.pageLocation);Tracking.setVar("prop8",Tracking.pageLocation);Tracking.setVar("events","event8");s.t()};var E=function(W,V){Tracking.resetVars();Tracking.setVar("linkTrackVars","eVar6,eVar7,eVar8,eVar9,eVar10,events");Tracking.setVar("linkTrackEvents","event9");Tracking.setVar("events","event9");Tracking.setVar("eVar6",Tracking.pageLocation);Tracking.setVar("eVar7",[Tracking.pageLocation,L].join("-"));Tracking.setVar("eVar8",[Tracking.pageLocation,W].join("-"));Tracking.setVar("eVar9",L);Tracking.setVar("eVar10",W);s.tl(true,"o",V)};F.onhide=function(){var V=(new Date()).getTime()-A;E("Close Window Button","Slideshow Close")};var U=$(P+"-related-a");if(U){U.onclick=function(V){E("Related Story Button","Slideshow Related Story");var W=this.href;window.setTimeout(function(){document.location=W},100);return cancelEvent(V)}}var I=$(P+"-submit-a");if(I){I.onclick=function(V){E("Submit Photo Button","Submit a Photo");var W=this.href;window.setTimeout(function(){document.location=W},100);return cancelEvent(evt)}}G();return F},load_overlay:function(A){var B=new Ajax.Request(["./overlays/",A,"/"].join(""),{method:"get",asynchronous:false});if(B.responseIsFailure()){return false}var C=document.createElement("div");C.innerHTML=B.transport.responseText;document.body.appendChild(C);return true},load_data:function(type){var categories=arguments[1]||false;if(arguments[2]&&!categories){var url=arguments[2];urlparts=url.split("/");while(urlparts[(urlparts.length-1)]!="view"&&urlparts.length>0){urlparts.pop()}if(urlparts[(urlparts.length-1)]=="view"){urlparts[(urlparts.length-1)]="data"}urlparts.splice((urlparts.length-2),0,"overlays");url=urlparts.join("/")+"/"}else{var url=[".","overlays",type,"data"].join("/")+"/"}if(categories){categories.push("overlays",type,"data");url="/"+categories.join("/")+"/"}var req=new Ajax.Request(url,{method:"get",asynchronous:false});if(req.responseIsFailure()){return false}var json=stripComments(req.transport.responseText);return eval("("+json+")")}};var Slideshow=Class.create();Object.extend(Slideshow.prototype,{image_size:80,image_display:9,initialize:function(C){loadJS("lib/scroller.js");this.element=$(C);this.onchange=function(){};this.reticule_moving=false;this.scroll_moving=false;this.covers=[];var D=this.element.getElementsByTagName("div");for(var B=0,A=D.length;B<A;B++){switch(D[B].className){case"thumb-shader":this.covers.push(D[B]);break;case"reticule":this.reticule=D[B];break;case"thumbs":this.wrapper=D[B];break;case"shader":this.shader=D[B];break}}this.scroller=new SimpleScroller(this.wrapper);this.image_id=0;this.reinitialize();var E=this;this.shader.onclick=function(F){var F=F||window.event;var H=Event.pointerX(F);var G=Event.pointerY(F);E.images.each(function(I,J){var K=Element.getDimensions(I);var L=Element.getPosition(I);if(H>=L.x&&H<=L.x+K.width&&G>=L.y&&G<=L.y+K.height){E.animate_to_image(J);throw $break}})}},reinitialize:function(E){this.images=$A(this.wrapper.getElementsByTagName("img"));for(var D=0,B=this.images.length;D<B;D++){this.images[D].style.width=this.images[D].style.height=this.image_size+"px"}this.shader.style.display=this.images.length>=2?"block":"none";if(this.images.length>=2){this.image_width=Element.getPosition(this.images[1]).x-Element.getPosition(this.images[0]).x}else{if(this.images.length==1){this.image_width=Element.getDimensions(this.images[0]).width}else{this.image_width=0}}this.reticule.style.height=this.reticule.style.width=this.image_size+"px";var C=this.image_size-parseInt(this.reticule.clientHeight);this.reticule.style.height=this.reticule.style.width=(this.image_size+C)+"px";this.reticule.dimensions=Element.getDimensions(this.reticule);this.wrapper.style.width=(this.image_display*this.image_width)+"px";var A=10;this.shader.style.height=this.reticule.dimensions.height+"px";this.shader.style.width=(Element.getDimensions(this.wrapper).width+A)+"px";this.shader.dimensions=Element.getDimensions(this.shader);this.shader.dimensions.width-=A;this.scroller.offset.x=0;this.scroller.updatePosition();this.covers[0].style.width=0;this.covers[1].style.width=0;this.element.style.height=this.shader.style.height;this.move_to_image(E||this.image_id)},get_cover_dims:function(A){var B=Element.getPosition(this.wrapper).x+A*this.image_width;var C=[];C.push(Math.max(0,B-Element.getPosition(this.covers[0]).x));C.push(Math.max(0,this.shader.dimensions.width-(C[0]+this.reticule.dimensions.width-1)));return C},get_scroller_position:function(A){return this.image_width*A},get_position_offset:function(E){var B=this.image_display/2;var D=E-B;var C=E+B;var A=B;if(C>this.images.length){var F=C-this.images.length;D-=F;A+=F}if(D<0){A+=D;D=0}return{position:Math.floor(A),offset:Math.round(D,1)}},move_to_image:function(A){if(A<0){A=0}if(A>=this.images.length){A=this.images.length-1}this.image_id=A;this.pos_offset=this.get_position_offset(this.image_id);var B=this.get_cover_dims(this.pos_offset.position);this.covers[0].style.width=B[0]+"px";this.covers[1].style.width=B[1]+"px";this.scroller.offset.x=this.get_scroller_position(this.pos_offset.offset);this.scroller.updatePosition();this.onchange(this.image_id)},animate_to_image:function(E){if(E<0){E=0}if(E>=this.images.length){E=this.images.length-1}var C=500;this.image_id=E;var D=this.get_position_offset(this.image_id);var H=function(){if(!this.reticule_moving&&!this.scroll_moving){this.onchange(this.image_id)}};if(D.position!=this.pos_offset.position){this.reticule_moving=true;var L=Math.ceil(C*0.025);var A=[Element.getDimensions(this.covers[0]).width,Element.getDimensions(this.covers[1]).width];var K=this.get_cover_dims(D.position);var I=[Animator.interpolate.linear(A[0],K[0],L),Animator.interpolate.linear(A[1],K[1],L)];var J=I[0].collect(function(N,M){return[I[0][M],I[1][M]]});if(this.anim){this.anim.stop(true)}this.anim=new Animator(J,C);var B=this.covers;var G=this.shader;this.anim.onupdate=function(M){M.each(function(O,N){B[N].style.width=O+"px"});return true};this.anim.oncomplete=(function(){this.reticule_moving=false;H.call(this)}).bind(this);this.anim.run()}if(D.offset!=this.pos_offset.offset){this.scroll_moving=true;var F=this.get_scroller_position(D.offset);this.scroller.scrollTo({x:F},C,(function(){this.scroll_moving=false;H.call(this)}).bind(this))}this.pos_offset=D}});
/* /modules/overlays/emailthis.js */
var portalUserData=null;var EmailthisWindow={onsubmit:function(){},clearFields:["toAddresses","fromAddress","emailthisMessage","captchaResponse"],create_window:function(){if(!$("emailthis")&&!this.load_overlay()){alert("Failed to load the feedback form. Please try again.");return false}if(!loadJS("lib/prototype/form.js")){alert("Failed to load the feedback form. Please try again.");return false}var A=new Window("emailthis","emailthis-close");A.onhide=function(){EmailthisWindow.clearFields._each(function(B){var C=$(B);C.value=C.proxy.origValue||""});$("copyMe").checked=false;$("toAddresses").proxy.set_status("default");$("fromAddress").proxy.set_status("default");$("captchaResponse").proxy.set_status("default");Element.removeClassName($("emailthis-to-label"),"failed");Element.removeClassName($("emailthis-from-label"),"failed");Element.removeClassName($("emailthis-captcha-label"),"failed");$("emailthis-subcaption").innerHTML="Enter up to 10 email addresses (Separate by commas)";$("emailthis").getElementsByTagName("form")[0].style.display="block";$("emailthis-otherarticles").style.display="none";$("emailthis-error").style.display="none";$("submit").style.display="block";$("emailthis-subcaption").className="";$("emailthis-from-subcaption").className="";$("emailthis-captcha-subcaption").className="";if($("inlineplayer")&&$("inlineplayer").playerResume){$("inlineplayer").playerResume()}};A.onshow=function(){if(getPortalData()){portalUserData=new UserData();jQuery(portalUserData).bind(UserDataEvent.SUCCESS,function(){if(portalUserData.getEmail()!=null){$("fromAddress").value=portalUserData.getEmail()}})}$("email-loader").style.display="none";EmailthisWindow.refresh_captcha();$("validation-error").style.display="none";if(getPortalData()){$("emailthis-captcha-widget").style.display="none"}if($("inlineplayer")&&$("inlineplayer").playerHalt){$("inlineplayer").playerHalt()}};return A},refresh_captcha:function(){new Ajax.Request("./overlays/email/captcha/"+Math.floor(Math.random()*999999),{method:"get",onComplete:function(A){$("emailthis-captcha-ajax").innerHTML=A.responseText}});return },load_overlay:function(){this.sendFields=this.clearFields.concat(["encryptedCaptcha"]);var X=($("video-metadata"))?"video":(($("trivia-options"))?"trivia":(($("viewer-detail-wrapper"))?"photo":"article"));var P="./overlays/email/"+X+"/";var A=new Ajax.Request(P,{method:"get",asynchronous:false});if(A.responseIsFailure()){return false}var H=document.createElement("div");H.innerHTML=A.transport.responseText;document.body.appendChild(H);var N=document.title.replace(" - Comcast.net","");N=N.replace(" | Comcast.net","");if(X=="video"){N=$("video-metadata").getElementsByTagName("h2")[0].getElementsByTagName("strong")[0].innerHTML}else{if(X=="article"){if($("article").getElementsByTagName("h1")){N=$("article").getElementsByTagName("h1")[0].innerHTML}else{if($("article").getElementsByTagName("h2")){N=$("article").getElementsByTagName("h2")[0].innerHTML}}}}if(N==""){N=document.title}$("emailthis-title").innerHTML=N;$("emailthisTitle").value=N;var G=$("extended-videolist")||$("relatedvideo-container");if(G){var S=G.getElementsByTagName("ul")[0];var T=S.getElementsByTagName("li");var Q=(T.length>5)?5:T.length;var K=document.createElement("ul");for(var U=0;U<Q;U++){var J=T[U].cloneNode(true);var L=J.getElementsByTagName("a")[0];$A(L.childNodes).each(function(Z){if(Z.nodeType==8){Z.parentNode.removeChild(Z)}});L.rel=L.rel+' track_load(Email Story Window - "Other Links" click)';L.appendChild(document.createComment("TRACKING ! prop11: ! eVar16: "));assign_handlers(L);K.appendChild(J)}$("emailthis-pageheadlines").appendChild(K);Element.addClassName($("emailthis-pageheadlines"),"imgList");if(G.id=="relatedvideo-container"){Element.addClassName($("emailthis-pageheadlines"),"wideimg")}}var M=$("headlines");if(M&&!G){var F=M.getElementsByTagName("ul")[0];var E=F.getElementsByTagName("li");var D=(E.length>5)?5:E.length;var W=document.createElement("ul");for(var U=0;U<D;U++){var V=E[U].cloneNode(true);var L=V.getElementsByTagName("a")[0];$A(L.childNodes).each(function(Z){if(Z.nodeType==8){Z.parentNode.removeChild(Z)}});L.rel=L.rel+' track_load(Email Story Window - "Other Links" click)';L.appendChild(document.createComment("TRACKING ! prop11: ! eVar16: "));assign_handlers(L);W.appendChild(V)}$("emailthis-pageheadlines").appendChild(W)}var I=$("carousel-panel0");if(I){var S=I.getElementsByTagName("ul")[1];var T=S.getElementsByTagName("li");var Q=(T.length>5)?5:T.length;var K=document.createElement("ul");for(var U=0;U<Q;U++){var J=T[U].cloneNode(true);var L=J.getElementsByTagName("a")[0];L.getElementsByTagName("span")[0].innerHTML=L.title;$A(L.childNodes).each(function(Z){if(Z.nodeType==8){Z.parentNode.removeChild(Z)}});L.rel=L.rel+' track_load(Email Story Window - "Other Links" click)';L.appendChild(document.createComment("TRACKING ! prop11: ! eVar16: "));assign_handlers(L);K.appendChild(J)}$("emailthis-pageheadlines").appendChild(K);Element.addClassName($("emailthis-pageheadlines"),"imgList");Element.addClassName($("emailthis-pageheadlines"),"movieList")}if(!G&&!M&&!I){$("emailthis-otherarticles").getElementsByTagName("h2")[0].getElementsByTagName("span")[0].style.display="none"}var Y=$("emailthis");var C=$("refreshCaptcha");var R=Y.getElementsByTagName("button")[0];var B=Y.getElementsByTagName("form")[0];if(X=="video"){B.action="/user/authkey/service/emailavideo/"}else{if(X=="trivia"){B.action="/user/authkey/service/emailapage/"}else{if(X=="photo"){B.action="/user/authkey/service/emailaphoto/"}}}Widgets.build(Y);C.onclick=function(Z){EmailthisWindow.refresh_captcha();return cancelEvent(Z)};var O=$("emailthisMessage");O.onkeyup=function(Z){if(O.value.length>500){O.value=O.value.substring(0,500)}};$("fromAddress").onfocus=function(){};$("fromAddress").onblur=function(){};$("toAddresses").onblur=function(){};B.onsubmit=function(){return false};R.onclick=function(i){var h="Please check that the domain of the email you entered is valid.";var j="The comcast.net email address you entered does not exist.";var d="Please check email formatting and that multiple emails are separated by commas.";var v="Please enter an email address to send the "+X+" to.";var p="Please check email formatting";var n="Please enter your email address";var c="Please enter the characters you see in the image";var w="Please enter the characters you see in the image";var l=true;var k;if($("toAddresses").value.replace(/^\s+/,"").replace(/\s+$/,"")){var m=$("toAddresses").value.split(",");if(m.length>10){k="Enter up to 10 email addresses";l=false}else{for(t=0;t<m.length;t++){if(!echeck(m[t])){k=d;l=false}}}if(l){$("emailthis-subcaption").innerHTML="Enter up to 10 email addresses (Separate by commas)";$("emailthis-subcaption").className="";Element.removeClassName($("emailthis-to-label"),"failed")}else{$("emailthis-subcaption").innerHTML=k;$("emailthis-subcaption").className="failed"}}else{$("emailthis-subcaption").innerHTML=v;$("emailthis-subcaption").className="failed"}var x=($("toAddresses").value.replace(/^\s+/,"").replace(/\s+$/,"")!=""&&l);var g=false;if($("fromAddress").value.replace(/^\s+/,"").replace(/\s+$/,"")){if(echeck($("fromAddress").value)){$("emailthis-from-subcaption").innerHTML="";$("emailthis-from-subcaption").className="";g=true;Element.removeClassName($("emailthis-from-label"),"failed")}else{$("emailthis-from-subcaption").innerHTML=p;$("emailthis-from-subcaption").className="failed"}}else{$("emailthis-from-subcaption").innerHTML=n;$("emailthis-from-subcaption").className="failed"}var b=false;if(getPortalData()||$("captchaResponse").value.replace(/^\s+/,"").replace(/\s+$/,"")){$("emailthis-captcha-subcaption").innerHTML="";$("emailthis-captcha-subcaption").className="";var o=Element.getByTagClass($("emailthis-captcha-widget"),"span","failed");if(o[0]){Element.removeClassName(o[0],"failed")}Element.removeClassName($("emailthis-captcha-label"),"failed");b=true}else{$("emailthis-captcha-subcaption").innerHTML=c;$("emailthis-captcha-subcaption").className="failed"}if(x&&g&&b){$("validation-error").style.display="none";var r=EmailthisWindow.sendFields.inject({},function(z,y){z[y]=$F(y);return z});r.emailthisUrl=window.location.href;r.exec="true";r.copyMe=$("copyMe").checked;r.fmt="xml";r.emailthisTitle=$("emailthisTitle").value;r.subject=N.replace(/[^a-zA-Z0-9_\&\-]/g," ");$("submit").style.display="none";$("email-loader").style.display="block";new Ajax.Request(B.action,{method:"post",onSuccess:function(AG){var AC=AG.responseText;var AD=AG.responseXML;var AB=AD.getElementsByTagName("error");if(AB.length!=0){$("submit").style.display="block";$("email-loader").style.display="none";if(AC.indexOf("recipient invalid domain")!=-1){$("emailthis-subcaption").innerHTML=h;$("emailthis-subcaption").className="failed";var AE=$("toAddresses");var z=$("emailthis-to-label");AE.proxy.set_status("failed");Element.addClassName(z,"failed");$("validation-error").style.display="block";$("validation-error").style.left="-254px"}else{if(AC.indexOf("Not our Customer")!=-1){$("emailthis-subcaption").innerHTML=j;$("emailthis-subcaption").className="failed";var AE=$("toAddresses");var z=$("emailthis-to-label");AE.proxy.set_status("failed");Element.addClassName(z,"failed");$("validation-error").style.display="block";$("validation-error").style.left="-254px"}else{if(AC.indexOf("Text did not match the image")!=-1){$("emailthis-captcha-subcaption").innerHTML=w;$("emailthis-captcha-subcaption").className="failed";var AA=$("captchaResponse");var y=$("emailthis-captcha-label");AA.proxy.set_status("failed");Element.addClassName(y,"failed");$("validation-error").style.display="block";$("validation-error").style.left="-254px"}else{B.style.display="none";$("emailthis-error").style.display="block";if(AG.responseXML){var AD=AG.responseXML;$("error-text").innerHTML=AD.getElementsByTagName("error")[0].firstChild.nodeValue}else{$("error-text").innerHTML="unknown error"}}}}}else{B.style.display="none";$("emailthis-otherarticles").style.display="block";EmailthisWindow.onsubmit(r)}Tracking.resetVars();Tracking.setVar("linkTrackVars","eVar2,eVar11,eVar34");Tracking.setVar("linkTrackEvents","event12");Tracking.setVar("events","event12");Tracking.setVar("products",";"+Tracking.articleTitle);Tracking.setVar("eVar2",Tracking.articleTitle);Tracking.setVar("prop2",Tracking.articleTitle);Tracking.setVar("eVar3",Tracking.articleCategory);Tracking.setVar("prop3",Tracking.articleCategory);Tracking.setVar("prop18",[Tracking.getVar("prop3"),Tracking.getVar("prop2")].join(":"));Tracking.setVar("eVar21",[Tracking.getVar("eVar3"),Tracking.getVar("eVar2")].join(":"));Tracking.setVar("eVar34",Tracking.pageContext);var AF=(document.location+"").replace(document.location.search,"");Tracking.setVar("prop14",AF);Tracking.setVar("eVar17",AF);var AH=$A(r.toAddresses.split(",")).collect(function(AI){var AJ=AI.split("@");return";"+AJ[1]});Tracking.setVar("eVar11",AH.length);s.tl(null,"o","")},onFailure:function(y){B.style.display="none";$("emailthis-error").style.display="block";$("error-text").innerHTML=(y.status==500)?("Server Error. Please try again.<!-- "+y.responseText+" -->"):(y.responseText||"unknown error")},parameters:Ajax.parameters(r)})}else{var f=$("toAddresses");var a=$("emailthis-to-label");var u=$("fromAddress");var q=$("emailthis-from-label");var Z=$("captchaResponse");var e=$("emailthis-captcha-label");if(!x){f.proxy.set_status("failed");Element.addClassName(a,"failed")}else{f.proxy.set_status("default");Element.removeClassName(a,"failed")}if(!g){u.proxy.set_status("failed");Element.addClassName(q,"failed")}else{u.proxy.set_status("default");Element.removeClassName(q,"failed")}if(!b){Z.proxy.set_status("failed");Element.addClassName(e,"failed")}else{Z.proxy.set_status("default");Element.removeClassName(e,"failed")}$("validation-error").style.display="block";$("validation-error").style.left="-254px"}return cancelEvent(i)};return true},toValue:"",saveToValue:function(){EmailthisWindow.toValue=$("toAddresses").value}};function onABCommComplete(C){if(C){var B=C[0];if(B.length>0){var D=[];for(var A=0;A<C.length;A++){D.push(C[A][1])}$("toAddresses").value=(EmailthisWindow.toValue=="")?D.join(", "):EmailthisWindow.toValue+", "+D.join(", ")}}EmailthisWindow.saveToValue()};
/* /modules/articles/article_recommend.js */
CommunityManager.prototype.getRating=function(B,A,C,E){if(B.indexOf(",")==-1){var D={byAboutID:B,fields:"aboutID"}}else{var D="fields=aboutID&version=1.0&account="+encodeURIComponent(this.accountURI)+"&type=json&"+this.__getMultiAboutIDQuery(B)}this._makeJsonServiceCall(D,C+tpRatingMetadataServicePath,A,null,function(F){E(F,B)})};CommunityManager.prototype.getTotalRating=function(B,A,C,E){if(B.indexOf(",")==-1){var D={byAboutID:B,fields:"count,aboutID"}}else{var D="fields=aboutID,count&version=1.0&account="+encodeURIComponent(this.accountURI)+"&type=json&"+this.__getMultiAboutIDQuery(B)}this._makeJsonServiceCall(D,C+tpTotalRatingMetadataServicePath,A,null,function(F){E(F,B)})};CommunityManager.prototype.__getMultiAboutIDQuery=function(D){var B=D.split(",");var C="";for(var A=0;A<B.length;A++){C+="byAboutID="+encodeURIComponent(B[A]);if(A+1!=B.length){C+="&"}}return C};ArticleRecommend=function(){this._initialize.apply(this,arguments)};ArticleRecommend.prototype={_initialize:function(B){this.myRatingLoading=false;this.totalRatingLoading=false;this.cmInstance=B.cmInstance;var D=j$(B.recommendSelector);var G=[];for(var A=0;A<D.length;A++){this._widgets.push(new this._recommendWidget(D.eq(A),this));G.push(D[A].getAttribute("rel"))}var H=this;var F=function(K){var J=K.join(",");H.cmInstance.getRating(K,"1.0",tpRatingDataServicePrefix,H._getRatingAfter.bindTo(H));H.cmInstance.getTotalRating(K,"1.0",tpTotalRatingDataServicePrefix,H._getTotalRatingAfter.bindTo(H))};var I=5;var E=[];for(var C=0;C<G.length;C++){if(C%I==0&&E.length>0){F(E);E=[]}E.push(G[C])}if(E.length>0){F(E)}},_widgets:[],_getRatingAfter:function(B,E){for(var C=0;C<E.length;C++){var D=this._findWidgetsByAboutID(E[C]);for(var A=0;A<D.length;A++){D[A]._loader.hide();D[A]._getRatingAfter()}}if(typeof B.items!="undefined"){for(var C=0;C<B.items.length;C++){var D=this._findWidgetsByAboutID(B.items[C].aboutID);for(var A=0;A<D.length;A++){D[A]._getRatingAfter(B.items[C])}}}},_getTotalRatingAfter:function(B,E){for(var C=0;C<E.length;C++){var D=this._findWidgetsByAboutID(E[C]);for(var A=0;A<D.length;A++){D[A]._getTotalRatingAfter()}}if(typeof B.items!="undefined"){for(var C=0;C<B.items.length;C++){var D=this._findWidgetsByAboutID(B.items[C].aboutID);for(var A=0;A<D.length;A++){D[A]._getTotalRatingAfter(B.items[C])}}}},_findWidgetsByAboutID:function(C){var B=[];for(var A=0;A<this._widgets.length;A++){if(this._widgets[A].objectURI==C){B.push(this._widgets[A])}}return B},_addToDataQueue:function(){}};ArticleRecommend.prototype._recommendWidget=function(){this._initialize.apply(this,arguments)};ArticleRecommend.prototype._recommendWidget.prototype={_initialize:function(C,B){this._widgetElement=C;this._isLink=!this._widgetElement.hasClass("non-link");var A=this._isLink?"a":"span";this._ratingData=j$(DomFragment("span",{className:"recommend_data",style:{display:"none"},toAppend:[DomFragment("b",{className:"pre-recommend",toAppend:[document.createTextNode("Must Read?")]}),DomFragment("b",{className:"post-recommend",toAppend:[document.createTextNode("Thank You")]}),DomFragment(A,{className:"recommend",toAppend:[DomFragment("span",{toAppend:[document.createTextNode("Yes")]}),DomFragment("b"),DomFragment("strong")]})]}));this._ratingData.find(".recommend b").html("<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>");this._loader=jQuery(".cm_recommend_loading",this._widgetElement);this._firstLoaded=false;this._recommendCount=0;DomFragment(this._widgetElement[0],{toAppend:[this._ratingData[0]]});this.objectURI=C.attr("rel");this.$super=B},_getRatingAfter:function(A){if(this._isLink){this._ratingData.bind("click",this,this._recommend)}if(typeof A!="undefined"){this._deactivateLink()}else{this._activateLink()}this._registerLoad("rating",A)},_getTotalRatingAfter:function(A){if(typeof A!="undefined"){this._recommendCount=Number(A.totalRating.count);this._setCountText(A.totalRating.count);this._registerLoad("totalRating",A)}else{this._recommendCount=0;this._setCountText(0);this._registerLoad("totalRating")}},_registerLoad:function(B,A){if(this._firstLoaded==true){this._loader.hide();this._ratingData.show()}else{this._firstLoaded=true}},_activateLink:function(){if(this._isLink){var A=this._ratingData.find("a");A.attr({href:"#",title:"Click here to recommend this content."})}this._ratingData.removeClass("user_recommends")},_deactivateLink:function(){if(this._isLink){var A=this._ratingData.find("a");A.attr({href:"",title:"You have recommended this content."})}this._ratingData.addClass("user_recommends")},_recommend:function(B){B.preventDefault();var C=B.data;if(!C._ratingData.hasClass("user_recommends")){C.$super.cmInstance.addRating(C.objectURI,1,"1.0",tpRatingDataServicePrefix,C._recommendError.bindTo(this));var D=C.$super._findWidgetsByAboutID(C.objectURI);var E=C._recommendCount+1;for(var A=0;A<D.length;A++){D[A]._setWidgetDisplay(E)}C._openShare()}},_setWidgetDisplay:function(A){this._setCount(A);this._deactivateLink()},_setCount:function(A){this._recommendCount=Number(A);this._setCountText(A)},_setCountText:function(B){var A=this._ratingData.find("strong");A.text(B)},_recommendError:function(A){},_openShare:function(){this._widgetElement.find(".recommend-share").addClass("poppedShare")}};jQuery(document).ready(function(){ComcastRecommend=new ArticleRecommend({recommendSelector:".community_recommend",cmInstance:tpCommunityManager})});
/* /modules/games.js */
addLoadEvent(function(){var B=new TabBar("games");var A=0;for(var C=0;tab=B.tab(C);C++){if(Element.hasClassName(tab,"default")){A=C}}B.onchange=function(I){var H=this.tab(I),F=this.panel(I);if(!H||!F){return false}var G=F.getElementsByTagName("div");var E=G.length>0?G[0].className:"success";if(E!="loading"){return true}var D=decodeURI(H.getElementsByTagName("a")[0].href.split("#")[1]);new Ajax.Request("./games/"+D+"/",{method:"get",onSuccess:function(J){F.innerHTML=J.responseText}});return true};B._tracking=false;B.update(A);B._tracking=true});
