var POWERREVIEWS=POWERREVIEWS||(function(){var publicScope={common:{},display:{}};var gFlagDisplayInitFinished=false;var gFlagDataInitFinished=false;var gMetaInfo=null;var gContentsHash={};var gBatchHash={};var gReviewHash={};var gResult={};publicScope.common.gResult=gResult;var optionsHash={};var gCallbacks={};var gNumObjectsRequested=0;var prEncode=encodeURIComponent||escape;var gPrBaseStylesheetId="prBaseStylesheet";var gPrMerchantOverrideStylesheetId="prMerchantOverrideStylesheet";var gStarClasses={"0":{large:"pr-stars-0",small:"pr-stars-0-sm"},"1":{large:"pr-stars-1",small:"pr-stars-1-sm"},"1.5":{large:"pr-stars-1_5",small:"pr-stars-1_5-sm"},"2":{large:"pr-stars-2",small:"pr-stars-2-sm"},"2.5":{large:"pr-stars-2_5",small:"pr-stars-2_5-sm"},"3":{large:"pr-stars-3",small:"pr-stars-3-sm"},"3.5":{large:"pr-stars-3_5",small:"pr-stars-3_5-sm"},"4":{large:"pr-stars-4",small:"pr-stars-4-sm"},"4.5":{large:"pr-stars-4_5",small:"pr-stars-4_5-sm"},"5":{large:"pr-stars-5",small:"pr-stars-5-sm"}};var defaults={pr_merchant_table:{"m6141":{"name":"Road Runner Sports","cobranded":"true"}},pr_merchant_id:6141,pr_site_id:null,pr_merchant_group_id:12342,pr_locale:"en_US",pr_read_review:"#ReviewHeader",pr_read_qa:"#QAHeader",pr_write_review:"",pr_ask_question:"",pr_answer_question:"",pr_js_controller_url:"http://services.powerreviews.com/JSController.do",pr_reviews_per_page:10,pr_questions_per_page:10,pr_zip_location:"/rrs/",pr_powerreviews_root:"pwr",pr_review_display_usage_tracker_path:"http://cdn.powerreviews.com/aux/",pr_allow_engine_css_override:true,pr_style_sheet:"",pr_analytics_script_src:"",pr_analytics_account:"",pr_badge_definitions_url:"javascript:POWERREVIEWS.common.showSmallPopup('http://www.powerreviews.com/legal/badge_definitions_~~~LOCALE~~~.html', 580, 460)",pr_expert_badge_definitions_url:"javascript:POWERREVIEWS.common.showSmallPopup('http://www.powerreviews.com/legal/expert_badge_definitions_~~~LOCALE~~~.html', 580, 460)",pr_frame_height:3000,pr_base_services_urls:{"-":"http://services.powerreviews.com/"},pr_base_follow_landing_urls:{"-":"http://social.powerreviews.com"},pr_resize_url:"",pr_snippet_min_reviews:0,pr_suppress_google_plus_one:false,pr_source:"web",pr_image_snippet_show_image:showImagePopup,pr_image_snippet_max:7,pr_snippet_star_click:"",pr_back_to_top_link:"#",pr_see_all_reviews_url:"",pr_nbr_displayed_profile_reviews:-1,pr_overwrite_inline_content:false,pr_badge_table:{"11024":{"locales":{"en_CA":{"hovertext":"","description":"","filename":"badge_se_en_CA.gif"},"en_GB":{"hovertext":"Staff Reviewer","description":"A Staff Expert is a merchant or brand employee with recognized expertise within the company who contributes a review based on in-depth knowledge of the product as well as related products.","filename":"badge_se_en_GB.gif"},"pt_BR":{"hovertext":"","description":"","filename":"badge_se_pt_BR.gif"},"en_US":{"hovertext":"Staff Reviewer","description":"A Staff Expert is a merchant or brand employee with recognized expertise within the company who contributes a review based on in-depth knowledge of the product as well as related products.","filename":"badge_se_en_US.gif"},"de_DE":{"hovertext":"Mitarbeiter-Bewerter","description":"","filename":"badge_se_de_DE.gif"},"it_IT":{"hovertext":"","description":"","filename":"badge_se_it_IT.gif"},"fr_CA":{"hovertext":"","description":"","filename":"badge_se_fr_CA.gif"},"jp_JP":{"hovertext":"","description":"","filename":"badge_se_jp_JP.gif"},"fr_FR":{"hovertext":"","description":"","filename":"badge_se_fr_FR.gif"}},"label":"staff-expert","isStaff":true},"11023":{"locales":{"en_CA":{"hovertext":"Staff Reviewer","description":"A Staff Reviewer is a merchant or brand employee who contributes a review based on ownership or usage of the product.","filename":"badge_sr_en_CA.gif"},"en_GB":{"hovertext":"Staff Reviewer","description":"A Staff Reviewer is a merchant or brand employee who contributes a review based on ownership or usage of the product.","filename":"badge_sr_en_GB.gif"},"en_US":{"hovertext":"Staff Reviewer","description":"A Staff Reviewer is a merchant or brand employee who contributes a review based on ownership or usage of the product.","filename":"badge_sr_en_US.gif"},"de_DE":{"hovertext":"Mitarbeiter-Bewerter","description":"","filename":"badge_sr_de_DE.gif"},"fr_CA":{"hovertext":"Critique de personnel","description":"","filename":"badge_sr_fr_CA.gif"},"jp_JP":{"hovertext":"","description":"","filename":"badge_sr_jp_JP.gif"},"fr_FR":{"hovertext":"","description":"","filename":"badge_sr_fr_FR.gif"},"en_AU":{"hovertext":"Staff Reviewer","description":"A Staff Reviewer is a merchant or brand employee who contributes a review based on ownership or usage of the product.","filename":"badge_sr_en_AU.gif"},"nl_NL":{"hovertext":"Staff Beoordeler","description":"A Staff Beoordeler is een handelaar of merk werknemer die beoordelingen inzend op basis van eigendom of gebruik van het product.","filename":"badge_sr_nl_NL.gif"}},"label":"staff","isStaff":true},"11038":{"locales":{"en_US":{"hovertext":"Certified Wear Tester","description":"This group of reviewers is made up of people with a running/fitness background familiar with the fabric and construction of running shoes, apparel and gear.","filename":"badge_123421273073567544.gif"}},"label":"Certified Wear Tester","isStaff":true}},pr_attribution_table:{}};var params={};if(window&&window.location&&window.location.search){var query=window.location.search.substring(1).split("&");for(var i=0,len=query.length;i<len;++i){var parts=query[i].split("=");params[parts[0]]=parts[1];}}function getWithPrecedence(name){for(var i=1,len=arguments.length;i<len;++i){var hash=arguments[i];if(hash){var result=hash[name];if(typeof result!="undefined"){return result;}}}return null;}function get(name,options){return getWithPrecedence(name,options,params,window,defaults);}publicScope.common.get=get;function hashIt(str){var h=0;var i;for(i=0;i<str.length;i++){var charCode=str.charCodeAt(i);charCode=charCode*Math.abs(255-charCode);h+=charCode;}h=h%1023;h=h+"";var n=4;var a=h.split("");for(i=0;i<n-h.length;i++){a.unshift("0");}h=a.join("");h=h.substring(0,n/2)+"/"+h.substring(n/2,n);return h;}function prDisplayInit(mainDoc,options){if(gFlagDisplayInitFinished){return true;}else{if(!prDataInit(options)){return false;}}gFlagDisplayInitFinished=true;if(!document.getElementById(gPrBaseStylesheetId)){mainDoc.write('<link rel="stylesheet" href="'+getDocRoot(options)+'/engine/pr_styles_review.css" type="text/css" id="'+gPrBaseStylesheetId+'">\n');}var styleSheet=getDocRoot(options)+"/engine/merchant_styles2.css";var overrideStyleSheet=trim(get("pr_style_sheet",options));if(get("pr_allow_engine_css_override",options)&&overrideStyleSheet){styleSheet=overrideStyleSheet;}if(!document.getElementById(gPrMerchantOverrideStylesheetId)){mainDoc.write('<link rel="stylesheet" href="'+styleSheet+'" type="text/css" id="'+gPrMerchantOverrideStylesheetId+'">\n');}trackRDUsageInstance({"type":"init"},options);setTimeout(function(){trackRDUsageInstance({"type":"objects","count":gNumObjectsRequested},options);},5000);return true;}function prDataInit(options){if(gFlagDataInitFinished){return true;}else{if(!get("pr_page_id",options)&&!get("pr_merchant_user_id",options)){return false;}}gFlagDataInitFinished=true;return true;}function writeContentToDiv(divId,msg,callback){if(!document.getElementById(divId)){setTimeout(function(){writeContentToDiv(divId,msg,callback);},1000);}else{writeContentToDivNested(divId,msg,callback);}}function writeContentToDivNested(divId,msg,callback){try{if(!msg){msg="";}onDomReady(function(){replaceDivContent(document.getElementById(divId),msg);if(callback){callback();}});}catch(e){}}function replaceDivContent(div,content){if(div.parentNode){var newDiv=document.createElement("div");newDiv.id=div.id;newDiv.className=div.className;newDiv.innerHTML=content;div.parentNode.replaceChild(newDiv,div);return newDiv;}else{div.innerHTML=content;return div;}}function onDomReady(callback){if(typeof callback=="function"){(function(){if(isIE()){try{document.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,50);return ;}}callback();callback=null;})();}}function isIE(){return typeof document.all!="undefined"&&typeof window.opera=="undefined"&&!(navigator.vendor=="KDE");}function loadImage(src){new Image().src=src;}function getDocRoot(options){var result=get("pr_zip_location",options);if(result.charAt(result.length-1)!="/"){result+="/";}result+=get("pr_powerreviews_root",options);return result;}publicScope.common.getDocRoot=getDocRoot;function clean(pageId){return pageId.replace(/\W/g,"__");}function PRProductData(pageId,fullCount,quickCount,averageRating){this.pageId=pageId;this.fullReviewCount=fullCount;this.quickReviewCount=quickCount;this.averageRating=averageRating;this.getFullReviewCount=function(){return this.fullReviewCount;};this.getQuickReviewCount=function(){return this.quickReviewCount;};this.getAverageRating=function(){return this.averageRating;};this.getPageId=function(){return this.pageId;};}function getInfoFromContents(pageId,locale,products){return products&&products["locales"]&&products["locales"][locale]&&products["locales"][locale]["p"+pageId];}function getRadioValue(radioName){var radioArr=document.getElementsByName(radioName);for(var i=0;i<radioArr.length;i++){if(radioArr[i].checked){return radioArr[i].value;}}return null;}function replaceAll(string,text,by){return string.replace(new RegExp(text,"g"),by);}function trim(trimMe){return trimMe&&trimMe.replace(/^\s+|\s+$/g,"");}function prReplaceCrWithBr(str){if(typeof str=="string"){return str.replace(/\n/g,"<br />");}else{return str;}}function loadObject(url,key,callback,options){var docRoot=getDocRoot(options);var key=key||url.substring(url.indexOf(docRoot)+docRoot.length+1);if(gResult[key]){callback(gResult[key]);}else{var script=document.createElement("script");var handle=function(){if(gResult[key]){if(script.parentNode){script.parentNode.removeChild(script);delete script;}callback(gResult[key]);}};if(isIE()){script.onreadystatechange=handle;}else{script.onload=handle;}script.type="text/javascript";script.charset="utf-8";script.src=url;document.getElementsByTagName("head")[0].appendChild(script);gNumObjectsRequested++;}}function requestDataWithCallback(url,key,callback){gCallbacks[key]=callback;addScript(url);}function addScript(url){var script=document.createElement("script");script.type="text/javascript";script.charset="utf-8";script.src=url;document.getElementsByTagName("head")[0].appendChild(script);}function generalCallback(oData){var key=oData.key;if(key){var callback=gCallbacks[key];if(callback){callback(oData);}}}publicScope.common.generalCallback=generalCallback;function addClassName(objElement,strClass,blnMayAlreadyExist){if(objElement.className){var arrList=objElement.className.split(" ");if(blnMayAlreadyExist){var strClassUpper=strClass.toUpperCase();for(var i=0;i<arrList.length;i++){if(arrList[i].toUpperCase()==strClassUpper){arrList.splice(i,1);i--;}}}arrList[arrList.length]=strClass;objElement.className=arrList.join(" ");}else{objElement.className=strClass;}}function removeClassName(objElement,strClass){if(objElement.className){var arrList=objElement.className.split(" ");var strClassUpper=strClass.toUpperCase();for(var i=0;i<arrList.length;i++){if(arrList[i].toUpperCase()==strClassUpper){arrList.splice(i,1);i--;}}objElement.className=arrList.join(" ");}}function hasClass(element,clsName){var r=new RegExp("\\b"+clsName+"\\b");return r.test(element.className);}function getElementsByClassName(oElm,strTagName,oClassNames){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();var arrRegExpClassNames=new Array();if(typeof oClassNames=="object"){for(var i=0;i<oClassNames.length;i++){arrRegExpClassNames.push(new RegExp("(^|\\s)"+oClassNames[i].replace(/\-/g,"\\-")+"(\\s|$)"));}}else{arrRegExpClassNames.push(new RegExp("(^|\\s)"+oClassNames.replace(/\-/g,"\\-")+"(\\s|$)"));}var oElement;var bMatchesAll;for(var j=0;j<arrElements.length;j++){oElement=arrElements[j];bMatchesAll=true;for(var k=0;k<arrRegExpClassNames.length;k++){if(!arrRegExpClassNames[k].test(oElement.className)){bMatchesAll=false;break;}}if(bMatchesAll){arrReturnElements.push(oElement);}}return arrReturnElements;}function getAncestorBy(el,fn){if(fn(el)==true){return el;}else{if(el.parentNode){return arguments.callee(el.parentNode,fn);}else{return false;}}}function insertAfter(referenceNode,newNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}function registerOptions(key,options){optionsHash[key]=options;if(options){options._key=key;}}function getRegisteredKey(options){if(options){return options["_key"];}else{return"";}}function getOptions(key){return optionsHash[key]||{};}publicScope.common.getOptions=getOptions;function grabContents(pageId,locale,callback,options){var contents=gContentsHash[pageId];if(!contents){loadObject(getDocRoot(options)+"/content/"+hashIt(pageId)+"/contents.js",null,function(obj){contents=getInfoFromContents(pageId,locale,obj);gContentsHash[pageId]=contents?contents:"none";callback(contents);},options);}else{if(contents=="none"){callback(null);}else{callback(contents);}}}function grabRollup(pageId,locale,callback,options){loadObject(getDocRoot(options)+"/content/"+hashIt(pageId)+"/"+pageId+"-"+locale+"-rollup.js",null,function(obj){if(obj){callback(obj.rollup);}},options);}function grabMeta(pageId,locale,callback,options){if(!gMetaInfo){loadObject(getDocRoot(options)+"/content/"+hashIt(pageId)+"/"+pageId+"-"+locale+"-meta.js",null,function(obj){gMetaInfo=obj?obj.metadata:null;callback();},options);}else{callback();}}function grabBatch(pageId,locale,batch,callback,options){if(!gBatchHash[pageId+"-"+batch]){var url=getDocRoot(options)+"/content/"+hashIt(pageId)+"/"+pageId+"-"+locale+"-"+batch+"-reviews.js";loadObject(url,null,function(reviews){var arr=[];for(var i=0;i<reviews.length;i++){var review=reviews[i].r;gReviewHash[review.id]=review;arr.push(review);}gBatchHash[pageId+"-"+batch]=arr;callback();},options);}else{callback();}}function grabBatches(pageId,locale,batches,callback,options){var outstanding=batches.length;for(var i=0;i<batches.length;i++){grabBatch(pageId,locale,batches[i],function(){if(--outstanding<=0){callback();}},options);}}function roundRating(r){return Math.round(r*2)/2;}function trackRDUsageInstance(parameters,options){}function getServicesUrl(overrideKey,relativePath,options){var url;if(overrideKey){url=get(overrideKey,options);}if(!url){urlMap=get("pr_base_services_urls",options);url=urlMap["-"];siteId=get("pr_site_id",options);if(siteId&&urlMap[siteId]){url=urlMap[siteId];}url+=relativePath;}return url;}function getBaseFollowLandingUrl(options){var urlMap=get("pr_base_follow_landing_urls",options);var url=urlMap["-"];var siteId=get("pr_site_id",options);if(siteId&&urlMap[siteId]){url=urlMap[siteId];}url+="/fbonsite/";return url;}function getFacebookManageSettingsUrl(parameters,options){var url=getServicesUrl(null,"FacebookDisplayProfileController.dox",options);var addlParametersString=getParameterStringFromObject(parameters);if(addlParametersString.length){url+="?"+addlParametersString;}return url;}function getFacebookMakeCommentUrl(parameters,options){var url=getServicesUrl(null,"FacebookReviewStatementController.dox?context=STATEMENT",options);var addlParametersString=getParameterStringFromObject(parameters);if(addlParametersString.length){url+="&"+addlParametersString;}return url;}function getFacebookGetAdviceUrl(parameters,options){var url=getServicesUrl(null,"FacebookGetAdviceController/getAdviceQuestionForm.dox",options);var addlParametersString=getParameterStringFromObject(parameters);if(addlParametersString.length){url+="?"+addlParametersString;}return url;}function showFacebookGetAdvicePopup(parameters,options){var pageId=get("pr_page_id",options);var locale=get("pr_locale",options);var merchantGroupId=get("pr_merchant_group_id",options);var siteId=get("pr_site_id",options)||"-";var avgRating=parameters.avgRating||0;var facebookAdviceUrl=getFacebookGetAdviceUrl({"mgId":merchantGroupId,"siteId":siteId,"pageId":pageId,"avgRating":avgRating,"locale":locale},options);showSmallPopup(facebookAdviceUrl,450,600,{"location":"no"});}publicScope.common.showFacebookGetAdvicePopup=showFacebookGetAdvicePopup;function getParameterStringFromObject(parameters){var paramArray=[];for(var param in parameters){paramArray.push(param+"="+prEncode(parameters[param]));}return paramArray.join("&");}function showImagePopup(url,width,height,options){window.open("http://images2.powerreviews.com/media_popup.html?type=image&url="+prEncode(url),"sizedWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width="+width+",height="+height+",top=100,left=100");}publicScope.common.showImagePopup=showImagePopup;window.showImagePopup=showImagePopup;function showSmallPopup(filename,height,width,overrideOptions){var defaultOptions={"toolbar":"no","directories":"no","status":"no","menubar":"no","scrollbars":"yes","resizable":"yes","location":"yes","top":"200","left":"200"};var optionArray=[];for(var opt in defaultOptions){optionArray.push(opt+"="+((overrideOptions&&overrideOptions[opt])||defaultOptions[opt]));}var optionsString=optionArray.join(",");var smallWindow=window.open(filename,"smallWindow","width="+width+",height="+height+","+optionsString);if(window.focus){smallWindow.focus();}}publicScope.common.showSmallPopup=showSmallPopup;window.showSmallPopup=showSmallPopup;function showVideoPopup(url,options){window.open("http://images2.powerreviews.com/media_popup.html?type=video&url="+prEncode(url),"sizedWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=435,height=350,top=100,left=100");}publicScope.common.showVideoPopup=showVideoPopup;window.showVideoPopup=showVideoPopup;function togglePopOut(o,cmd,targ,e){var toggleHide=function(){removeClassName(document.getElementById(o.target),"pr-open");addClassName(document.getElementById(o.target),"pr-closed");};var toggleShow=function(){removeClassName(document.getElementById(o.target),"pr-closed");addClassName(document.getElementById(o.target),"pr-open");};if(window.event){e=window.event;e.cancelBubble=true;target=window.event.srcElement;currentTarget=event.srcElement.id;}else{if(e){e.stopPropagation();target=e.target;currentTarget=e.currentTarget.id;}else{return ;}}if(cmd=="show"){if(document.getElementById(o.target).className!="pr-open"){this.timedShow=setTimeout(toggleShow,400);}else{if(getAncestorBy(target,function(e){if(e.id==o.target){return true;}})){if(this.timedHide!=null){window.clearTimeout(this.timedHide);}}}}else{if(cmd=="hide"){if(this.timedHide!=null){window.clearTimeout(this.timedShow);}if(currentTarget==o.link||currentTarget==o.target||getAncestorBy(target,function(e){if(e.id==o.target){return true;}})){this.timedHide=setTimeout(toggleHide,800);}else{if(this.timedHide!=null){window.clearTimeout(this.timedHide);}}}}}publicScope.common.togglePopOut=togglePopOut;function showElement(elementId){var modalContainer=document.getElementById(elementId);removeClassName(modalContainer,"pr-hidden");}publicScope.display.showElement=showElement;function hideElement(elementId){var modalContainer=document.getElementById(elementId);addClassName(modalContainer,"pr-hidden");}publicScope.display.hideElement=hideElement;function truncateString(string,start,limit,addEllipses){var returnString=string.substring(start,limit);if(addEllipses){returnString+="...";}return returnString;}function copyContents(targ,orig){var content=document.getElementById(orig).innerHTML;writeContentToDiv(targ,content);}function validateEmail(email){var re=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return re.test(email);}function validateAndProcessEmail(el,options){var oData=JSON.parse(el.getAttribute("prData"));var input=document.getElementById(oData.target);var email=input.value;var errorNode=document.getElementById("pr-fb-follow-errorMsg-"+oData.locale+"-"+oData.pageId);if(!hasClass(errorNode,"pr-none")){addClassName(errorNode,"pr-none");}if(validateEmail(email)){var cbFn=function(oResultData){var oResult=oResultData;if(oResult.result.status.toLowerCase()=="ok"){var content=processFollowThankYouTemplate(oData,oData.locale,options);}else{var content=processFollowErrorTemplate(oData,oData.locale,options);}writeContentToDiv("pr-fb-follow-wrapper-"+oData.locale+"-"+oData.pageId,content);};var baseUrl=getBaseFollowLandingUrl(options);var key="verifyFollowEmail-"+oData.type+"-"+oData.keyValue;var url=baseUrl+oData.type+"/"+oData.locale+"/"+oData.merchantGroupId+"/"+oData.siteId+"/"+oData.keyValue+"?email="+encodeURIComponent(email)+"&key="+encodeURIComponent(key);requestDataWithCallback(url,key,cbFn);input.disabled=true;var throbber=document.createElement("img");throbber.src=getDocRoot(options)+"/engine/images/pr_loading.gif";throbber.style.cssText="float:right;padding:0 20px";insertAfter(el,throbber);addClassName(el,"pr-none");}else{removeClassName(errorNode,"pr-none");}}publicScope.common.validateAndProcessEmail=validateAndProcessEmail;var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else{if(isNaN(chr3)){enc4=64;}}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}return output;},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}if(enc4!=64){output=output+String.fromCharCode(chr3);}}output=Base64._utf8_decode(output);return output;},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else{if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}}return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=0;var c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else{if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}}return string;}};var JSON;if(!JSON){JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});};}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");};}}());var gSortFunctions={};var gDateNew=0;var gDateOld=1;var gRatingHigh=2;var gRatingLow=3;var gHelpfulHigh=4;var gHelpfulLow=5;var gCurrentSort=null;var gTimer=new Date();var gVoteClickHash={};var gErrorClickHash={};var gDataCallbacks=[];function getMerchant(options){return get("pr_merchant_table",options)["m"+get("pr_merchant_id",options)];}function writePowerreviewsAnalyticsScriptConditionally(mainDoc,options){var src=get("pr_analytics_script_src",options);if(src){mainDoc.write('<script src="'+src+'" type="text/javascript"><\/script>');}}function engine(mainDoc,options){if(prDisplayInit(mainDoc,options)){var pageId=get("pr_page_id",options);var pageIdClean=clean(pageId);var locale=get("pr_locale",options);var optionsKey="engine-"+pageIdClean+"-"+locale;registerOptions(optionsKey,options);var divPresent=document.getElementById("pr-review-engine-"+pageIdClean);var showWriteReview=function(){var link=document.getElementById("writeReview")||document.getElementById("write-review-"+pageIdClean);if(link){var writeReviewUrl=getReviewWrapperUrl(pageId,options);if(writeReviewUrl){link.href=writeReviewUrl;var elem=document.getElementById("pr-snapshot-footer-"+pageIdClean);if(elem){elem.style.display="";}}}else{setTimeout(showWriteReview,100);}};if(!divPresent){writeEngineDivs(mainDoc,pageIdClean);}writePowerreviewsAnalyticsScriptConditionally(mainDoc,options);if(!divPresent||get("pr_overwrite_inline_content",options)){displayInitialReviewBox(pageIdClean,locale,optionsKey,options,function(){removeEngineScreen(pageIdClean);showWriteReview();showFacebookInteractionLinks(options);});}else{showWriteReview();showFacebookInteractionLinks(options);}processCallbacksAndBeacon(pageIdClean,locale,options);}}publicScope.display.engine=engine;window.engine=engine;function getReviewWrapperUrl(pageId,options){return replaceAll(get("pr_write_review",options),"~~~PAGE_ID~~~",pageId);}function writeEngineDivs(mainDoc,pageId){mainDoc.write('<div id="pr-review-engine-'+pageId+'" class="pr-review-engine"><div id="pr-header-'+pageId+'" class="pr-header"></div><div id="pr-contents-'+pageId+'" class="pr-contents"></div></div>');}function removeEngineScreen(pageId){var screenDiv=document.getElementById("pr-review-engine-screen-"+pageId);if(screenDiv&&screenDiv.parentNode){screenDiv.parentNode.removeChild(screenDiv);}var engineDiv=document.getElementById("pr-review-engine-"+pageId);if(engineDiv){removeClassName(engineDiv,"pr-review-engine-screened");}}function writeOutAnalytics(reviewCount,options){var analyticsAccount=trim(get("pr_analytics_account",options));if(window.urchinTracker&&analyticsAccount){var temp="";var hadExistingAccount=typeof _uacct!="undefined";if(hadExistingAccount){temp=_uacct;}_uacct=analyticsAccount;urchinTracker("/product_with_"+reviewCount+"_reviews");if(hadExistingAccount){_uacct=temp;}}}function displayInitialReviewBox(pageId,locale,optionsKey,options,callback){grabContents(pageId,locale,function(contents){var reviewCount=(contents&&contents.reviews&&contents.reviews.review_count)||0;var reviewRatings=(contents&&contents.reviews&&contents.reviews.review_ratings)||[0,0,0,0,0];var pendingComponents;var callbackWrapper=function(){if(--pendingComponents<=0){callback();}};if(reviewCount>0){pendingComponents=2;grabHeader(pageId,locale,reviewCount,reviewRatings,optionsKey,options,callbackWrapper);getReviewsFromBatch(1,pageId,locale,optionsKey,options,callbackWrapper);}else{pendingComponents=1;grabHeader(pageId,locale,reviewCount,reviewRatings,optionsKey,options,callbackWrapper);}},options);}function processCallbacksAndBeacon(pageId,locale,options){grabContents(pageId,locale,function(contents){var reviewCount=0;var avgRating=0;if(contents&&contents.reviews){reviewCount=contents.reviews.review_count;avgRating=contents.reviews.avg;}processCallbacks("main",new PRProductData(pageId,reviewCount,0,roundRating(avgRating)));window.setTimeout(function(){writeOutAnalytics(reviewCount,options);},2000);},options);}function showFacebookInteractionLinks(options){if(get("pr_site_id",options)||!false){var elems=getElementsByClassName(document,"p","pr-fb-needs-merchant");var elems=elems.concat(getElementsByClassName(document,"div","pr-fb-needs-merchant"));for(var i=0;i<elems.length;i++){var elem=elems[i];elem.style.display="";}}}function startSort(selectBox,pageId,locale,optionsKey,options){var currentTime=new Date();if(currentTime.getTime()-gTimer.getTime()>1000){gTimer=currentTime;grabMeta(pageId,locale,function(){doSort(selectBox.selectedIndex,pageId);getReviewsFromMetaWithTrackingType(1,pageId,locale,"sort",optionsKey,options);},options);}}publicScope.display.startSort=startSort;function doSort(sortType,pageId){gMetaInfo.sort(gSortFunctions[sortType]);gCurrentSort=sortType;var anchorElem=document.getElementById("pr-header-"+pageId);if(anchorElem){anchorElem.focus();}}function idSort(a,b){if(a.oid&&b.oid){return b.oid-a.oid;}return b.rid-a.rid;}gSortFunctions[gDateNew]=function(a,b){if(a.date==b.date){return idSort(a,b);}return b.date-a.date;};gSortFunctions[gDateOld]=function(a,b){if(b.date==a.date){return idSort(b,a);}return a.date-b.date;};gSortFunctions[gRatingHigh]=function(a,b){if(b.rating==a.rating){return idSort(a,b);}return b.rating-a.rating;};gSortFunctions[gRatingLow]=function(a,b){if(b.rating==a.rating){return idSort(b,a);}return a.rating-b.rating;};gSortFunctions[gHelpfulHigh]=function(a,b){if(b.helpfulScore==a.helpfulScore){return idSort(a,b);}return b.helpfulScore-a.helpfulScore;};gSortFunctions[gHelpfulLow]=function(a,b){if(b.helpfulScore==a.helpfulScore){return idSort(b,a);}return a.helpfulScore-b.helpfulScore;};function getReviewsFromBatch(batch,pageId,locale,optionsKey,options,callback){grabContents(pageId,locale,function(contents){var batches=[batch];grabBatches(pageId,locale,batches,function(){var reviewCount=0;if(contents.reviews){reviewCount=contents.reviews.review_count;}writeContentToDiv("pr-contents-"+pageId,processReviewsTemplate(gBatchHash[pageId+"-"+batch],pageId,locale,contents.name,contents.vNames,reviewCount,get("pr_reviews_per_page",options),1,"#pr-header-"+pageId,"#pr-header-"+pageId,false,optionsKey,options),callback);},options);},options);}function getReviewsFromMeta(pageNum,pageId,locale,optionsKey,options){getReviewsFromMetaWithTrackingType(pageNum,pageId,locale,"page",optionsKey,options);}function getReviewsFromMetaWithTrackingType(pageNum,pageId,locale,trackingType,optionsKey,options){grabMeta(pageId,locale,function(){if(gCurrentSort==null){doSort(gDateNew,pageId);}grabContents(pageId,locale,function(contents){var reviewsPerPage=get("pr_reviews_per_page",options);var startIndex=(pageNum-1)*reviewsPerPage;var endIndex=startIndex+reviewsPerPage-1;if(endIndex>contents.reviews.review_count-1){endIndex=contents.reviews.review_count-1;}var batches=[];var batchesSet={};for(var i=startIndex;i<=endIndex;i++){var b=gMetaInfo[i].batch;if(!batchesSet[b]){batches.push(b);batchesSet[b]=true;}}grabBatches(pageId,locale,batches,function(){var reviews=[];for(var i=startIndex;i<=endIndex;i++){reviews.push(gReviewHash[gMetaInfo[i].rid]);}writeContentToDiv("pr-contents-"+clean(pageId),processReviewsTemplate(reviews,pageId,locale,contents.name,contents.vNames,contents.reviews.review_count,reviewsPerPage,pageNum,"#pr-header-"+pageId,"#pr-header-"+pageId,false,optionsKey,options),function(){showFacebookInteractionLinks();});},options);},options);},options);trackRDUsageInstance({"type":trackingType},options);}publicScope.display.getReviewsFromMeta=getReviewsFromMeta;function grabHeader(pageId,locale,reviewCount,reviewRatings,optionsKey,options,callback){var divName="pr-header-"+pageId;if(reviewCount>0){grabRollup(pageId,locale,function(rollup){if(rollup){writeContentToDiv(divName,processRollupTemplate(reviewCount,reviewRatings,rollup,pageId,locale,optionsKey,options),callback);}},options);}else{writeContentToDiv(divName,processRollupTemplate(reviewCount,reviewRatings,null,pageId,locale,optionsKey,options),callback);}}function submitHelpfulVote(reviewId,voteType,locale,options){var content="Thank you for your feedback.  Please note that only your first vote will be counted.";if(!gVoteClickHash[reviewId]||gVoteClickHash[reviewId]=="undefined"){loadImage(get("pr_js_controller_url",options)+"?command=helpfulVote&reviewId="+reviewId+"&voteType="+voteType);gVoteClickHash[reviewId]=1;}else{content="You may only submit one vote per review.";}writeContentToDiv("review_feedback"+reviewId,content);}publicScope.display.submitHelpfulVote=submitHelpfulVote;function launchErrorDiv(reviewId,locale,optionsKey,options){if(!gErrorClickHash[reviewId]||gErrorClickHash[reviewId]=="undefined"){var errorDiv=document.getElementById("error_div"+reviewId);errorDiv.innerHTML=processErrorDivTemplate(reviewId,locale,optionsKey,options);document.getElementById("error_div"+reviewId).style.display="block";}else{writeContentToDiv("review_feedback"+reviewId,"You have already notified us of an error for this review.");}}publicScope.display.launchErrorDiv=launchErrorDiv;function closeErrorDiv(reviewId){document.getElementById("error_div"+reviewId).style.display="none";}function submitError(reviewId,locale,options){var type=getRadioValue("error_radio"+reviewId);var comments=document.getElementById("error_comments"+reviewId).value;comments=comments.substring(0,256);var contactEmail=trim(document.getElementById("error_contact_email"+reviewId).value);var locHREF=document.location.href;if(locHREF&&typeof locHREF!="undefined"){var locDomain=locHREF.split("/",4)[2];comments+="\n["+locDomain+"]";}if(!/.+@.+/.test(contactEmail)){alert("Email Address is required when flagging a review");}else{if(!type){alert("Please select the reason you are flagging this review");}else{loadImage(get("pr_js_controller_url",options)+"?command=helpfulVote&reviewId="+reviewId+"&merchantId="+get("pr_merchant_id",options)+"&voteType="+type+"&errorComments="+prEncode(comments)+"&errorContactEmail="+prEncode(contactEmail));writeContentToDiv("review_feedback"+reviewId,"Thank you for notifying us of this error.");gVoteClickHash[reviewId]=1;gErrorClickHash[reviewId]=1;closeErrorDiv(reviewId);}}}publicScope.display.submitError=submitError;function cancelError(reviewId){closeErrorDiv(reviewId);}publicScope.display.cancelError=cancelError;function prData(callback,options){if(typeof callback=="function"&&prDataInit(options)){var pageId=get("pr_page_id",options);var pageIdClean=clean(pageId);grabContents(pageIdClean,get("pr_locale",options),function(contents){if(contents&&contents.reviews){callback(new PRProductData(pageId,contents.reviews.review_count,0,roundRating(contents.reviews.avg)));}else{callback(new PRProductData(pageId,0,0,0));}},options);}}publicScope.display.prData=prData;window.prData=prData;function registerCallback(callbackFn){gDataCallbacks.push(callbackFn);}publicScope.display.registerCallback=registerCallback;window.registerCallback=registerCallback;function getCurrentViewportInfo(){return{"offsetY":document.body.scrollTop||document.documentElement.scrollTop,"viewportWidth":document.getElementsByTagName("body")[0].clientWidth};}function displayModal(pageIdClean,content,config,targetEl){resetModal(pageIdClean);var modalContainer=document.getElementById("pr-modal-container-"+pageIdClean);if(config){if(config.ctx=="top"){targetEl.parentNode.insertBefore(modalContainer,targetEl);modalContainer.style.top="-"+(modalContainer.offsetHeight+30)+"px";}else{insertAfter(targetEl,modalContainer);modalContainer.style.top="15px";}var modalWrapper=getElementsByClassName(document,"div","pr-modal-wrapper");modalContainer.style.width=config.w+"px";modalContainer.style.left=0;}else{var viewportInfo=getCurrentViewportInfo();modalContainer.style.left=((viewportInfo.viewportWidth-modalContainer.offsetWidth)/2)+"px";modalContainer.style.top=(viewportInfo.offsetY+100)+"px";}writeContentToDiv("pr-modal-"+pageIdClean,content,function(){removeClassName(modalContainer,"pr-hidden");});}function hideModal(pageIdClean){addClassName(document.getElementById("pr-modal-container-"+pageIdClean),"pr-hidden");}publicScope.display.hideModal=hideModal;function resetModal(pageIdClean){var modalContainer=document.getElementById("pr-modal-container-"+pageIdClean);if(!modalContainer){modalContainer=document.createElement("div");modalContainer.id="pr-modal-container-"+pageIdClean;modalContainer.className="pr-modal-container pr-hidden";modalContainer.innerHTML=processModalWrapperTemplate(pageIdClean);}document.getElementsByTagName("body")[0].appendChild(modalContainer);var modalWrapper=getElementsByClassName(modalContainer,"div","pr-modal-wrapper");modalContainer.style.height="auto";modalContainer.style.width="";modalWrapper[0].style.height="auto";}function displayFaceoffModal(pageId,orig){resetModal(pageId);copyContents("pr-modal-"+pageId,orig);var modalContainer=document.getElementById("pr-modal-container-"+pageId);document.getElementById("pr-header-"+pageId).appendChild(modalContainer);var modalWrapper=getElementsByClassName(document,"div","pr-modal-wrapper")[0];var elToContain=getElementsByClassName(document,"div","pr-review-faceoff-review-wrapper")[0];modalContainer.style.width=(elToContain.scrollWidth-20)+"px";modalContainer.style.height=(elToContain.offsetHeight+47)+"px";modalWrapper.style.width="auto";modalWrapper.style.height=(elToContain.offsetHeight+5)+"px";modalContainer.style.left=(elToContain.offsetLeft+10)+"px";modalContainer.style.top=(elToContain.offsetTop-40)+"px";removeClassName(modalContainer,"pr-hidden");}publicScope.display.displayFaceoffModal=displayFaceoffModal;function showFollowProductModalWithHash(pageIdClean,locale,argHash,displayConfig,targetEl,options){var expectRollup=argHash["r"]||false;showFollowProductModalHelper(pageIdClean,locale,expectRollup,displayConfig,targetEl,options);}publicScope.display.showFollowProductModalWithHash=showFollowProductModalWithHash;function showFollowProductModal(pageIdClean,locale,displayConfig,targetEl,options){showFollowProductModalHelper(pageIdClean,locale,{"r":true},displayConfig,targetEl,options);}publicScope.display.showFollowProductModal=showFollowProductModal;function showFollowProductModalHelper(pageIdClean,locale,expectRollup,displayConfig,targetEl,options){var pageIdOriginal=get("pr_page_id",options);var productName="";var imageUri="";var doShow=function(){var modalContent=processFollowProductModalTemplate(pageIdOriginal,pageIdClean,productName,imageUri,locale,options);displayModal(pageIdClean,modalContent,displayConfig,targetEl);};if(expectRollup){grabRollup(pageIdClean,locale,function(rollup){if(rollup){productName=rollup.r;imageUri=rollup.i;}doShow();},options);}else{doShow();}}function showFollowProductCategoryModal(pageIdClean,locale,config,targetEl,options){grabRollup(pageIdClean,locale,function(rollup){categoryInfo=getCategoryDisplayInfoFromRollup(rollup,locale,options);var modalContent=processProductCategoryModalTemplate(categoryInfo,locale,options,pageIdClean);displayModal(pageIdClean,modalContent,config,targetEl);},options);}publicScope.display.showFollowProductCategoryModal=showFollowProductCategoryModal;function toggleFbLikeButton(id,oData){var targetEl=document.getElementById(oData.target);var targetData=JSON.parse(targetEl.getAttribute("prdata"));targetData.keyValue=oData.keyValue;targetEl.setAttribute("prdata",JSON.stringify(targetData));var arrFbLikeBtns=getElementsByClassName(document.getElementById("pr-fb-linkbtn-wrapper-"+oData.locale+"-"+oData.pageId),"iframe","pr-fb-likebtn");for(var i=0;i<arrFbLikeBtns.length;i++){removeClassName(arrFbLikeBtns[i],"pr-hidden");addClassName(arrFbLikeBtns[i],"pr-hidden");}removeClassName(document.getElementById(id),"pr-hidden");}publicScope.display.toggleFbLikeButton=toggleFbLikeButton;function processCallbacks(source,data){for(var i=0;i<gDataCallbacks.length;i++){gDataCallbacks[i](source,data);}}function extractGroupsFromRollup(rollup){var result={canonicalGroupSet:{},histogramDisplayGroupList:[],subratingsGroupList:[],otherGroupList:[]};if(rollup){if(rollup.g){for(var i=0;i<rollup.g.length;i++){var group=rollup.g[i];if(group.k=="pros"||group.k=="cons"||group.k=="bestuses"){result.canonicalGroupSet[group.k]=group;}else{if(group.a){result.histogramDisplayGroupList.push(group);}else{result.otherGroupList.push(group);}}}}result.subratingGroupList=rollup.ar||[];}return result;}function getFirstValidCustomBadge(badgeIdArray,options){var customBadge=null;if(badgeIdArray){var badgeTable=get("pr_badge_table",options);for(var badge_index=0;badge_index<badgeIdArray.length;badge_index++){customBadge=badgeTable[badgeIdArray[badge_index]];if(customBadge){break;}}}return customBadge;}function getCategoryDisplayInfoFromRollup(rollup,locale,options){var result=[];if(rollup&&rollup.c&&rollup.c.n&&rollup.c.c){var nameStr=rollup.c.n;var codeStr=rollup.c.c;var separator=":";var stripSeparatorRegex=new RegExp(separator+"$");var names=nameStr.replace(stripSeparatorRegex,"").split(separator);var codes=codeStr.replace(stripSeparatorRegex,"").split(separator);if(names.length==codes.length){var length=names.length;var numToShow=Math.min(length,3);var startingIndex=length-numToShow;for(var index=startingIndex;index<length;index++){var label=names[index];var code=codes.slice(0,index+1).join(separator)+separator;var url=getProductCategoryLandingPageUrl(code,locale,options);result.push({"label":label,"url":url,"code":code});}}}return result;}function hasSufficientInformationForFollowCategory(rollup,locale,options){var categoryInfo=getCategoryDisplayInfoFromRollup(rollup,locale,options);return categoryInfo.length>0;}function getProductFollowLandingPageUrl(pageIdOriginal,locale,options){var baseFollowLandingUrl=getBaseFollowLandingUrl(options);var siteId=prEncode(get("pr_site_id",options)||"-");return baseFollowLandingUrl+"product/"+locale+"/"+get("pr_merchant_group_id",options)+"/"+siteId+"/"+prEncode(pageIdOriginal);}function getProductCategoryLandingPageUrl(categoryCode,locale,options){var baseFollowLandingUrl=getBaseFollowLandingUrl(options);var siteId=prEncode(get("pr_site_id",options)||"-");return baseFollowLandingUrl+"productCategory/"+locale+"/"+get("pr_merchant_group_id",options)+"/"+siteId+"/"+prEncode(categoryCode);}function processRollupTemplate(reviewCount,reviewRatings,rollup,pageId,locale,optionsKey,options){var result=[];var docRoot=getDocRoot(options);var otherAttributesLabels={describeyourself:"Reviewer Profile"};var collectedGroupInfo=extractGroupsFromRollup(rollup);var canonicalGroupSet=collectedGroupInfo.canonicalGroupSet;var histogramDisplayGroupList=collectedGroupInfo.histogramDisplayGroupList;var subratingGroupList=collectedGroupInfo.subratingGroupList;var otherGroupList=collectedGroupInfo.otherGroupList;var totalHistRatings=0;for(i=0;i<reviewRatings.length;i++){totalHistRatings=(reviewRatings[i]+totalHistRatings);}result.push('<div class="pr-snapshot">');if(reviewCount>0){result.push('<div class="pr-review-social-bar pr-fb-needs-merchant" style="display:none;"><div class="pr-clear"></div></div>');}result.push('<a name="ReviewHeader"></a><div class="pr-snapshot-head"><div class="pr-snapshot-head-wrapper"><p class="pr-snapshot-title">');result.push("REVIEW SNAPSHOT&reg;");result.push("</p>");if(getMerchant(options).cobranded){result.push('<a href="#" class="pr-snapshot-cobrand" onclick="POWERREVIEWS.common.showSmallPopup(\'');result.push("http://www.powerreviews.com/legal/index_en_US.html");result.push("', 410, 420); return false;\">");result.push("by PowerReviews");result.push("</a>");}result.push('</div></div><div class="pr-snapshot-body"><div class="pr-snapshot-body-wrapper">');if(reviewCount>0){result.push('<div class="pr-snapshot-rating-wrapper hreview-aggregate">                                            ');if(rollup.r){result.push('<div class="pr-snapshot-product-name item"><span class="fn">');result.push(rollup.r);result.push("</span></div>");}result.push('<div class="pr-snapshot-rating rating"><div class="pr-stars ');result.push(gStarClasses[rollup.a].large);result.push('" style="background-position: 0px ');result.push(rollup.a*-46);result.push('px;">&nbsp;</div><span class="pr-rating pr-rounded average">');result.push((rollup.d*10)%10==0?rollup.d+".0":rollup.d);result.push('</span>                         <p class="pr-snapshot-average-based-on-text">');if(reviewCount==1){result.push("(");result.push("based on {0} review".replace("{0}",'<span class="count">1</span>'));result.push(")");}else{result.push("(");result.push("based on {0} reviews".replace("{0}",'<span class="count">'+reviewCount+"</span>"));result.push(")");}result.push("</p>");if(totalHistRatings>0){result.push("<div id=\"pr-snapshot-histogram\"><a href=\"#\" id=\"pr-snapshot-histogram-lnk\" onclick=\"return false\" onmouseover=\"POWERREVIEWS.common.togglePopOut({'target':'pr-snapshot-histogram-container'},'show', this, event)\" onmouseout=\"POWERREVIEWS.common.togglePopOut({'link':'pr-snapshot-histogram-lnk','target':'pr-snapshot-histogram-container'},'hide', this, event)\"><img id=\"pr-snapshot-histogram-lnk-img\" src=\"");result.push(docRoot);result.push("/engine/images/icon_popout.gif\" onclick=\"return false\" onmouseover=\"POWERREVIEWS.common.togglePopOut({'target':'pr-snapshot-histogram-container'},'show', this, event)\" onmouseout=\"POWERREVIEWS.common.togglePopOut({'link':'pr-snapshot-histogram-lnk-img','target':'pr-snapshot-histogram-container'},'hide', this, event)\"/></a><div id=\"pr-snapshot-histogram-container\" class=\"pr-closed\" onmouseover=\"POWERREVIEWS.common.togglePopOut({'target':'pr-snapshot-histogram-container'},'show', this, event)\" onmouseout=\"POWERREVIEWS.common.togglePopOut({'link':'pr-snapshot-histogram-lnk','target':'pr-snapshot-histogram-container'},'hide', this, event)\"><p id=\"pr-snapshot-histogram-header\"><span>");result.push("Ratings Distribution");result.push("</span></p>");result.push(processRatingsHistogramTemplate(reviewRatings,locale,options));result.push(" </div></div>");}result.push('</div><div class="pr-clear"></div>');if(rollup.b||rollup.b==0){result.push('<div class="pr-snapshot-consensus"><p class="pr-snapshot-consensus-value pr-rounded">');result.push(Math.round(100*rollup.b));result.push('%</p> <p class="pr-snapshot-consensus-text">');result.push("of respondents would recommend this to a friend.");result.push("</p></div>");}result.push("</div>                ");if(canonicalGroupSet.pros||canonicalGroupSet.cons||canonicalGroupSet.bestuses||histogramDisplayGroupList.length||subratingGroupList.length||otherGroupList.length){result.push('<div class="pr-review-points"><div class="pr-review-points-attr-wrapper"><div class="pr-attribute-group pr-rounded pr-attribute-pros');result.push(canonicalGroupSet.pros?"":" pr-empty");result.push('"><div class="pr-attribute-key"><p class="pr-attribute-label-pros">');result.push("Pros");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list pr-snapshot-attribute-value-list">');var group=canonicalGroupSet.pros;if(group){for(var value_index=0;value_index<group.v.length;value_index++){var value=group.v[value_index];result.push("<li>");result.push(value.n);result.push("&nbsp;(");result.push(value.c);result.push(")</li>");}}result.push('</ul></div></div><div class="pr-attribute-group pr-rounded pr-attribute-cons');result.push(canonicalGroupSet.cons?"":" pr-empty");result.push('"><div class="pr-attribute-key"><p class="pr-attribute-label-cons">');result.push("Cons");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list pr-snapshot-attribute-value-list">');var group=canonicalGroupSet.cons;if(group){for(var value_index=0;value_index<group.v.length;value_index++){var value=group.v[value_index];result.push("<li>");result.push(value.n);result.push("&nbsp;(");result.push(value.c);result.push(")</li>");}}result.push('</ul></div></div><div class="pr-attribute-group pr-rounded pr-attribute-bestuses');result.push(canonicalGroupSet.bestuses?"":" pr-empty");result.push(' pr-last"><div class="pr-attribute-key"><p class="pr-attribute-label-bestuses">');result.push("Best Uses");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list pr-snapshot-attribute-value-list">');var group=canonicalGroupSet.bestuses;if(group){for(var value_index=0;value_index<group.v.length;value_index++){var value=group.v[value_index];result.push("<li>");result.push(value.n);result.push("&nbsp;(");result.push(value.c);result.push(")</li>");}}result.push('</ul></div></div><div class="pr-clear"></div></div></div>');if(histogramDisplayGroupList.length){result.push(processHistogramRollupTemplate(histogramDisplayGroupList,locale,options));}if(subratingGroupList.length){result.push(processSubratingRollupTemplate(subratingGroupList,locale,options));}result.push('<div class="pr-other-attributes"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<otherGroupList.length;group_index++){var group=otherGroupList[group_index];var values=[];for(var value_index=0;value_index<group.v.length;value_index++){var value=group.v[value_index];values.push(value.n+"&nbsp;("+value.c+")");}result.push('<li class="pr-other-attributes-group pr-other-attribute-');result.push(group.k);result.push('"><ul><li class="pr-other-attribute-label">');result.push(otherAttributesLabels[group.k]||group.n);result.push(':</li><li class="pr-other-attribute-value">');result.push(values.join(", "));result.push("</li></ul></li>");}result.push('<li class="pr-clear"></li></ul></div>');}result.push('<div id="pr-snapshot-footer-');result.push(pageId);result.push('" class="pr-snapshot-footer" style="display:none"><a href="#" id="write-review-');result.push(pageId);result.push('" class="pr-write-review-link"><div class="pr-snapshot-write-review"><span>');result.push("Write a Review");result.push("</span></div></a></div>");}else{result.push('<div id="pr-snapshot-footer-');result.push(pageId);result.push('" class="pr-snapshot-footer" style="display:none">                    <p class="pr-snapshot-no-ratings">');result.push("Not yet rated. Be the first to");result.push(' <a href="#" id="write-review-');result.push(pageId);result.push('" class="pr-write-review-link">');result.push("Write a Review");result.push("</a></p></div>");}result.push("</div></div>");if(rollup&&rollup.fo&&false){result.push('<div class="pr-review-faceoff"><div class="pr-review-faceoff-review-wrapper"><div id="pr-review-faceoff-positive-');result.push(pageId);result.push('" class="pr-review-faceoff-review pr-review-faceoff-review-positive"><div class="pr-review-faceoff-container"><p class="pr-review-faceoff-label">');result.push("Most Liked Positive Review");result.push('</p><div class="pr-review-faceoff-review-content"><div class="pr-stars ');result.push(gStarClasses[rollup.fo.f2.r.r].large);result.push('" style="background-position: 0px ');result.push(rollup.fo.f2.r.r*-46);result.push('px;">&nbsp;</div><p class="pr-review-faceoff-title">');result.push(rollup.fo.f2.r.h);result.push('</p><p class="pr-review-faceoff-review">');if(rollup.fo.f2.cf){result.push(truncateString(rollup.fo.f2.r.p,0,rollup.fo.f2.cf,true));result.push('<a class="pr-review-faceoff-readcomplete" href="#" onclick="POWERREVIEWS.display.displayFaceoffModal(\'');result.push(pageId);result.push("','pr-review-faceoff-positive-");result.push(pageId);result.push("'); return false\">");result.push("Read complete review");result.push("</a>");}else{result.push(rollup.fo.f2.r.p);}result.push('</p><p class="pr-review-faceoff-review-full">');result.push(rollup.fo.f2.r.p);result.push('</p></div></div></div><div class="pr-review-faceoff-img"><p class="pr-review-faceoff-img-txt">');result.push("VS");result.push('</p></div><div id="pr-review-faceoff-negative-');result.push(pageId);result.push('" class="pr-review-faceoff-review pr-review-faceoff-review-negative"><div class="pr-review-faceoff-container"><p class="pr-review-faceoff-label">');result.push("Most Liked Negative Review");result.push('</p><div class="pr-review-faceoff-review-content"><div class="pr-stars ');result.push(gStarClasses[rollup.fo.f1.r.r].large);result.push('" style="background-position: 0px ');result.push(rollup.fo.f1.r.r*-46);result.push('px;">&nbsp;</div><p class="pr-review-faceoff-title">');result.push(rollup.fo.f1.r.h);result.push('</p><p class="pr-review-faceoff-review">');if(rollup.fo.f1.cf){result.push(truncateString(rollup.fo.f1.r.p,0,rollup.fo.f1.cf,true));result.push('<a class="pr-review-faceoff-readcomplete" href="#" onclick="POWERREVIEWS.display.displayFaceoffModal(\'');result.push(pageId);result.push("','pr-review-faceoff-negative-");result.push(pageId);result.push("'); return false\">");result.push("Read complete review");result.push("</a>");}else{result.push(rollup.fo.f1.r.p);}result.push('</p><p class="pr-review-faceoff-review-full">');result.push(rollup.fo.f1.r.p);result.push('</p></div></div></div><div class="pr-clear"></div></div></div>');}result.push("</div>");if(reviewCount>0){result.push('<div class="pr-review-content-header"><p class="pr-review-content-header-label">');result.push("REVIEWS");result.push('</p></div><div class="pr-review-sort"><div class="pr-review-sort-wrapper">');if(reviewCount==1){result.push('<p class="pr-review-count">');result.push("Reviewed by 1 customer");result.push("</p>");}else{if(reviewCount>1){result.push('<p class="pr-review-count">');result.push("Reviewed by {0} customers".replace("{0}",reviewCount));result.push('</p><div class="pr-review-sort-box"><p class="pr-review-sort-by">');result.push("Sort by");result.push("</p><select onchange=\"POWERREVIEWS.display.startSort(this, '");result.push(pageId);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\'));"><option value="date_new" selected="true">');result.push("Newest");result.push('</option><option value="date_old">');result.push("Oldest");result.push('</option><option value="rating_high">');result.push("Highest rating");result.push('</option><option value="rating_low">');result.push("Lowest rating");result.push('</option><option value="helpful_high">');result.push("Most helpful");result.push('</option><option value="helpful_low">');result.push("Least helpful");result.push("</option></select></div>");}}result.push('<div class="pr-clear"></div></div></div>');}result.push("<!-- ilkj -->");return result.join("");}publicScope.display.processRollupTemplate=processRollupTemplate;function processReviewsTemplate(reviews,pageId,locale,productName,productVariantNames,reviewCount,reviewsPerPage,pageNum,prevPageLinkTemplate,nextPageLinkTemplate,isProfile,optionsKey,options){var result=[];var startIndex=(pageNum-1)*reviewsPerPage;var endIndex=startIndex+reviewsPerPage-1;if(endIndex>reviewCount-1){endIndex=reviewCount-1;}var topAnchor=get("pr_back_to_top_link",options);var docRoot=getDocRoot(options);var badgeDefinitionsUrl=replaceAll(get("pr_badge_definitions_url",options),"~~~LOCALE~~~",locale);var starsTitles=["Got it? Rate it.","Not good","Needs that special something","Average, ordinary","That's good stuff","Perfect. It doesn't get any better"];var bottomLineLabels={"Yes":"Yes, I would recommend this to a friend","No":"No, I would not recommend this to a friend"};result.push('<div class="pr-contents-wrapper">');if(!isProfile){result.push('<div class="pr-pagination-top"><div class="pr-page-count-wrapper"><p class="pr-page-count">');if(startIndex==endIndex){result.push("Displaying review");result.push(" <strong>");result.push((startIndex+1));result.push("</strong>");}else{result.push("Displaying reviews");result.push(" <strong>");result.push((startIndex+1)+"-"+(endIndex+1));result.push("</strong>");}result.push('</p><p class="pr-nav-back-to-top"><a href="');result.push(topAnchor);result.push('">');result.push("Back to top");result.push("</a></p></div>");if(reviewCount>reviewsPerPage){result.push('<div class="pr-page-nav-wrapper"><p class="pr-page-nav"><span class="pr-page-prev">');if(startIndex>0){result.push('<a onclick="POWERREVIEWS.display.getReviewsFromMeta(');result.push(pageNum-1);result.push(", '");result.push(pageId);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\')); return false;" href="');result.push(prevPageLinkTemplate.replace("~~~REVIEW_PAGE~~~",pageNum-1));result.push('">&laquo; ');result.push("Previous");result.push("</a>");}else{result.push("Previous");}result.push('</span><span class="pr-divider"> | </span><span class="pr-page-next">');if(endIndex<reviewCount-1){result.push('<a onclick="POWERREVIEWS.display.getReviewsFromMeta(');result.push(pageNum+1);result.push(", '");result.push(pageId);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\')); return false;" href="');result.push(nextPageLinkTemplate.replace("~~~REVIEW_PAGE~~~",pageNum+1));result.push('">');result.push("Next");result.push(" &raquo;</a>");}else{result.push("Next");}result.push("</span></p></div>");}result.push('<div class="pr-clear"></div></div>');}for(var review_index=0;review_index<reviews.length;review_index++){var review=reviews[review_index];var groupSet={};var hasOtherAttributes=false;if(review.g){for(var i=0;i<review.g.length;i++){var key=review.g[i].k;groupSet[key]=true;hasOtherAttributes=hasOtherAttributes||(key!="pros"&&key!="cons"&&key!="bestuses"&&key!="describeyourself");}}result.push('<div class="pr-review-wrap"><div class="pr-review-rating-wrapper"><div class="pr-review-author-date pr-rounded">');result.push(review.d);result.push("</div>");if(review.t>0){result.push('<div class="pr-review-most-helpful"><p>(<span>');result.push("{0} of {1}".replace("{0}",review.v).replace("{1}",review.t));result.push("</span> ");result.push("customers found this review helpful");result.push(")</p></div>");}result.push('<div class="pr-review-rating"><div class="pr-stars pr-stars-small ');result.push(gStarClasses[review.r].small);result.push('" style="background-position: 0px ');result.push(review.r*-36);result.push('px;" title="');result.push(starsTitles[review.r]);result.push('">&nbsp;</div><span class="pr-rating pr-rounded">');result.push(review.r);result.push('.0</span><p class="pr-review-rating-headline">');result.push(review.h);result.push("</p></div></div>");if(!isProfile){result.push('                  <div class="pr-review-author"><div class="pr-review-author-info-wrapper">');if(review.fu&&false){if(review.pi){result.push("<p>");var seeAllHref=get("pr_see_all_reviews_url",options).replace("~~~MERCHANT_USER_ID~~~",review.mu).replace("~~~NICKNAME~~~",review.n);if(seeAllHref){result.push('<a class="pr-review-author-profile-link" href="');result.push(seeAllHref);result.push('"><img src="https://graph.facebook.com/');result.push(review.fu);result.push('/picture" /></a>');}else{result.push('<a class="pr-review-author-profile-link" href="#" onclick="POWERREVIEWS.display.showProfileWithHash(\'');result.push(review.pi);result.push("', '");result.push(pageId);result.push("', {'badges':[");result.push((review.cb||[]).toString());result.push("]}, '");result.push(locale);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\')); return false;"><img src="https://graph.facebook.com/');result.push(review.fu);result.push('/picture" /></a>');}result.push("</p>");}else{var manageSettingsUrl=getFacebookManageSettingsUrl({"locale":locale,"sharedReviewId":review.id},options);result.push('<a href="#" onclick="POWERREVIEWS.common.showSmallPopup(\'');result.push(manageSettingsUrl);result.push("', 425, 600, {'location':'no'}); return false;\"><img src=\"https://graph.facebook.com/");result.push(review.fu);result.push('/picture" /></a>');}}result.push('<p class="pr-review-author-name">');result.push("By");result.push("&nbsp;<span>");result.push(review.n);result.push('</span></p><p class="pr-review-author-location">');result.push("from");result.push(" <span>");result.push(review.w);result.push("</span></p>");if(review.g){for(var group_index=0;group_index<review.g.length;group_index++){var group=review.g[group_index];if(group.k=="describeyourself"){result.push('<div class="pr-review-author-affinity-wrapper"><p class="pr-review-author-affinities">');result.push("About Me"||group.n);result.push(" <span>");result.push(group.v.join(", "));result.push("</span></p></div>");}}}if(review.pi&&!review.dp){result.push("<p>");var seeAllHref=get("pr_see_all_reviews_url",options).replace("~~~MERCHANT_USER_ID~~~",review.mu).replace("~~~NICKNAME~~~",review.n);if(seeAllHref){result.push('<a class="pr-review-author-profile-link" href="');result.push(seeAllHref);result.push('">');result.push("See all my reviews");result.push("</a>");}else{result.push('<a class="pr-review-author-profile-link" href="#" onclick="POWERREVIEWS.display.showProfileWithHash(\'');result.push(review.pi);result.push("', '");result.push(pageId);result.push("', {'badges':[");result.push((review.cb||[]).toString());result.push("]}, '");result.push(locale);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); return false;\">");result.push("See all my reviews");result.push("</a>");}result.push("</p>");}result.push("</div>");var customBadge=getFirstValidCustomBadge(review.cb);var verifiedPurchaser=(review.o&&review.o=="e");var siteMember=review.m;var verifiedReviewer=(review.c&&review.c=="v");if(verifiedPurchaser||customBadge||siteMember||verifiedReviewer){result.push('<div class="pr-review-author-badge-wrapper">');if(verifiedPurchaser){result.push('<div class="pr-review-author-verified-buyer-wrapper pr-review-author-verified-buyer-');result.push(locale);result.push('"><a href="');result.push(badgeDefinitionsUrl);result.push('"><img class="pr-badge pr-verified-buyer" src="');result.push(docRoot);result.push("/engine/images/badge_vp_");result.push(locale);result.push(".gif");result.push('" alt="');result.push("Verified Buyer");result.push('" title="');result.push("Verified Buyer");result.push('" /></a></div>');}if(customBadge){result.push(processCustomBadgeTemplate(customBadge,locale,options));}else{if(siteMember){result.push('<div class="pr-review-author-member-badge-wrapper pr-review-author-member-badge-wrapper-');result.push(locale);result.push('"><img class="pr-badge pr-site-member" src="');result.push(docRoot);result.push('/engine/images/pixel.gif" alt="');result.push("Site Member");result.push('" title="');result.push("Site Member");result.push('" /></div>');}}if(verifiedReviewer&&!false&&!verifiedPurchaser&&!customBadge&&!siteMember){result.push('<div class="pr-review-author-verified pr-review-author-verified-');result.push(locale);result.push('"><a href="');result.push(badgeDefinitionsUrl);result.push('"><img class="pr-badge pr-verified" src="');result.push(docRoot);result.push("/engine/images/badge_vr_");result.push(locale);result.push(".gif");result.push('" alt="');result.push("Verified Reviewer");result.push('" title="');result.push("Verified Reviewer");result.push('" /></a></div>');}result.push("</div>");}result.push("</div>");}else{if(isProfile&&review.pr){result.push('<div class="pr-profile-review-product-info">');if(review.pr.m&&window&&window.location&&window.location.protocol=="http:"){if(review.pr.u){result.push('<a href="');result.push(review.pr.u);result.push('"><img src="http://images.buzzillions.com');result.push(review.pr.m);result.push('" /></a>');}else{result.push('<img src="http://images.buzzillions.com');result.push(review.pr.m);result.push('" />');}}if(review.pr.n){if(review.pr.u){result.push('<a href="');result.push(review.pr.u);result.push('">');result.push(review.pr.n);result.push("</a>");}else{result.push(review.pr.n);}}result.push("</div>");}}result.push('<div class="pr-review-main-wrapper">');if(review.g){result.push('<div class="pr-review-points"><div class="pr-review-points-attr-wrapper"><div class="pr-attribute-group pr-rounded pr-attribute-pros');result.push(groupSet.pros?"":" pr-empty");result.push('"><div class="pr-attribute-key"><p class="pr-attribute-label-pros">');result.push("Pros");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list">');for(var group_index=0;group_index<review.g.length;group_index++){var group=review.g[group_index];if(group.k=="pros"){for(var value_index=0;value_index<group.v.length;value_index++){result.push("<li>");result.push(group.v[value_index]);result.push("</li>");}break;}}result.push('</ul></div></div><div class="pr-attribute-group pr-rounded pr-attribute-cons');result.push(groupSet.cons?"":" pr-empty");result.push('"><div class="pr-attribute-key"><p class="pr-attribute-label-cons">');result.push("Cons");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list">');for(var group_index=0;group_index<review.g.length;group_index++){var group=review.g[group_index];if(group.k=="cons"){for(var value_index=0;value_index<group.v.length;value_index++){result.push("<li>");result.push(group.v[value_index]);result.push("</li>");}break;}}result.push('</ul></div></div><div class="pr-attribute-group pr-rounded pr-attribute-bestuses');result.push(groupSet.bestuses?"":" pr-empty");result.push(' pr-last"><div class="pr-attribute-key"><p class="pr-attribute-label-bestuses">');result.push("Best Uses");result.push('</p></div><div class="pr-attribute-value"><ul class="pr-attribute-value-list">');for(var group_index=0;group_index<review.g.length;group_index++){var group=review.g[group_index];if(group.k=="bestuses"){for(var value_index=0;value_index<group.v.length;value_index++){result.push("<li>");result.push(group.v[value_index]);result.push("</li>");}break;}}result.push('</ul></div></div><div class="pr-clear"></div></div></div>');}result.push('<div class="pr-review-text">');var productNameToDisplay=(review.pv&&productVariantNames&&productVariantNames[review.pv])||productName||(isProfile&&review.pr&&review.pr.n);if(productNameToDisplay){result.push('<p class="pr-comments-header">');result.push("Comments about <em>{0}</em>:".replace("{0}",productNameToDisplay));result.push("</p>");}result.push('<p class="pr-comments">');result.push(prReplaceCrWithBr(review.p));result.push("</p></div>");if(review.z){result.push('<div class="pr-review-text"><p class="pr-comments-header">');result.push("Service and delivery comments:");result.push('</p><p class="pr-comments">');result.push(prReplaceCrWithBr(review.z));result.push("</p></div>");}if(hasOtherAttributes||review.rp||review.sp||review.tb||review.ar){result.push('<div class="pr-other-attributes">');if(review.g){result.push('<div class="pr-other-attribute-tag-group"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<review.g.length;group_index++){var group=review.g[group_index];if(group.k!="pros"&&group.k!="cons"&&group.k!="bestuses"&&group.k!="describeyourself"){result.push('<li class="pr-other-attribute-label">');result.push(group.n);result.push(':</li><li class="pr-other-attribute-value">');result.push(group.v.join(", "));result.push("</li>");}}result.push("</ul></div>");}if(review.tb){result.push('<div class="pr-other-attribute-text-group"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<review.tb.length;group_index++){var group=review.tb[group_index];result.push('<li class="pr-other-attribute-label pr-merchant-question-label">');result.push(group.n);result.push(':</li><li class="pr-other-attribute-value pr-merchant-question-value">');result.push(group.v);result.push("</li>");}result.push("</ul></div>");}if(review.ar){result.push('<div class="pr-other-attribute-additional-ratings"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<review.ar.length;group_index++){var group=review.ar[group_index];result.push('<li class="pr-other-attribute-label">');result.push(group.n);result.push(':</li><li class="pr-other-attribute-value"><div class="pr-stars pr-stars-small pr-stars-small-subrating ');result.push(gStarClasses[group.v].small);result.push('" style="background-position: 0px ');result.push(group.v*-36);result.push('px;" title="');result.push(starsTitles[group.v]);result.push('">&nbsp;</div></li>');}result.push("</ul></div>");}if(review.rp){result.push('<div class="pr-other-attribute-recommended-products"><ul class="pr-other-attributes-list">');var rp_strs=[];for(var rp_index=0;rp_index<review.rp.length;rp_index++){var rp=review.rp[rp_index];rp_strs.push(rp.u?'<a href="'+rp.u+'">'+rp.n+"</a>":rp.n);}result.push('<li class="pr-other-attribute-label">');result.push("Recommended");result.push(':</li><li class="pr-other-attribute-value">');result.push(rp_strs.join(", "));result.push("</li></ul></div>");}if(review.sp){result.push('<div class="pr-other-attribute-similar-products"><ul class="pr-other-attributes-list">');var sp_strs=[];for(var sp_index=0;sp_index<review.sp.length;sp_index++){var sp=review.sp[sp_index];sp_strs.push(sp.u?'<a href="'+sp.u+'">'+sp.n+"</a>":sp.n);}result.push('<li class="pr-other-attribute-label">');result.push("Similar");result.push(':</li><li class="pr-other-attribute-value">');result.push(sp_strs.join(", "));result.push("</li></ul></div>");}result.push('<div class="pr-clear"></div></div>');}result.push('<div class="pr-review-footer">');if(review.b){var bottomLineVal;if(review.b.v){bottomLineVal=review.b.v;}else{bottomLineVal=bottomLineLabels[review.b.k];}result.push('<div class="pr-review-bottom-line-wrapper"><p><span class="pr-review-bottom-line">');result.push("Bottom Line");result.push("</span> <span></span>");result.push(bottomLineVal);result.push("</p></div>");}if(review.i){result.push('<div class="pr-customer-media">');for(var rim_index=0;rim_index<review.i.r.length;rim_index++){var rim=review.i.r[rim_index];result.push('<div class="pr-customer-media-wrapper"><p class="pr-customer-media-user">');if(review.i.t=="i"){result.push("Images shared by");result.push(" <span>");result.push(review.n);result.push("</span>");}else{if(review.i.t=="v"){result.push("Images shared by");result.push(" <span>");result.push(review.n);result.push("</span>");}else{result.push("Images shared by");result.push(" <span>");result.push(review.n);result.push("</span>");}}result.push('</p><div class="pr-pic pr-rounded"><p class="pr-caption">');result.push(rim.c);result.push('</p><div class="pr-pic-content"><div class="wrap1"><div class="wrap2">');if(!rim.v){if(rim.s){result.push('<a href="#" onclick="POWERREVIEWS.common.showImagePopup(\'');result.push(rim.s.u);result.push("', ");result.push(rim.s.w);result.push(", ");result.push(rim.s.h);result.push(", POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\')); return false;"><img src="');result.push(docRoot);result.push("/content");result.push(rim.h.u);result.push('" alt="');result.push("Image Thumbnail");result.push('" width="');result.push(rim.h.w);result.push('" height="');result.push(rim.h.h);result.push('" /></a>');}else{result.push('<img src="');result.push(docRoot);result.push("/content");result.push(rim.h.u);result.push('" alt="');result.push("Image Thumbnail");result.push('" width="');result.push(rim.h.w);result.push('" height="');result.push(rim.h.h);result.push('" />');}}else{result.push('<a href="#" onclick="POWERREVIEWS.common.showVideoPopup(\'');result.push(rim.v);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push('\')); return false;"><img src="');result.push(rim.h.u);result.push('" alt="');result.push("Video Thumbnail");result.push('" width="75" height="50" onerror="this.src=\'http://powerreviews.s3.amazonaws.com/videos/youtube_coming_soon.jpg\'"/></a>');}result.push("</div></div></div>");if(rim.g){result.push('<p class="pr-pic-tags"><span class="pr-tag-label">');result.push("Tags:");result.push("</span> ");result.push(rim.g.join(", "));result.push("</p>");}result.push("</div></div>");}result.push('<div class="pr-clear"></div></div>');}if(review.y){result.push('<div class="pr-merchant-comments">');for(var resp_index=0;resp_index<review.y.length;resp_index++){result.push('<p class="pr-merchant-comments-text"><span>');result.push("Merchant response: ".replace("{0}",getMerchant(options).name));result.push("</span>");result.push(prReplaceCrWithBr(review.y[resp_index]));result.push("</p>");}result.push("</div>");}if(review.at){var attributionTable=get("pr_attribution_table",options);var attribution=attributionTable[review.at];if(attribution){if(attribution.originating_merchant_url&&attribution.image_uri){if(attribution.attribution_text){result.push('<div class="pr-review-attribution">');if(attribution.attribution_text){result.push('<div class="pr-review-attribution-text"><p>');result.push(attribution.attribution_text);result.push("</p></div>");}result.push('<div class="pr-review-attribution-img"><p class="pr-review-attribute-imgLabel">');result.push("REVIEWED AT");result.push('</p><a target="_blank" href="');result.push(attribution.originating_merchant_url);result.push('"><img src="');result.push(docRoot);result.push("/engine/images/");result.push(attribution.image_uri);result.push('"/></a></div><div class="pr-clear"></div></div>');}else{result.push('<div class="pr-review-attribution-img"><p class="pr-review-attribute-imgLabel">');result.push("REVIEWED AT");result.push('</p><a target="_blank" href="');result.push(attribution.originating_merchant_url);result.push('"><img src="');result.push(docRoot);result.push("/engine/images/");result.push(attribution.image_uri);result.push('"/></a></div>');}}}}if(review.t>0){result.push('<div class="pr-review-most-helpful-bottom"><p>(<span>');result.push("{0} of {1}".replace("{0}",review.v).replace("{1}",review.t));result.push("</span> ");result.push("customers found this review helpful");result.push(")</p></div>");}if(!isProfile){result.push('<div class="pr-review-tools"><p class="pr-review-helpful-text">');result.push("Was this review helpful?");result.push('&nbsp;<a class="pr-review-helpful-text-link" href="#" onclick="POWERREVIEWS.display.submitHelpfulVote(\'');result.push(review.id);result.push("', 'helpful', '");result.push(locale);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); return false;\">");result.push("Yes");result.push('</a>&nbsp;/&nbsp;<a class="pr-review-helpful-text-link" href="#" onclick="POWERREVIEWS.display.submitHelpfulVote(\'');result.push(review.id);result.push("', 'unhelpful', '");result.push(locale);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); return false;\">");result.push("No");result.push('</a></p><p class="pr-review-report-issue"><span class="pr-review-report-issue-hyphen">&nbsp;-&nbsp;</span>');result.push("You may also");result.push(' <a href="#" class="pr-review-helpful-text-link" onclick="POWERREVIEWS.display.launchErrorDiv(\'');result.push(review.id);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); return false;\">");result.push("flag this review");result.push('</a></p><div class="pr-error" id="error_div');result.push(review.id);result.push('" style=""></div><p class="pr-review-helpful-response" id="review_feedback');result.push(review.id);result.push('"></p></div>');}result.push('</div></div><div class="pr-clear"></div>');if(false){var facebookCommentUrl=getFacebookMakeCommentUrl({"locale":locale,"sharedReviewId":review.id},options);result.push('<p class="pr-fb-reviewComment"><span><a href="#" onclick="POWERREVIEWS.common.showSmallPopup(\'');result.push(facebookCommentUrl);result.push("', 450, 600, {'location':'no'}); return false;\">");result.push("Comment on this review");result.push('</a></span><img class="pr-profile-fb-help-icon" src="');result.push(docRoot);result.push('/engine/images/icon_orange_help.gif" title="');result.push("Click here to write a comment and share this review with your friends on Facebook. Your comment and this review will show up in your Facebook News Feed.");result.push('" /></p><div class="pr-clear"></div>');}result.push("</div>");}if(!isProfile){result.push('<div class="pr-pagination-bottom"><div class="pr-page-count-wrapper"><p class="pr-page-count">');if(startIndex==endIndex){result.push("Displaying review");result.push(" <strong>");result.push((startIndex+1));result.push("</strong>");}else{result.push("Displaying reviews");result.push(" <strong>");result.push((startIndex+1)+"-"+(endIndex+1));result.push("</strong>");}result.push('</p><p class="pr-nav-back-to-top"><a href="');result.push(topAnchor);result.push('">');result.push("Back to top");result.push("</a></p></div>");if(reviewCount>reviewsPerPage){result.push('<div class="pr-page-nav-wrapper"><p class="pr-page-nav"><span class="pr-page-prev">');if(startIndex>0){result.push('<a onclick="POWERREVIEWS.display.getReviewsFromMeta(');result.push(pageNum-1);result.push(", '");result.push(pageId);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); location.hash = '#pr-header-");result.push(pageId);result.push('\'; return false;" href="');result.push(prevPageLinkTemplate.replace("~~~REVIEW_PAGE~~~",pageNum-1));result.push('">&laquo; ');result.push("Previous");result.push("</a>");}else{result.push("Previous");}result.push('</span><span class="pr-divider"> | </span><span class="pr-page-next">');if(endIndex<reviewCount-1){result.push('<a onclick="POWERREVIEWS.display.getReviewsFromMeta(');result.push(pageNum+1);result.push(", '");result.push(pageId);result.push("', '");result.push(locale);result.push("', '");result.push(optionsKey);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); location.hash = '#pr-header-");result.push(pageId);result.push('\'; return false;" href="');result.push(nextPageLinkTemplate.replace("~~~REVIEW_PAGE~~~",pageNum+1));result.push('">');result.push("Next");result.push(" &raquo;</a>");}else{result.push("Next");}result.push("</span></p></div>");}result.push('<div class="pr-clear"></div></div>');}result.push("</div>");return result.join("");}publicScope.display.processReviewsTemplate=processReviewsTemplate;function processErrorDivTemplate(reviewId,locale,optionsKey,options){var result=[];result.push('<div class="pr-report-issue-header">');result.push("Please let us know what kind of issue this is:");result.push('<span class="pr-required">*</span></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="profanity_');result.push(reviewId);result.push('" value="profane"><label for="profanity_');result.push(reviewId);result.push('">');result.push("Profanity");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="wrong_product_');result.push(reviewId);result.push('" value="wrong_product"><label for="wrong_product_');result.push(reviewId);result.push('">');result.push("Wrong product");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="spam_');result.push(reviewId);result.push('" value="spam"><label for="spam_');result.push(reviewId);result.push('">');result.push("Spam");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="duplicate_');result.push(reviewId);result.push('" value="duplicate"><label for="duplicate_');result.push(reviewId);result.push('">');result.push("Duplicate");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="copyright_violation_');result.push(reviewId);result.push('" value="copyright"><label for="copyright_violation_');result.push(reviewId);result.push('">');result.push("Copyright violation");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="not_review_');result.push(reviewId);result.push('" value="not_review"><label for="not_review_');result.push(reviewId);result.push('">');result.push("Not a product review");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="customer_image_');result.push(reviewId);result.push('" value="customer_image"><label for="customer_image_');result.push(reviewId);result.push('">');result.push("Customer image");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="problem_with_image_');result.push(reviewId);result.push('" value="customer_image"><label for="problem_with_image_');result.push(reviewId);result.push('">');result.push("Problem with image");result.push('</label></div><div><input type="radio" name="error_radio');result.push(reviewId);result.push('" id="other_');result.push(reviewId);result.push('" value="other"><label for="other_');result.push(reviewId);result.push('">');result.push("Other");result.push('</label></div><div><label for="error_contact_email');result.push(reviewId);result.push('">');result.push("Email Address:");result.push('<span class="pr-required">*</span></label><input class="pr-error-email" type="text" id="error_contact_email');result.push(reviewId);result.push('" cols="20" maxlength="80"></div><div class="pr-issue-subtext">');result.push('</div><div><label for="error_comments');result.push(reviewId);result.push('">');result.push("Comments:");result.push('</label><textarea class="pr-error-comments" id="error_comments');result.push(reviewId);result.push('" cols="30" rows="3"></textarea></div><button class="pr-submit-button" onclick="POWERREVIEWS.display.submitError(\'');result.push(reviewId);result.push("', '");result.push(locale);result.push("', POWERREVIEWS.common.getOptions('");result.push(optionsKey);result.push("')); return false;\"><span>");result.push("Submit");result.push('</span></button><button class="pr-cancel-button" onclick="POWERREVIEWS.display.cancelError(\'');result.push(reviewId);result.push("'); return false;\"><span>");result.push("Cancel");result.push("</span></button>");return result.join("");}publicScope.display.processErrorDivTemplate=processErrorDivTemplate;function processHistogramRollupTemplate(histogramDisplayGroupList,locale,options){var result=[];result.push('<div class="pr-other-attributes-histogram"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<histogramDisplayGroupList.length;group_index++){var group=histogramDisplayGroupList[group_index];var countsByName={};var totalCount=0;var maxCount=0;var maxCountIndex=0;for(var value_index=0;value_index<group.v.length;value_index++){var value=group.v[value_index];countsByName[value.n.toLowerCase()]=value.c;}for(var display_name_index=0;display_name_index<group.a.length;display_name_index++){var displayName=group.a[display_name_index];var displayNameKey=displayName.toLowerCase();countsByName[displayNameKey]=countsByName[displayNameKey]||0;totalCount+=countsByName[displayNameKey];if(countsByName[displayNameKey]>maxCount){maxCount=countsByName[displayNameKey];maxCountIndex=display_name_index;}}result.push('<li class="pr-other-attributes-group pr-other-attribute-');result.push(group.k);result.push('"><ul><li class="pr-other-attribute-label">');result.push(group.n);result.push(':</li><li class="pr-other-attribute-value"><table>');for(var display_name_index=0;display_name_index<group.a.length;display_name_index++){var displayName=group.a[display_name_index];var displayNameKey=displayName.toLowerCase();var percentage=countsByName[displayNameKey]/totalCount*100;var isMax=(maxCountIndex==display_name_index);result.push('<tr class="pr-other-attribute-value-histogram-element ');result.push(isMax?"pr-other-attribute-value-histogram-element-max":"");result.push('"><td class="pr-other-attribute-value-histogram-label"><p>');result.push(displayName);result.push('</p></td><td class="pr-other-attribute-value-histogram-bar"><div class="pr-other-attribute-value-histogram-wrapper">');if(countsByName[displayNameKey]!=0){result.push('<div class="pr-other-attribute-value-histogram-barValue" style="width:');result.push(percentage);result.push('%">&nbsp;</div>');}else{result.push("&nbsp;");}result.push('</div></td><td class="pr-other-attribute-value-histogram-stats">');if(isMax){result.push('<p><span class="pr-other-attribute-value-histogram-stats-pct">');result.push(Math.round(percentage));result.push('%&nbsp;</span><span class="pr-other-attribute-value-histogram-stats-count">');if(countsByName[displayNameKey]==1){result.push('<p class="pr-snippet-review-count">');result.push("(1 review)");result.push("</p>");}else{result.push('<p class="pr-snippet-review-count">');result.push("({0} reviews)".replace("{0}",countsByName[displayNameKey]));result.push("</p>");}result.push("</span></p>");}result.push("</td></tr>");}result.push("</table></li></ul></li>");}result.push('<li class="pr-clear"></li></ul></div>');return result.join("");}function processSubratingRollupTemplate(subratingGroupList,locale,options){var result=[];result.push('<div class="pr-other-attributes-subratings"><ul class="pr-other-attributes-list">');for(var group_index=0;group_index<subratingGroupList.length;group_index++){var group=subratingGroupList[group_index];result.push('<li class="pr-other-attributes-group pr-other-attribute-');result.push(group.k);result.push('"><ul><li class="pr-other-attribute-label">');result.push(group.n);result.push(':</li><li class="pr-other-attribute-value"><div class="pr-stars pr-stars-small pr-stars-small-subrating ');result.push(gStarClasses[group.a].small);result.push('" style="background-position: 0px ');result.push(group.a*-36);result.push('px;">&nbsp;</div></li></ul></li>');}result.push("</ul></div>");return result.join("");}function processRatingsHistogramTemplate(ratingsArray,locale,options){var result=[];var arrHistStarText=["1 Stars","2 Stars","3 Stars","4 Stars","5 Stars"];var numRatings=0;for(var i=0;i<5;i++){numRatings+=ratingsArray[i];}result.push('<div class="pr-ratings-histogram-wrapper"><ul class="pr-ratings-histogram-content">');for(i=4;i>=0;i--){result.push('<li class="pr-histogram-');result.push([i+1]);result.push('Stars"><p class="pr-histogram-label"><span>');result.push(arrHistStarText[i]);result.push('</span></p><div class="pr-ratings-histogram-bar">');if(ratingsArray[i]!=0){result.push('<div class="pr-ratings-histogram-barValue" style="width:');result.push(ratingsArray[i]/numRatings*(100));result.push('%">&nbsp;</div>');}else{result.push("&nbsp;");}result.push('</div><p class="pr-histogram-count">');if(ratingsArray[i]!=0){result.push("<span>(");result.push(ratingsArray[i]);result.push(")</span>");}else{result.push("<span>(0)</span>");}result.push("</p></li>");}result.push("</ul></div>");return result.join("");}function processCustomBadgeTemplate(customBadge,locale,options){var result=[];if(customBadge){var docRoot=getDocRoot(options);var expertBadgeDefinitionsUrl=replaceAll(get("pr_expert_badge_definitions_url",options),"~~~LOCALE~~~",locale);var localizedBadge=customBadge.locales[locale];var isExpertBadge=(customBadge.label=="staff"||customBadge.label=="staff-expert");if(localizedBadge){var badgeLabel=customBadge.label.replace(/[^-_a-zA-Z]/g,"_");var badgeSourceClass="pr-review-author-"+badgeLabel+"-wrapper";result.push('<div class="');result.push(badgeSourceClass);result.push(" ");result.push(badgeSourceClass);result.push("-");result.push(locale);result.push('">');if(isExpertBadge){result.push('<a href="');result.push(expertBadgeDefinitionsUrl);result.push('">');}result.push('<img class="pr-badge pr-');result.push(badgeLabel);result.push('" src="');result.push(docRoot);result.push("/engine/images/badges/");result.push(localizedBadge.filename);result.push('" alt="');result.push(localizedBadge.hovertext);result.push('" title="');result.push(localizedBadge.hovertext);result.push('" />');if(isExpertBadge){result.push("</a>");}result.push("</div>");}}result.push("<!-- woozle -->");return result.join("");}function processFollowProductModalTemplate(pageIdOriginal,pageIdClean,productName,imageUri,locale,options){var result=[];var landingPageUrl=getProductFollowLandingPageUrl(pageIdOriginal,locale,options);var protocol=window.location.protocol;result.push('<p class="pr-fb-heading pr-fb-link-med">');result.push("Subscribe to Reviews");result.push('</p><div id="pr-fb-follow-wrapper-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('" class="pr-fb-follow-contentwrapper pr-fb-follow-product"><div class="pr-fb-follow-infowrapper"><div class="pr-fb-follow-info">');if(imageUri&&protocol=="http:"){result.push('<img src="http://images.buzzillions.com');result.push(imageUri);result.push('" /><br />');}result.push('<p class="pr-emphasis">');result.push(productName);result.push('</p></div><div class="pr-fb-follow-description"><p>');result.push("Get all the new reviews for this product sent to your Facebook News Feed or sent to your email address.<br/><br/>- You can unsubscribe at any time</br>- No more than 6 reviews will be sent a day");result.push('</p></div><div class="pr-clear"></div></div><div class="pr-fb-follow-option-wrapper"><div class="pr-fb-follow-fb-option"><p class="pr-emphasis">');result.push("Follow on Facebook");result.push("</p><p>");result.push("Click &#145;Like&#146; to follow on Facebook. All future reviews written about this product will appear in your News Feed.");result.push('</p><div class="pr-fb-linkbtn-wrapper"><iframe class="pr-fb-likebtn" src="');result.push(protocol);result.push("//www.facebook.com/plugins/like.php?href=");result.push(landingPageUrl);result.push('&layout=button_count&show_faces=false" scrolling="no" frameborder="0" allowTransparency="true"></iframe></div></div><p class="pr-fb-follow-divider">');result.push("OR");result.push('</p><div class="pr-fb-follow-email-option"><p class="pr-emphasis">');result.push("Follow by email");result.push("</p><p>");result.push("Enter your email address to follow by email. All future reviews written about this product will be emailed to you.");result.push('</p><span class="pr-error-msg pr-none" id="pr-fb-follow-errorMsg-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('">');result.push("Please enter a valid email address.");result.push('</span><input type="text" id="pr-fb-follow-email-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('" class="pr-fb-follow-email-input"/><a href="#" onclick="POWERREVIEWS.common.validateAndProcessEmail(this, POWERREVIEWS.common.getOptions(\'');result.push(getRegisteredKey(options));result.push('\'));return false" class="pr-fb-follow-email-submit pr-fb-follow-submit-link" prData=\'{"type":"productEmailFollower","keyValue":"');result.push(pageIdClean);result.push('","merchantGroupId":"');result.push(12342);result.push('","pageId":"');result.push(pageIdClean);result.push('","locale":"');result.push(locale);result.push('","siteId":"');result.push(prEncode(get("pr_site_id",options)||"-"));result.push('","target":"pr-fb-follow-email-');result.push(locale);result.push("-");result.push(pageIdClean);result.push("\"}' >");result.push("submit email &#0155;");result.push('</a></div><div class="pr-clear"></div></div></div>');return result.join("");}function processProductCategoryModalTemplate(arrCategories,locale,options,pageIdClean){var result=[];var protocol=window.location.protocol;result.push('<p class="pr-fb-heading pr-fb-link-med">');result.push("Like this?");result.push('</p><div id="pr-fb-follow-wrapper-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('" class="pr-fb-follow-contentwrapper pr-fb-follow-category"><div class="pr-fb-follow-infowrapper"><div class="pr-fb-follow-info pr-fb-follow-info-category"><p class="pr-fb-follow-product-category-select-label">');result.push("Categories");result.push("</p>");if(arrCategories.length>0){result.push('<ul class="pr-fb-follow-product-category">');for(var category_index=0;category_index<arrCategories.length;category_index++){result.push('<li class="category-');result.push(category_index);result.push('"><input type="radio" name="category" value="');result.push(arrCategories[category_index].url);result.push('" onclick=\'POWERREVIEWS.display.toggleFbLikeButton("pr-fb-like-');result.push(category_index);result.push('",{"target":"pr-fb-follow-email-submit-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('","keyValue":"');result.push(prEncode(arrCategories[category_index].code));result.push('","locale":"');result.push(locale);result.push('","pageId":"');result.push(pageIdClean);result.push("\"})' ");result.push((category_index==0?"checked":""));result.push("/><p>");result.push(arrCategories[category_index].label);result.push('</p><div class="pr-clear"></div></li>');}result.push("</ul>");}result.push('</div><div class="pr-fb-follow-description"><p>');result.push("Get reviews for new and popular products by selecting a category and then clicking the 'Like' button or entering your email below. One review will appear in your Facebook News Feed or email inbox every day.");result.push('</p></div><div class="pr-clear"></div></div><div class="pr-fb-follow-option-wrapper"><div class="pr-fb-follow-fb-option"><p class="pr-emphasis">');result.push("Follow on Facebook");result.push("</p><p>");result.push("Click &#145;Like&#146; to follow on Facebook. A selected review for a new or popular product will appear in your News Feed daily.");result.push('</p><div class="pr-fb-linkbtn-wrapper" id="pr-fb-linkbtn-wrapper-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('">');if(arrCategories.length>0){for(var category_index=0;category_index<arrCategories.length;category_index++){result.push('<iframe id="pr-fb-like-');result.push(category_index);result.push('" class="pr-fb-likebtn ');result.push((category_index==0?"":"pr-hidden"));result.push('" src="');result.push(protocol);result.push("//www.facebook.com/plugins/like.php?href=");result.push(arrCategories[category_index].url);result.push('&layout=button_count&show_faces=false" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');}}result.push('</div></div><p class="pr-fb-follow-divider">');result.push("OR");result.push('</p><div class="pr-fb-follow-email-option"><p class="pr-emphasis">');result.push("Follow by email");result.push("</p><p>");result.push("Enter your email address to follow by email. A selected review for a new or popular product will be emailed to you daily.");result.push('</p><span class="pr-error-msg pr-none" id="pr-fb-follow-errorMsg-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('">');result.push("Please enter a valid email address.");result.push('</span><input type="text" id="pr-fb-follow-email-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('" class="pr-fb-follow-email-input"/><a id="pr-fb-follow-email-submit-');result.push(locale);result.push("-");result.push(pageIdClean);result.push('" href="#" onclick="POWERREVIEWS.common.validateAndProcessEmail(this, POWERREVIEWS.common.getOptions(\'');result.push(getRegisteredKey(options));result.push('\'));return false" class="pr-fb-follow-email-submit pr-fb-follow-submit-link" prData=\'{"type":"productCategoryEmailFollower","keyValue":"');result.push(prEncode(arrCategories[0].code));result.push('","merchantGroupId":"');result.push(12342);result.push('","pageId":"');result.push(pageIdClean);result.push('","locale":"');result.push(locale);result.push('","siteId":"');result.push(prEncode(get("pr_site_id",options)||"-"));result.push('","target":"pr-fb-follow-email-');result.push(locale);result.push("-");result.push(pageIdClean);result.push("\"}' >");result.push("submit email &#0155;");result.push('</a></div><div class="pr-clear"></div></div></div>');return result.join("");}function processModalWrapperTemplate(pageId){var result=[];result.push('<div class="pr-modal-toolbar"><a class="pr-modal-container-close" href="#" onclick="POWERREVIEWS.display.hideModal(\'');result.push(pageId);result.push('\'); return false;"><span>close</span></a><div class="pr-clear"></div></div><div class="pr-modal-wrapper"><div id="pr-modal-');result.push(pageId);result.push('" class="pr-modal-content"></div></div>');return result.join("");}var gSnippetsOnThePage=0;var gSnippetCountTimeoutSet=false;function snippet(mainDoc,options){if(prDisplayInit(mainDoc,options)){snippetInitOnce(mainDoc,options);var pageId=clean(get("pr_page_id",options));var locale=get("pr_locale",options);var existingDivId="pr-snippet-"+pageId;var showFacebookLikeButton=true;gSnippetsOnThePage++;if(document.getElementById(existingDivId)){displaySnippet(pageId,locale,existingDivId,showFacebookLikeButton,options);}else{var snippetDiv="pr-snippet-"+pageId+"-"+gSnippetsOnThePage;mainDoc.write('<div id="'+snippetDiv+'" class="pr-snippet"></div>');displaySnippet(pageId,locale,snippetDiv,showFacebookLikeButton,options);}if(!gSnippetCountTimeoutSet){setTimeout(function(){trackSnippetCount(options);},3000);gSnippetCountTimeoutSet=true;}}}publicScope.display.snippet=snippet;window.snippet=snippet;gFlagSnippetInitFinished=false;function snippetInitOnce(mainDoc,options){if(gFlagSnippetInitFinished){return ;}gFlagSnippetInitFinished=true;var src="https://apis.google.com/js/plusone.js";if(src){var plusoneScript=document.createElement("script");plusoneScript.setAttribute("type","text/javascript");plusoneScript.setAttribute("src",src);document.getElementsByTagName("head")[0].appendChild(plusoneScript);}}function trackSnippetCount(options){trackRDUsageInstance({"type":"snippet","count":gSnippetsOnThePage},options);}function renderGooglePlusOne(divId,options){if(!get("pr_suppress_google_plus_one",options)){if(!window.gapi||!gapi.plusone){setTimeout(function(){renderGooglePlusOne(divId);},500);}else{try{gapi.plusone.render(divId,{size:"small",href:get("pr_google_plus_one_url",options)});}catch(e){}}}}function getGooglePlusOneDivId(idPrefix){return idPrefix+"-google-plus-one";}function displaySnippet(pageId,locale,snippetDivToWriteTo,showFacebookLikeButton,options){grabContents(pageId,locale,function(contents){var minReviews=get("pr_snippet_min_reviews",options);var reviewCount=0;var averageRating=0;var divIdPrefix=snippetDivToWriteTo;if(contents&&contents.reviews){reviewCount=contents.reviews.review_count;averageRating=contents.reviews.avg;}if(minReviews<=reviewCount){writeContentToDiv(snippetDivToWriteTo,processSnippetTemplate(pageId,reviewCount,averageRating,locale,showFacebookLikeButton,divIdPrefix,options),function(){renderGooglePlusOne(getGooglePlusOneDivId(divIdPrefix,options));});}},options);}function processSnippetTemplate(pageId,reviewCount,averageRating,locale,showFacebookLikeButton,divIdPrefix,options){var result=[];var writeReviewUrl=getReviewWrapperUrl(get("pr_page_id",options),options);var readReviewsUrl=get("pr_read_review",options);var averageRatingRounded=roundRating(averageRating);var averageRatingInteger=Math.round(averageRating);var cursor="";var onclick="";var starClick=get("pr_snippet_star_click",options);if(starClick){cursor=" cursor:pointer;";onclick=' onclick="'+starClick+'"';}var titles=["Got it? Rate it.","Not good","Needs that special something","Average, ordinary","That's good stuff","Perfect. It doesn't get any better"];var pageUrl=get("pr_facebook_like_button_url",options);if(pageUrl==null){pageUrl=document.URL;}pageUrl=prEncode(pageUrl);if(pageUrl==""){showFacebookLikeButton=false;}var fbProtocol=window.location.protocol;var showPlusOne=true&&!get("pr_suppress_google_plus_one",options);result.push('<div class="pr-snippet-wrapper"><div class="pr-snippet-stars"><div title="');result.push(titles[averageRatingInteger]);result.push('" style="background-position: 0px ');result.push(averageRatingRounded*-36);result.push("px;");result.push(cursor);result.push('" class="pr-stars pr-stars-small ');result.push(gStarClasses[averageRatingRounded].small);result.push('"');result.push(onclick);result.push('>&nbsp;</div><span class="pr-snippet-rating-decimal pr-rounded">');result.push((averageRating*10)%10==0?averageRating+".0":averageRating);result.push("</span></div>");if(reviewCount==0){result.push('<p class="pr-snippet-review-count">');result.push("(No reviews)");result.push("</p>");}else{if(reviewCount==1){result.push('<p class="pr-snippet-review-count">');result.push("(1 review)");result.push("</p>");}else{result.push('<p class="pr-snippet-review-count">');result.push("({0} reviews)".replace("{0}",reviewCount));result.push("</p>");}}result.push('<div class="pr-snippet-read-write">');if(reviewCount>0){if(readReviewsUrl){if(reviewCount==1){result.push('<div class="pr-snippet-read-reviews"><a href="');result.push(readReviewsUrl);result.push('" class="pr-snippet-link" id="pr-snippet-read-link-');result.push(pageId);result.push('">');result.push("Read <span>1</span> Review");result.push("</a></div>");}else{result.push('<div class="pr-snippet-read-reviews"><a href="');result.push(readReviewsUrl);result.push('" class="pr-snippet-link" id="pr-snippet-read-link-');result.push(pageId);result.push('">');result.push("Read <span>{0}</span> Reviews".replace("{0}",reviewCount));result.push("</a></div>");}}if(writeReviewUrl){result.push('<div class="pr-snippet-write-review"><a href="');result.push(writeReviewUrl);result.push('" class="pr-snippet-link">');result.push("Write a Review");result.push("</a></div>");}}else{if(writeReviewUrl){result.push('<div class="pr-snippet-write-first-review"><p>');result.push("Be the first to");result.push('</p> <a href="');result.push(writeReviewUrl);result.push('" class="pr-snippet-link">');result.push("Write a Review");result.push("</a></div>");}}result.push('<div class="pr-clear"></div></div><div class="pr-clear"></div><div class="pr-snippet-social-bar">');if(showPlusOne){result.push('<div class="pr-google-plus-one"><div id="');result.push(getGooglePlusOneDivId(divIdPrefix));result.push('"></div></div>');}if(showFacebookLikeButton){result.push('<div class="pr-facebook-like-snippet"><iframe src="');result.push(fbProtocol);result.push("//www.facebook.com/plugins/like.php?href=");result.push(pageUrl);result.push('&layout=button_count&show_faces=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe></div>');}result.push('<div class="pr-clear"></div></div></div>');return result.join("");}var gSummarySnippetsOnThePage=0;function summarySnippet(mainDoc,options){if(prDisplayInit(mainDoc,options)){var pageId=clean(get("pr_page_id",options));var locale=get("pr_locale",options);var existingDivId="pr-summary-snippet-"+pageId;if(document.getElementById(existingDivId)){displaySummarySnippet(pageId,locale,existingDivId,options);}else{var snippetDiv="pr-summary-snippet-"+pageId+"-"+(gSummarySnippetsOnThePage++);mainDoc.write('<div id="'+snippetDiv+'" class="pr-summary-snippet"></div>');displaySummarySnippet(pageId,locale,snippetDiv,options);}}}publicScope.display.summarySnippet=summarySnippet;function displaySummarySnippet(pageId,locale,snippetDivToWriteTo,options){grabContents(pageId,locale,function(contents){var minReviews=get("pr_snippet_min_reviews",options);var reviewCount=0;if(contents&&contents.reviews){reviewCount=contents.reviews.review_count;if(minReviews<=reviewCount){loadObject(getDocRoot(options)+"/content/"+hashIt(pageId)+"/"+pageId+"-"+locale+"-rollup.js",null,function(obj){if(obj.rollup){writeContentToDiv(snippetDivToWriteTo,processSummarySnippetTemplate(obj.rollup,pageId,locale,options));}},options);}}},options);}function processSummarySnippetTemplate(rollup,pageId,locale,options){var result=[];var collectedGroupInfo=extractGroupsFromRollup(rollup);var histogramDisplayGroupList=collectedGroupInfo.histogramDisplayGroupList;var subratingGroupList=collectedGroupInfo.subratingGroupList;result.push('<div class="pr-summary-snippet-body">');if(histogramDisplayGroupList.length){result.push(processHistogramRollupTemplate(histogramDisplayGroupList,locale,options));}if(subratingGroupList.length){result.push(processSubratingRollupTemplate(subratingGroupList,locale,options));}result.push('</div><div class="pr-clear"></div>');return result.join("");}return publicScope;})();var SHOPZILLAREVIEWS=POWERREVIEWS;
