var Autocompleter={}; Autocompleter.Base=new Class({options:{targetElement:null,minLength:3,markQuery:true,width:"400px",maxChoices:10,injectChoice:null,customChoices:null,className:"autocompleter-choices",zIndex:42,delay:250,observerOptions:{},fxOptions:{},onOver:$empty,onSelect:$empty,onSelection:$empty,onShow:$empty,onHide:$empty,onBlur:$empty,onFocus:$empty,autoSubmit:false,autoSubmitFormName:"",overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true, choicesMatch:null,multiple:false,separator:", ",separatorSplit:/\s*[,;]\s*/,autoTrim:true,allowDupes:false,cache:true,relative:false},initialize:function(a,c){this.element=$(a);this.setOptions(c);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({delay:this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter)this.filter=this.options.filter.bind(this);var b=this.options.selectMode;this.typeAhead=b=="type-ahead";this.selectMode= b===true?"selection":b;this.cached=[]},build:function(){if($(this.options.customChoices))this.choices=this.options.customChoices;else{this.choices=(new Element("ul",{"class":this.options.className,styles:{zIndex:this.options.zIndex}})).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,"after");this.relative=this.element.getOffsetParent()}this.fix=new OverlayFix(this.choices)}if(!this.options.separator.test(this.options.separatorSplit))this.options.separatorSplit= this.options.separator;this.fx=!this.options.fxOptions?null:(new Fx.Tween(this.choices,$merge({property:"opacity",link:"cancel",duration:200},this.options.fxOptions))).addEvent("onStart",Chain.prototype.clearChain).set(0);this.element.setProperty("autocomplete","off").addEvent(Browser.Engine.trident||Browser.Engine.webkit?"keydown":"keypress",this.onCommand.bind(this)).addEvent("click",this.onCommand.bind(this,[false])).addEvent("focus",this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent("blur", this.toggleFocus.create({bind:this,arguments:false,delay:100}))},destroy:function(){this.fix&&this.fix.destroy();this.choices=this.selected=this.choices.destroy()},toggleFocus:function(a){(this.focussed=a)||this.hideChoices(true);this.fireEvent(a?"onFocus":"onBlur",[this.element])},onCommand:function(a){if(!a&&this.focussed)return this.prefetch();if(a&&a.key&&!a.shift)switch(a.key){case "enter":this.setSelection();if(this.element.value!=this.opted)break;if(this.selected&&this.visible){this.choiceSelect(this.selected); return!!this.options.autoSubmit}break;case "up":case "down":if(!this.prefetch()&&this.queryValue!==null){a=a.key=="up";this.choiceOver((this.selected||this.choices)[this.selected?a?"getPrevious":"getNext":a?"getLast":"getFirst"](this.options.choicesMatch),true)}return false;case "esc":case "tab":this.hideChoices(true)}return true},setSelection:function(a){var c=this.selected.inputValue,b=c,d=this.queryValue.length,e=c.length;if(c.substr(0,d).toLowerCase()!=this.queryValue.toLowerCase())d=0;if(this.options.multiple){var f= this.options.separatorSplit;b=this.element.value;d+=this.queryIndex;e+=this.queryIndex;f=b.substr(this.queryIndex).split(f,1)[0];b=b.substr(0,this.queryIndex)+c+b.substr(this.queryIndex+f.length);if(a){e=/[^\s,]+/;b=b.split(this.options.separatorSplit).filter(e.test,e);this.options.allowDupes||(b=[].combine(b));e=this.options.separator;b=b.join(e)+e;e=b.length}}this.observer.setValue(b);this.opted=b;if(a||this.selectMode=="pick")d=e;this.element.selectRange(d,e);this.fireEvent("onSelection",[this.element, this.selected,b,c]);this.options.autoSubmit&&this.options.autoSubmitFormName!=""&&document.forms[this.options.autoSubmitFormName].submit()},showChoices:function(){var a=this.options.choicesMatch,c=this.choices.getFirst(a);this.selected=this.selectedValue=null;if(this.fix){var b;b=this.options.targetElement?this.options.targetElement.getCoordinates(this.relative):this.element.getCoordinates(this.relative);width=this.options.width||"auto";this.choices.setStyles({left:b.left-365,top:b.bottom,width:width=== true||width=="inherit"?b.width:width})}if(c){if(!this.visible){this.visible=true;this.choices.setStyle("display","");this.fx&&this.fx.start(1);this.fireEvent("onShow",[this.element,this.choices])}if(this.options.selectFirst||this.typeAhead||c.inputValue==this.queryValue)this.choiceOver(c,this.typeAhead);c=this.choices.getChildren(a);b=this.options.maxChoices;a={overflowY:"hidden",height:""};this.overflown=false;if(c.length>b){c=c[b-1];a.overflowY="scroll";a.height=c.getCoordinates(this.choices).bottom; this.overflown=true}this.choices.setStyles(a);this.fix.show()}},hideChoices:function(a){if(a){a=this.element.value;if(this.options.forceSelect)a=this.opted;if(this.options.autoTrim)a=a.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator);this.observer.setValue(a)}if(this.visible){this.visible=false;this.observer.clear();a=function(){this.choices.setStyle("display","none");this.fix.hide()}.bind(this);this.fx?this.fx.start(0).chain(a):a();this.fireEvent("onHide",[this.element, this.choices])}},prefetch:function(){var a=this.element.value,c=a;if(this.options.multiple){var b=this.options.separatorSplit;c=a.split(b);var d=this.element.getCaretPosition();a=a.substr(0,d).split(b);b=a.length-1;d-=a[b].length;c=c[b]}if(c.length
';this.div.appendChild(this.waiting_box)}},endLoadingIcon:function(){this.options.showLoading&&this.div.removeChild($("waitBox"))}});function ab_impression(a,b){(new Request({url:"p_include/ajax_func.html",method:"post",onComplete:function(){location.href=a}})).send("func=log_impression&ab_set_id="+b)};var Slider=new Class({Implements:Options,options:{trigger:null,height:300,element:null,scrollEle:null,content:null,OFX:Fx.Transitions.Sine.easeIn,CFX:Fx.Transitions.Bounce.easeOut,duration:1E3,mootoolsVer:1.2,execFirst:null},openEvent:null,closeEvent:null,openContentEvent:null,closeContentEvent:null,toggled:false,isSliding:false,initialize:function(a){if(!a.content)a.content=a.element;if(!a.scrollEle)a.scrollEle=a.element;if(a.mootoolsVer==1.2)this.setOptions(a);else{this.options.trigger=a.trigger|| null;this.options.height=a.height||300;this.options.padding=a.padding||30;this.options.position=a.position||"absolute";this.options.left=a.left||0;this.options.top=a.top||0;this.options.element=a.element||null;this.options.scrollEle=a.scrollEle||a.element||null;this.options.content=a.content||null;this.options.OFX=a.OFX||Fx.Transitions.Sine.easeIn||null;this.options.CFX=a.CFX||Fx.Transitions.Bounce.easeOut||null;this.options.duration=a.duration||1E3;this.options.mootoolsVer=a.mootoolsVer||1.2;this.options.execFirst= a.execFirst}this.applySlider();this.setTrigger();window.addEvent("click",function(b){this.toggled&&this.checkParentNodes(b.target)}.bind(this))},applySlider:function(){if(this.options.element!=null)if(this.options.mootoolsVer==1.2){this.openEvent=new Fx.Tween(this.options.element,{transition:this.options.OFX,duration:this.options.duration,property:"height",onStart:function(){this.options.execFirst!=null&&this.options.execFirst();this.options.element.style.display="";this.isSliding=true}.bind(this), onComplete:function(){this.isSliding=false}.bind(this)});this.closeEvent=new Fx.Tween(this.options.element,{transition:this.options.CFX,duration:this.options.duration,property:"height",onStart:function(){this.isSliding=true}.bind(this),onComplete:function(){this.options.element.style.display="none";this.isSliding=false}.bind(this)});this.openContentEvent=new Fx.Tween(this.options.content,{transition:this.options.OFX,duration:this.options.duration,property:"margin-top",onStart:function(){this.options.content.style.display= ""}.bind(this),onComplete:function(){this.options.scrollEle.style.overflowY="scroll";this.toggled=true}.bind(this)});this.closeContentEvent=new Fx.Tween(this.options.content,{transition:this.options.CFX,duration:this.options.duration,property:"margin-top",onStart:function(){this.options.scrollEle.style.overflow="hidden"}.bind(this),onComplete:function(){this.options.content.style.display="none";this.toggled=false}.bind(this)})}else{this.openEvent=new Fx.Styles(this.options.element,{duration:this.options.duration, onStart:function(){this.options.execFirst!=null&&this.options.execFirst();this.options.element.style.display=""}.bind(this)});this.closeEvent=new Fx.Styles(this.options.element,{duration:this.options.duration,onComplete:function(){this.options.element.style.display="none"}.bind(this)});this.openContentEvent=new Fx.Styles(this.options.content,{duration:this.options.duration,onStart:function(){this.options.content.style.display=""}.bind(this),onComplete:function(){this.options.scrollEle.style.overflowY= "scroll";this.toggled=true}.bind(this)});this.closeContentEvent=new Fx.Styles(this.options.content,{duration:this.options.duration,onStart:function(){this.options.scrollEle.style.overflow="hidden"}.bind(this),onComplete:function(){this.options.content.style.display="none";this.toggled=false}.bind(this)})}},setTrigger:function(){this.options.trigger!=null&&this.options.trigger.addEvent("click",function(){this.toggled?this.close():this.open()}.bind(this))},open:function(){if(!this.isSliding&&!this.toggled)if(this.options.mootoolsVer== 1.2){this.openEvent.start(0,this.options.height);this.openContentEvent.start(-this.options.height,0)}else{this.openEvent.start({height:[0,this.options.height]});this.openContentEvent.start({"margin-top":[-this.options.height,0]})}},close:function(){if(!this.isSliding)if(this.options.mootoolsVer==1.2){this.closeEvent.start(this.options.height,0);this.closeContentEvent.start(0,-this.options.height)}else{this.closeEvent.start({height:[this.options.height,0]});this.closeContentEvent.start({"margin-top":[0, -this.options.height]})}},checkParentNodes:function(a){for(;a!=$(document.body)&&a!=$(document.html);)if(!a||a.id==this.options.element.id)return;else a=a.parentNode;this.close()}});var pScroll=new Class({Implements:Options,options:{productHeight:142,productWidth:186,numberOfProducts:4,scrollFX:Fx.Transitions.Quart.easeInOut,duration:1E3,parentDiv:null,orientation:"horizontal",url:location.href,func:"getRecentlyViewed",title:"",doAnimation:false,viewAllLink:""},contentTable:null,content:null,pagination:null,paginationBullets:null,products:null,headerTable:null,leftArrowTop:null,leftArrow:null,rightArrowTop:null,rightArrow:null,viewAllLink:null,startingIndex:0,margin:0,generatedLIndex:0, generatedRIndex:0,totalLength:0,activePage:0,initialize:function(a){if(!a.parentDiv){alert("You must supply the parentDiv ID!");return false}this.setOptions(a);this.totalLength=this.options.orientation=="horizontal"?this.options.numberOfProducts*this.options.productWidth:this.options.numberOfProducts*this.options.productHeight;this.setProducts("func="+this.options.func);this.setupPScroll();this.contentTable.set("tween",{duration:this.options.duration,transition:this.options.scrollFX})},setupPScroll:function(){if(this.options.orientation== "horizontal"){var a=(new Element("table",{cellspacing:0,cellpadding:0,align:"right",width:this.totalLength+48+"px",style:"margin-bottom:10px; margin-left:10px; clear:both;",align:"left"})).inject(this.options.parentDiv);a=(new Element("tbody")).inject(a);var b=(new Element("tr")).inject(a),c=(new Element("td",{colspan:10})).inject(b);this.headerTable=(new Element("table",{"class":"productSubSectionHeader"})).inject(c);b=(new Element("tbody")).inject(this.headerTable);b=(new Element("tr")).inject(b); (new Element("td",{html:this.options.title})).inject(b);this.paginationBullets=(new Element("td",{"class":"paginationDots"})).inject(b);this.pagination=(new Element("td",{"class":"viewAllLink"})).inject(b);b=(new Element("tr")).inject(a);this.leftArrowTop=(new Element("td",{"class":"topCapPieceLeft",style:"height:4px;",html:'
',events:{click:this.scroll.bind(this,-1),mouseover:this.hover.bind(this,[-1,1]),mouseout:this.hover.bind(this,[-1,0])}})).inject(b);c= (new Element("td",{style:"width:"+this.totalLength+"px;",rowspan:2,"class":"scrollingProductContainer"})).inject(b);d=(new Element("div",{style:"overflow:hidden;width:"+this.totalLength+"px;"})).inject(c);this.contentTable=(new Element("table",{"class":"productScrollTable"})).inject(d);c=(new Element("tbody")).inject(this.contentTable);this.content=(new Element("tr")).inject(c);this.rightArrowTop=(new Element("td",{"class":"topCapPieceRight",style:"height:4px;",html:'
', events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(b);b=(new Element("tr")).inject(a);this.leftArrow=(new Element("td",{"class":"horizontalPScroll",style:"padding-right:5px;",events:{click:this.scroll.bind(this,-1),mouseover:this.hover.bind(this,[-1,1]),mouseout:this.hover.bind(this,[-1,0])}})).inject(b);(new Element("div",{"class":"leftArrow"})).inject(this.leftArrow);this.rightArrow=(new Element("td",{"class":"horizontalPScroll", style:"padding-right:5px;",events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(b);(new Element("div",{"class":"rightArrow"})).inject(this.rightArrow)}else{a=(new Element("table",{cellspacing:0,cellpadding:0,align:"center",height:this.totalLength+100+"px",style:"clear:both;"})).inject(this.options.parentDiv);a=(new Element("tbody")).inject(a);b=(new Element("tr")).inject(a);c=(new Element("td")).inject(b);var d=(new Element("div", {"class":"verticalHeaderLine",html:this.options.title})).inject(c);this.pagination=(new Element("div",{style:"text-align:center;",html:" "})).inject(c);this.viewAllLink=(new Element("div",{"class":"verticalViewAllProducts",html:'View All Products'})).inject(c);this.leftArrow=(new Element("tr")).inject(a);(new Element("td",{html:'',events:{click:this.scroll.bind(this,-1),mouseover:this.hover.bind(this,[-1,1]),mouseout:this.hover.bind(this, [-1,0])}})).inject(this.leftArrow);b=(new Element("tr")).inject(a);c=(new Element("td")).inject(b);d=(new Element("div",{"class":"verticalScrollProductContainer",style:"height:"+this.totalLength+"px;"})).inject(c);this.contentTable=(new Element("table",{cellspacing:0,cellpadding:0,align:"right",style:"margin-bottom:10px; clear:both; float:none;"})).inject(d);this.content=(new Element("tbody")).inject(this.contentTable);this.rightArrow=(new Element("tr")).inject(a);(new Element("td",{"class":"arrowButton", html:'',events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(this.rightArrow)}},scroll:function(a){this.activePage+=a;var b=this.startingIndex,c=this.margin;this.startingIndex+=a*this.options.numberOfProducts;this.margin=1*(this.margin+-a*this.totalLength);if(this.startingIndex>=this.products.length||this.startingIndex<0){this.startingIndex=b;this.margin=c;return false}this.startingIndex
',events:{click:this.scroll.bind(this,-1),mouseover:this.hover.bind(this,[-1, 1]),mouseout:this.hover.bind(this,[-1,0])}})).inject(b);c=(new Element("td",{style:"width:"+this.totalLength+"px;",rowspan:2,"class":"scrollingProductContainer"})).inject(b);d=(new Element("div",{style:"overflow:hidden;width:"+this.totalLength+"px;"})).inject(c);this.contentTable=(new Element("table",{"class":"productScrollTable"})).inject(d);c=(new Element("tbody")).inject(this.contentTable);this.content=(new Element("tr")).inject(c);this.rightArrowTop=(new Element("td",{"class":"topCapPieceRight2", style:"height:4px;",html:'
',events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(b);b=(new Element("tr")).inject(a);this.leftArrow=(new Element("td",{"class":"horizontalPScroll",style:"padding-right:5px;",events:{click:this.scroll.bind(this,-1),mouseover:this.hover.bind(this,[-1,1]),mouseout:this.hover.bind(this,[-1,0])}})).inject(b);(new Element("div",{"class":"leftArrow"})).inject(this.leftArrow); this.rightArrow=(new Element("td",{"class":"horizontalPScroll",style:"padding-right:5px;",events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(b);(new Element("div",{"class":"rightArrow"})).inject(this.rightArrow)}else{a=(new Element("table",{cellspacing:0,cellpadding:0,align:"center",height:this.totalLength+100+"px",style:"clear:both;"})).inject(this.options.parentDiv);a=(new Element("tbody")).inject(a);b=(new Element("tr")).inject(a); c=(new Element("td")).inject(b);var d=(new Element("div",{"class":"verticalHeaderLine",html:this.options.title})).inject(c);this.pagination=(new Element("div",{style:"text-align:center;",html:" "})).inject(c);this.viewAllLink=(new Element("div",{"class":"verticalViewAllProducts",html:'VIEW ALL MEDIA BUZZ'})).inject(c);this.leftArrow=(new Element("tr")).inject(a);(new Element("td",{html:'',events:{click:this.scroll.bind(this, -1),mouseover:this.hover.bind(this,[-1,1]),mouseout:this.hover.bind(this,[-1,0])}})).inject(this.leftArrow);b=(new Element("tr")).inject(a);c=(new Element("td")).inject(b);d=(new Element("div",{"class":"verticalScrollProductContainer",style:"height:"+this.totalLength+"px;"})).inject(c);this.contentTable=(new Element("table",{cellspacing:0,cellpadding:0,align:"right",style:"margin-bottom:10px; clear:both; float:none;"})).inject(d);this.content=(new Element("tbody")).inject(this.contentTable);this.rightArrow= (new Element("tr")).inject(a);(new Element("td",{"class":"arrowButton",html:'',events:{click:this.scroll.bind(this,1),mouseover:this.hover.bind(this,[1,1]),mouseout:this.hover.bind(this,[1,0])}})).inject(this.rightArrow)}},scroll:function(a){this.activePage+=a;var b=this.startingIndex,c=this.margin;this.startingIndex+=a*this.options.numberOfProducts;this.margin=1*(this.margin+-a*this.totalLength);if(this.startingIndex>=this.products.length||this.startingIndex< 0){this.startingIndex=b;this.margin=c;return false}this.startingIndex
"+a.month+" "+a.year})).inject(b); if(this.options.orientation=="vertical"){a=new Element("tr");b.inject(a);b=a}return b}});window.addEvent("domready",function(){$("extraSmallImage")&&resizeExtraSmallImageIfNecessary();$("readFullArticle")&&removeReadFullArticleLinkIfArticleIsTooShort($("readFullArticle"))});function loadSecondaryNavigation(){(new Request({url:"/p_include/ajax_func.html",method:"post",onComplete:function(a){$("secondaryNavigation").innerHTML=a}})).send("func=loadSecondaryNavigation")} function toggleArticle(a){a.innerHTML=a.innerHTML=="read full article"?"collapse article":"read full article";a.className=a.className=="readFullArticle"?"collapseArticle":"readFullArticle";a=$("innerArticleBody").offsetHeight*1+20;$("articleBody").tween("height",$("articleBody").clientHeight==300?a:300)}function removeReadFullArticleLinkIfArticleIsTooShort(a){var b=$("innerArticleBody").offsetHeight*1+20;if(b<300)$("articleBody").style.height=b,a.parentNode.removeChild(a)} function openPrintArticleWindow(){var a="";a+=$("banner_url")?$("banner_url").innerHTML:"";a+=$("logo_url")?$("logo_url").innerHTML:"";a+=$("innerArticleBody")?'
Your review has been posted
'+ e,"","reloadProductReviews");try{togglePostNodeChildren(master_node_id,1)}catch(d){}}})).send("func=refreshProductReviews&product_id="+a+"&bundle_id="+b+"&template_usage_id="+c);else{for(var h="Please correct the following errors before you submit your review.\n\n",f=0;fYour comment has been posted
'+ e,"","reloadProductReviews");try{togglePostNodeChildren(h,1)}catch(d){}}})).send("func="+d+"&product_id="+a+"&bundle_id="+b+"&template_usage_id="+c);else{for(var g="Please correct the following errors before you submit your review.\n\n",i=0;iYour comment has been posted
'+g,"","reloadProductReviews");try{togglePostNodeChildren(h,1)}catch(d){}topMostParentNode&&viewComments(topMostParentNode);for(var a=$("numberOfCommentsForRefresh").innerHTML,e=$$(".refreshNumberOfComments"),f=0;fYour comment has been posted
'+g,"","reloadProductReviews");try{togglePostNodeChildren(h,1)}catch(d){}topMostParentNode&&viewComments(topMostParentNode); for(var a=$("reviewsToRefresh").innerHTML,e=$$(".reviewsToRefresh"),f=0;f