var shouldLoadWidget=!0;try{window.c_s&&(shouldLoadWidget=!1)}catch(e){}if(shouldLoadWidget){window.c_s={},c_s.custom_config={apikey:"dentalcremer",injected_page_css:".header-search {position: relative; width: 405px; background:none!important} .upFloatHeader.fixed .header-search {width: 300px;} .chaordic-cart {width: 580px; top: 29px !important; left: 140px !important;}",iframe_starting_height:40,html_products:!0,base_url_host:"busca.dentalcremer.com.br",static_host:"static.chaordicsystems.com/search",fluid:!0,height:"40px",hide_unavailable:!1,width:"100%",post_injection_deletion_selectors:[".header-search fieldset"],widget_in_production:!1,env:"PROD",client_url_host:"dentalcremer.com.br",injection_selector:".header-search",placeholder:"Procure por marca, nome, código..."},c_s.config={widget_in_production:!1,injected_search_page_url:null,position_type:"absolute",placeholder:"O que você está procurando?",width:null,position_top:"0px",position_left:"0px",html_products:!1,big_images:!1,products_title:!1,chaordic_trademark:!1,typing_delay:450,iframe_width:494,iframe_starting_height:32,core_width_margin:5,post_injection_deletion_selectors:[],injection_selector:"#chaordic-search-widget",injected_search_page_injector:"#chaordic-search-page",fluid:!1,has_iframe:!0,title_limit:45,historical_suggestion_limit:2,no_query_product_suggestion_limit:5,no_query_query_suggestion_limit:5,with_query_product_suggestion_limit:5,with_query_query_suggestion_limit:5,historical_limit:50,query_title_limit:45,iframe_z_index:"9999999999999",base_url_host:"",apikey:"",injected_page_css:null,secondary_input:null};for(var k in c_s.custom_config)c_s.config[k]=c_s.custom_config[k];c_s.__init=function(){function isEmpty(obj){for(var prop in obj)if(obj.hasOwnProperty(prop))return!1;return!0}c_s.post_injection_deletion_selectors=c_s.config.post_injection_deletion_selectors,c_s.postSelectorHandler=function(form,fn){c_s.rootElement=document.createElement("div"),c_s.addClass(c_s.rootElement,"chaordic-widget-root-element"),c_s.config.width&&(c_s.rootElement.style.width=c_s.config.width),c_s.config.position_type!=="static"&&(c_s.rootElement.style.top=c_s.config.position_top,c_s.rootElement.style.left=c_s.config.position_left),c_s.rootElement.style.position=c_s.config.position_type,form.appendChild(c_s.rootElement),fn(c_s.rootElement),c_s.isInFooter=!1},c_s.injection_selector={selector:c_s.config.injection_selector,handler:c_s.postSelectorHandler},c_s.widget_css_url="//"+c_s.static_url_host+"/search/generated/"+c_s.config.apikey+"/widget/"+c_s.config.apikey+"-widget.css",c_s.spinner_url="//"+c_s.static_url_host+"/search/images/spiffygif_30x30_white.gif",c_s.iframeWidth=c_s.config.iframe_width,c_s.buttonWidth=60,c_s.inputContainerWidth=c_s.iframeWidth-c_s.buttonWidth,c_s.coreWidth=c_s.inputContainerWidth-c_s.config.core_width_margin,c_s.para_width=c_s.coreWidth-32,c_s.iframeZIndex=c_s.config.iframe_z_index,c_s.custom_button_img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMTcuMDYuMTTmU8pmAAABS0lEQVRIibWVa5HDMAyE7SIIBEMwhEAoBEMohEAIhEAIhEAwhEAIg70flWc28rO9u53JTFLL+iRZVi0AY601LQGY6TNaa6+OfeXjbvQEcKCsE8CrBUhPBgAwAdgrjksgPwwQ51E5uSSTRcBnYd2PAnRJFgBTIcIgjhnimgDZxMpSL5SSs916AE69eoAK4lVQrghQhueIc4JsOjAGPMTO0Z79E4Cyz8r6KCw0L1FBkd5dDfBvSoBmFB1x9jFblcNw3NOfeMf91gfymbUp9/Qy6HzmwCCXsgZ4qp4OHece99u80Fp1VOght4JGgNhMeI+QS9nGZga0WQ+7tPlAfXwn7U0AQdaOo5a2JkAd4Ia8FMC7lKVMk0IXoGBOgJ5+m5D/N7DmYUADrDuJdYCG3Vey1kZjTKgsXymK3zCSj5eKPkoJ/wYgkNR5K6iLfgDtA7eecVKAQgAAAABJRU5ErkJggg==",c_s.query_suggestion_img="data:image/png;base64,iVBORw0KGgoAAAAN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54LXbjKEmnsjK2/Rm8v5ZZ391HtNUjt0M2oPRncJP5/2c52DrOr7skJIVXl2kWNHUsSquHXURpWuX0bXt9JuROkE3a8RGqiVzoywveSPFyL44hp49tV3skuZkn/v5Dv5aidx8pW8P+3kzsvxW3MwOLn2Ct+fXyI7DEraXVcXVrZ4afrx46vLyK7mDxEnVCwWB7XhBlIkW07eqSrrIJppfs7UDsXHgKLzqj9D/WErSzVDdhs4hPT8Dz/LqvoPcEGAAQBUWf29MtWxfQAAAABJRU5ErkJggg==",c_s.moveRootElementTo=function(selector,positioner){var element=document.querySelector(selector);if(element){var input_val=c_s.inputBox?c_s.inputBox.value:"";c_s.rootElement.parentNode.removeChild(c_s.rootElement),positioner(element,c_s.initElements),c_s.inputBox.value=input_val}},c_s.config.secondary_input&&(c_s.postInit=function(){c_s.isInFooter=!1;var repositionWidget=function(){var top=document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop;top>c_s.config.secondary_input.break_point_scroll_top&&!c_s.isInFooter?c_s.moveRootElementTo(c_s.config.secondary_input.injection_selector,function(form,fn){c_s.rootElement=document.createElement("div"),c_s.addClass(c_s.rootElement,"chaordic-widget-root-element"),c_s.addClass(c_s.rootElement,"chaordic-widget-root-element-secondary-input"),c_s.config.secondary_input.position_type!=="static"&&(c_s.rootElement.style.top=c_s.config.secondary_input.position_top,c_s.rootElement.style.left=c_s.config.secondary_input.position_left),c_s.config.secondary_input.width&&(c_s.rootElement.style.width=c_s.config.secondary_input.width),c_s.rootElement.style.position=c_s.config.secondary_input.position_type,form.appendChild(c_s.rootElement),fn(c_s.rootElement),c_s.isInFooter=!0}):c_s.config.secondary_input.break_point_scroll_top>top&&c_s.isInFooter&&c_s.moveRootElementTo(c_s.config.injection_selector,c_s.postSelectorHandler)};c_s.attachEvent(window,"scroll",repositionWidget),repositionWidget()}),c_s.search_url="//"+c_s.base_url_host+"/?q=",c_s.iframe_starting_height=c_s.config.iframe_starting_height,c_s.li_border=1,c_s.rootElement,c_s.widgetContainer,c_s.inputContainer,c_s.inputBox,c_s.spinner,c_s.suggestionContainer,c_s.suggestionList,c_s.suggestionListIndex,c_s.last_query=null,c_s.timeoutIds=[],c_s.search_id,c_s.request_count=0,c_s.isOnSearchPage=function(){return window.is_chaordic_search_page},c_s.isMobile=function(a){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))?!0:void 0}(navigator.userAgent||navigator.vendor||window.opera),c_s.initial_input_value=function(){var query,url=location.href.split("?");if(url[1]){var params="&"+url[1];if(params=params.split("&"),params.length)for(var i=0;params.length>i;i++){var param=params[i].split("=");param[0]==="q"&&(query=decodeURIComponent(param[1]))}}return query?query:""}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(elt){var len=this.length>>>0,from=Number(arguments[1])||0;for(from=0>from?Math.ceil(from):Math.floor(from),0>from&&(from+=len);len>from;from++)if(from in this&&this[from]===elt)return from;return-1}),typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.returnValue=!1};c_s.initWidget=function(){c_s.search_id=c_s.uuid(),c_s.injection(c_s.postInit),c_s.postInjectionDeletion(),c_s.inject_page_css(),c_s.inject_page_js()},c_s.get_protocol=function(){return location.protocol},c_s.inject_required_scripts=function(){var cssFile=c_s.config.fluid?"chaordic-fluid.css":"chaordic-theme.css",injectables={head:[{link:{href:"//"+c_s.config.static_host+"/css/"+cssFile,rel:"stylesheet"}},{link:{href:"//"+c_s.config.static_host+"/generated/"+c_s.config.apikey+"/search_page/"+c_s.config.apikey+".css",rel:"stylesheet"}}],body:[]};injectables.body.push({script:{src:"//"+c_s.config.static_host+"/generated/"+c_s.config.apikey+"/search_page/"+c_s.config.apikey+".js"}}),setTimeout(function(){for(var inject_location in injectables)for(var items=injectables[inject_location],i=0;items.length>i;i++){var item=items[i];for(var el_type in item){var attrs=item[el_type],el=document.createElement(el_type);for(var attr in attrs){var val=attrs[attr];el.setAttribute(attr,val)}if(inject_location==="head"){var head=document.head||document.getElementsByTagName("head")[0];head.appendChild(el)}else inject_location==="body"&&document.body.appendChild(el)}}},0)},c_s.inject_search_page=function(){c_s.config.injected_search_page_url&&location.href.indexOf(c_s.config.injected_search_page_url)>-1&&c_s.xhr("//"+c_s.static_url_host+"/search/generated/"+c_s.config.apikey+"/injected_search_page/"+c_s.config.apikey+"-desktop.html",function(){c_s.is_injected_search_page=!0;var xhrResponse=this;c_s.waitForElement(c_s.config.injected_search_page_injector,function(element){c_s.inject_required_scripts(),c_s.config.fluid?"chaordic-fluid.css":"chaordic-theme.css",c_s.addClass(document.body,"cs-injected-search-page"),element.style.display="none",c_s.addClass(element,"chaordic-search-page-root-element"),document.documentElement.id="ng-app",document.documentElement.setAttribute("ng-app","chaordicSearch");var html=xhrResponse.responseText,div=document.createElement("div");div.innerHTML=html,element.appendChild(div)},"chaordic search page injection point not found")})},c_s.inject_page_css=function(){if(c_s.config.injected_page_css){var css=c_s.config.injected_page_css,head=document.head||document.getElementsByTagName("head")[0],style=document.createElement("style");style.type="text/css",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),head.appendChild(style)}},c_s.postInjectionDeletion=function(){var selectors=c_s.post_injection_deletion_selectors,j=0,deletionInterval=setInterval(function(){for(var i=selectors.length-1;i>=0;i--){var element=document.querySelector(selectors[i]);element&&(element.parentNode.removeChild(element),selectors.splice(i,1))}(!selectors.length||j>1e3)&&clearInterval(deletionInterval),j+=1},10)},c_s.waitForElement=function(selector,callback,fail_message,interval,times){interval=interval!==void 0?interval:10,times=times!==void 0?times:1e3;var j=0,interval=setInterval(function(){var element=document.querySelector(selector);element&&(clearInterval(interval),typeof callback=="function"&&callback(element)),j>1e3&&(clearInterval(interval),j>1e3&&console.log(fail_message||"Gave up waiting for "+selector)),j+=1},10)};var _createFrame=function(callback,insertionPoint){var iframe=document.createElement("iframe"),html='chaordic%IE_DOCUMENT_DOMAIN%',iframeReady=function(){var ready=!1;try{ready=iframe.contentWindow.document.getElementsByTagName("title")[0].innerHTML==="chaordic"}catch(e){}ready?callback(iframe):setTimeout(iframeReady,10)};if(insertionPoint===void 0)return callback(iframe),void 0;if(iframe.scrolling="no",iframe.frameBorder="0",iframe.style.display="none",iframe.allowTransparency="true",function(m){return m&&m[1]}(navigator.userAgent.match(/MSIE\s([^;]*)/))&&document.domain+""!=location.hostname+""){var escapedHtml=html.replace(/\%IE_DOCUMENT_DOMAIN\%/,'').replace(/\//g,"\\/").replace(/\"/g,'\\"').replace(/\\/g,"\\\\");iframe.src="javascript:''",insertionPoint.appendChild(iframe)}else{insertionPoint.appendChild(iframe);var frameDocument=iframe.contentWindow.document;frameDocument.write(html.replace(/\%IE_DOCUMENT_DOMAIN\%/,"")),frameDocument.close()}iframeReady()};c_s.injection=function(fn){var selector=c_s.injection_selector;c_s.waitForElement(selector.selector,function(element){selector.handler(element,c_s.initElements),typeof fn=="function"&&fn()},"chaordic injection point not found")},c_s.initElements=function(rootElement){c_s.attachEvent(document,"click",function(ev){var target=ev.target||ev.srcElement;target!==c_s.inputBox&&c_s.hideSuggestions()}),_createFrame(function(iframe){c_s.config.has_iframe&&(c_s.widgetIframe=iframe,c_s.widgetIframe.id="chaordic-widget-iframe",c_s.widgetIframe.style.width=c_s.config.fluid?"100%":c_s.iframeWidth+"px",c_s.widgetIframe.style.height=c_s.iframe_starting_height+"px",c_s.widgetIframe.style.overflowY="hidden",c_s.widgetIframe.style.overflowX="hidden",c_s.widgetIframe.backgroundColor="black",c_s.widgetIframe.style.margin="0",c_s.widgetIframe.style.padding="0",c_s.widgetIframe.style.position="relative",c_s.widgetIframe.style.zIndex=c_s.iframeZIndex,c_s.widgetIframe.allowTransparency="true",c_s.widgetIframe.scrolling="no",c_s.widgetIframe.frameBorder="0",c_s.widgetIframe.style.display="block"),c_s.widgetContainer=document.createElement("div"),c_s.widgetContainer.id="chaordic-widget-container",c_s.addClass(c_s.widgetContainer,"chaordic-widget-container"),c_s.isIE(8)&&c_s.addClass(c_s.widgetContainer,"IE8"),c_s.inputContainer=document.createElement("div"),c_s.config.fluid||(c_s.inputContainer.style.width=c_s.inputContainerWidth+"px"),c_s.inputContainer.id="chaordic-widget-input-container",c_s.addClass(c_s.inputContainer,"chaordic-widget-input-container"),c_s.inputBox=document.createElement("input"),c_s.inputBox.id="chaordic-widget-input-box",c_s.addClass(c_s.inputBox,"chaordic-widget-input-box");var max_length=c_s.isIE(8)?"55":"";c_s.inputBox.setAttribute("maxlength",max_length),c_s.inputBox.setAttribute("type","text"),c_s.inputBox.setAttribute("placeholder",c_s.config.placeholder),c_s.inputBox.setAttribute("autocomplete","off"),c_s.config.fluid||(c_s.inputBox.style.width=c_s.coreWidth+1+"px"),c_s.inputBox.value=c_s.initial_input_value,c_s.lastTypedQuery=c_s.initial_input_value,c_s.config.placeholder&&c_s.inputBox.setAttribute("placeholder",c_s.config.placeholder),c_s.attachEvent(c_s.inputBox,"keydown",c_s.onType),c_s.attachEvent(c_s.inputBox,"focus",function(){c_s.suggestionList.children.length||c_s.doSearch(),c_s.showSuggestions()}),c_s.spinner=document.createElement("img"),c_s.spinner.id="chaordic-spinner",c_s.addClass(c_s.spinner,"chaordic-spinner"),c_s.spinner.src=c_s.spinner_url,c_s.spinner.spin=function(){c_s.spinner.style.display="block"},c_s.spinner.stop=function(){c_s.spinner.style.display="none"},c_s.spinner.stop();var buttonContainer=document.createElement("div"),button=document.createElement("div"),img=document.createElement("img");if(img.id="chaordic-search-button-img",img.src=c_s.custom_button_img,button.appendChild(img),buttonContainer.appendChild(button),buttonContainer.id="chaordic-search-button",c_s.addClass(buttonContainer,"chaordic-search-button"),c_s.addClass(buttonContainer,"full-width-button"),buttonContainer.onclick=function(){c_s.redirectToSearchPage()},c_s.config.fluid){var isolatedButton=document.createElement("div"),button=document.createElement("div"),img=document.createElement("img");c_s.addClass(img,"chaordic-search-button-img"),img.src=c_s.custom_button_img,button.appendChild(img),isolatedButton.appendChild(button),c_s.addClass(isolatedButton,"chaordic-search-button"),c_s.addClass(isolatedButton,"isolated-button"),isolatedButton.onclick=function(){c_s.redirectToSearchPage()}}else{var margin=c_s.isIE(8)?4:0;buttonContainer.style.width=c_s.buttonWidth-margin+"px"}if(c_s.inputContainer.appendChild(c_s.inputBox),c_s.inputContainer.appendChild(c_s.spinner),c_s.inputContainer.appendChild(buttonContainer),c_s.suggestionContainer=document.createElement("div"),c_s.attachEvent(c_s.suggestionContainer,"click",function(){c_s.hideSuggestions()}),c_s.suggestionContainer.id="chaordic-widget-suggestion-container",c_s.addClass(c_s.suggestionContainer,"chaordic-widget-suggestion-container"),c_s.suggestionList=document.createElement("ul"),c_s.suggestionList.id="chaordic-widget-suggestion-list",c_s.addClass(c_s.suggestionList,"chaordic-widget-suggestion-list"),c_s.config.fluid||(c_s.suggestionList.style.width=c_s.coreWidth+"px"),c_s.config.has_iframe||(c_s.suggestionList.style.display="none"),c_s.suggestionListIndex=-1,c_s.suggestionContainer.appendChild(c_s.suggestionList),c_s.widgetContainer.appendChild(c_s.inputContainer),c_s.widgetContainer.appendChild(c_s.suggestionContainer),c_s.config.has_iframe){var iframeDoc=c_s.widgetIframe.contentWindow.document;c_s.config.fluid&&(iframeDoc.body.appendChild(isolatedButton),c_s.attachEvent(iframeDoc.body,"click",function(ev){var target=ev.target||ev.srcElement;target===iframeDoc.body&&c_s.hideSuggestions()})),iframeDoc.body.appendChild(c_s.widgetContainer)}else rootElement.appendChild(isolatedButton),rootElement.appendChild(c_s.widgetContainer);if(!c_s.config.has_iframe){var link=document.createElement("link");link.setAttribute("href",c_s.widget_css_url),link.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(link)}},rootElement)},c_s.redirectTo=function(url){window.location.href=url},c_s.redirectToSearchPage=function(query,autocomplete_info){if(query=query||c_s.inputBox.value){var autocomplete_parameters;c_s.inputBox.value=query;var search_page_url=c_s.config.injected_search_page_url?"//"+c_s.config.injected_search_page_url+"/":c_s.search_url;if(0>search_page_url.indexOf("q=")&&(search_page_url+="?q="),c_s.isOnSearchPage())try{c_s.hideSuggestions(),angular.element(document.querySelector(".chaordic-search")).scope().q=query,angular.element(document.querySelector(".chaordic-search")).scope().newSearch(autocomplete_info),document.body.className.indexOf("cs-mobile")>-1&&c_s.inputBox.blur(),c_s.suggestionList.innerHTML=""}catch(e){autocomplete_info?(autocomplete_parameters="&autocomplete_type="+autocomplete_info.type+"&autocomplete_order="+autocomplete_info.order+"&search_id="+c_s.search_id,c_s.redirectTo(search_page_url+encodeURIComponent(query)+autocomplete_parameters)):c_s.redirectTo(search_page_url+encodeURIComponent(query))}else autocomplete_info?(autocomplete_parameters="&autocomplete_type="+autocomplete_info.type+"&autocomplete_order="+autocomplete_info.order+"&search_id="+c_s.search_id,c_s.redirectTo(search_page_url+encodeURIComponent(query)+autocomplete_parameters)):c_s.redirectTo(search_page_url+encodeURIComponent(query))}},c_s.attachEvent=function(el,eventName,fn){try{el.addEventListener?el.addEventListener(eventName,fn,!0):el.attachEvent?el.attachEvent("on"+eventName,fn):el.addEventListener(eventName,fn,!0)}catch(e){}},c_s.isIE=function(version,comparison){var isIE,cc="IE",b=document.createElement("B"),docElem=document.documentElement;return version&&(cc+=" "+version,comparison&&(cc=comparison+" "+cc)),b.innerHTML="',docElem.appendChild(b),isIE=!!document.getElementById("iecctest"),docElem.removeChild(b),isIE },c_s.sliceHtmlTitle=function(raw,limit){var clean=raw.replace(/<\/?\w*>/g,"").trim();if(!(clean.length>limit))return raw;for(var diff="",j=0,i=0;clean.length>i;i++){var clean_letter=clean[i];if(clean_letter!==raw[j]&&raw[j]==="<"){diff="";while(raw[j]!==">")diff+=raw[j],j+=1;diff+=raw[j],j+=1}if(i===limit){var out=raw.substring(0,j),match=diff.match(/<(\w*)>/);return out+=match?" ...":" ..."}j+=1}},c_s.createSuggestionLi=function(suggestion,position){var li=document.createElement("li"),link=document.createElement("a");if(c_s.config.fluid)var para=document.createElement("div");else var para=document.createElement("p");var limit,img=document.createElement("img"),title=document.createElement("div"),price=document.createElement("div");suggestion.type==="query"||suggestion.type==="historical"?limit=c_s.config.query_title_limit:suggestion.type==="product"&&(limit=c_s.config.title_limit);var clean_title=suggestion.name.replace(/<\/?em>/g,"").trim();return clean_title.length>limit&&(suggestion.name=c_s.sliceHtmlTitle(suggestion.name,limit),li.setAttribute("title",clean_title)),title.innerHTML=suggestion.name,title.setAttribute("class","suggestion-title"),img.setAttribute("class","suggestion-img"),suggestion.type==="query"?(img.src=c_s.query_suggestion_img,c_s.addClass(img,"suggestion-query-img")):(suggestion.type==="product"||suggestion.type==="historical")&&(img.src=suggestion.image),c_s.config.fluid||(para.style.width=c_s.para_width+"px",para.appendChild(title)),c_s.addClass(para,"suggestion-para"),suggestion.price&&(suggestion.formatted_price?price.appendChild(document.createTextNode(suggestion.formatted_price)):price.appendChild(document.createTextNode("R$ "+suggestion.price)),price.setAttribute("class","suggestion-price"),para.appendChild(price)),c_s.config.fluid&¶.appendChild(title),suggestion.type==="historical"||suggestion.type==="query"?c_s.attachEvent(li,"click",function(){c_s.redirectToSearchPage(clean_title,{order:position,type:suggestion.type})}):suggestion.type==="product"&&(link.setAttribute("href",suggestion.url),link.setAttribute("target","_top"),c_s.isIE(8)&&c_s.attachEvent(li,"click",function(){window.location.href=suggestion.url})),c_s.addClass(link,"suggestion-link"),link.appendChild(img),link.appendChild(para),c_s.config.fluid||(li.style.width=c_s.coreWidth+"px"),c_s.suggestionList.children.length===0&&c_s.addClass(li,"first-li"),c_s.attachEvent(li,"mouseover",function(){c_s.clearHoverStyles(),c_s.addClass(li,"hover")}),c_s.attachEvent(li,"mouseout",c_s.clearHoverStyles),c_s.addClass(li,"chaordic-widget-suggestion"),c_s.addClass(li,suggestion.type),li.setAttribute("suggestion_type",suggestion.type),li.setAttribute("clean_title",clean_title),li.appendChild(link),c_s.suggestionList.appendChild(li),li},c_s.createSuggestionLiFromHtml=function(suggestion){var div=document.createElement("div");div.innerHTML=suggestion.html;var li=div.children[0];return c_s.config.fluid||(li.style.width=c_s.coreWidth+"px"),c_s.suggestionList.children.length===0&&c_s.addClass(li,"first-li"),suggestion.type==="product"&&c_s.isIE(8)&&c_s.attachEvent(li,"click",function(){window.location.href=suggestion.url}),c_s.attachEvent(li,"mouseover",function(){c_s.clearHoverStyles(),c_s.addClass(li,"hover")}),c_s.attachEvent(li,"mouseout",c_s.clearHoverStyles),c_s.suggestionList.appendChild(li),li},c_s.showSuggestions=function(){c_s.suggestionList.style.display="block",updateIframeHeight(),c_s.suggestionsVisible=!0},c_s.hideSuggestions=function(){c_s.suggestionList.style.display="none",c_s.config.has_iframe&&(c_s.widgetIframe.style.height=c_s.getStyle(c_s.inputContainer,"height")),c_s.suggestionsVisible=!1},c_s.updateSuggestions=function(suggestions){c_s.suggestionList.innerHTML="";var history=suggestions.history,queries=suggestions.queries,products=suggestions.products;if(c_s.last_query==="")var total_suggestion_limit=c_s.config.no_query_query_suggestion_limit,product_suggestion_limit=c_s.config.no_query_product_suggestion_limit;else var total_suggestion_limit=c_s.config.with_query_query_suggestion_limit,product_suggestion_limit=c_s.config.with_query_product_suggestion_limit;c_s.isMobile&&(product_suggestion_limit=0);var total_suggestion_count=0;if(history)for(var i=0;history.length-1>=i&&c_s.config.historical_suggestion_limit>total_suggestion_count;i++){var historical_query=history[i].query;total_suggestion_count+=1;var historical_item={name:historical_query,type:"historical",image:c_s.history_suggestion_img,url:"",price:""};c_s.createSuggestionLi(historical_item,total_suggestion_count)}if(queries)for(var i=0;queries.length>i&&total_suggestion_limit>total_suggestion_count;i++){total_suggestion_count+=1;var query=queries[i];c_s.createSuggestionLi(query,total_suggestion_count)}var product_suggestion_count=0;if(c_s.config.products_title&&c_s.suggestionList.children.length&&products.length&&product_suggestion_limit>product_suggestion_count){var div=document.createElement("div");div.innerHTML=c_s.config.products_title;var li=div.children[0];li.setAttribute("suggestion_type","products_title"),c_s.suggestionList.appendChild(li)}for(var i=0;products.length>i&&product_suggestion_limit>product_suggestion_count;i++){total_suggestion_count+=1,product_suggestion_count+=1;var product=products[i];c_s.config.html_products?c_s.createSuggestionLiFromHtml(product,total_suggestion_count):c_s.createSuggestionLi(product,total_suggestion_count)}if(c_s.config.chaordic_trademark&&total_suggestion_count+products.length>0){var personalized_by_chaordic=document.createElement("li");c_s.addClass(personalized_by_chaordic,"personalized_by_chaordic"),personalized_by_chaordic.setAttribute("suggestion_type","personalized_by_chaordic");var a=document.createElement("a");a.href="//www.chaordic.com.br/?utm_source=search&utm_campaign=clients&utm_medium="+c_s.config.apikey,a.setAttribute("target","_blank");var img=document.createElement("img");img.src=c_s.personalized_by_chaordic_img,a.appendChild(img),personalized_by_chaordic.appendChild(a),c_s.suggestionList.appendChild(personalized_by_chaordic)}for(var i=0;c_s.suggestionList.children.length>i;i++){var li=c_s.suggestionList.children[i],next_li=c_s.suggestionList.children[i+1],suggestion_type=li.getAttribute("suggestion_type");next_li&&next_li.getAttribute("suggestion_type")===suggestion_type||c_s.addClass(li,"last-"+suggestion_type)}c_s.showSuggestions()};var updateIframeHeight=function(){var children=c_s.suggestionList.children,lastChild=children[children.length-1];if(lastChild){c_s.config.has_iframe&&(c_s.widgetIframe.style.height="100px");var lastTop=c_s.getOffset(lastChild).top,lastHeight=c_s.pixToNum(c_s.getStyle(lastChild,"height")),lastHeight=lastChild.offsetHeight,gap_for_box_shadow=c_s.isIE(8)?0:4;c_s.config.has_iframe&&(c_s.widgetContainer.style.height=lastTop+lastHeight+c_s.li_border*0+gap_for_box_shadow+"px",c_s.widgetIframe.style.height=lastTop+lastHeight+c_s.li_border*0+gap_for_box_shadow+"px")}else c_s.config.has_iframe&&(c_s.widgetContainer.style.height=c_s.getStyle(c_s.inputContainer,"height"),c_s.widgetIframe.style.height=c_s.getStyle(c_s.inputContainer,"height"))};c_s.pixToNum=function(pixels){return Number(pixels.split("px")[0])},c_s.getOffset=function(el){var _x=0,_y=0;while(el&&!isNaN(el.offsetLeft)&&!isNaN(el.offsetTop))_x+=el.offsetLeft-el.scrollLeft,_y+=el.offsetTop-el.scrollTop,el=el.offsetParent;return{top:_y,left:_x}},c_s.onType=function(ev){var key=ev.keyCode?ev.keyCode:ev.charCode||ev.which,keyCodes={enter:13,escape:27,"up arrow":38,"down arrow":40,space:32},is_not_invisible_key=function(key){var invisible_keys={shift:16,ctrl:17,"left window":91,"right window":92,select:93,tab:9,alt:18,pause:19,"caps lock":20,"right arrow":39,"page up":33,"page down":34,end:35,home:36,"left arrow":37,insert:45,"delete":46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,"weird key":229,"num lock":144};for(var k in invisible_keys){var i_key=invisible_keys[k];if(key===i_key)return!1}return!0};key===keyCodes["up arrow"]?c_s.incrementActive(-1,ev):key===keyCodes["down arrow"]?c_s.incrementActive(1,ev):key===keyCodes.escape?(c_s.suggestionList.innerHTML="",updateIframeHeight()):key===keyCodes.enter?(c_s.setIgnorePendingRequests(!0),c_s.suggestionListIndex==-1?(c_s.redirectToSearchPage(),stopPropagation(ev)):c_s.selectSuggestion(c_s.suggestionListIndex)):is_not_invisible_key(key)&&(key!==keyCodes.space&&(c_s.suggestionListIndex=-1,setTimeout(function(){c_s.lastTypedQuery=c_s.inputBox.value},0)),c_s.doSearch())},c_s.setIgnorePendingRequests=function(bool){if(bool){c_s.ignore_pending_requests=!0;for(var i=0;c_s.timeoutIds.length>i;i++){var timeoutId=c_s.timeoutIds[i];clearInterval(timeoutId)}c_s.timeoutIds=[]}else c_s.ignore_pending_requests=!1},c_s.selectSuggestion=function(i){var suggestion=c_s.suggestionList.children[i],suggestion_type=suggestion.getAttribute("suggestion_type");if(suggestion&&suggestion.className.indexOf("product")>-1)window.top.location.href=suggestion.children[0].href;else if(suggestion_type==="historical"||suggestion_type==="query"){var real_world_order=i+1;c_s.redirectToSearchPage(suggestion.getAttribute("clean_title"),{order:real_world_order,type:suggestion_type})}},c_s.clearHoverStyles=function(){for(var i=0;c_s.suggestionList.children.length>i;i++){var item=c_s.suggestionList.children[i];c_s.removeClass(item,"hover")}c_s.suggestionListIndex=-1},c_s.incrementActive=function(inc,e){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var suggestionListChildren=c_s.suggestionList.children,i=0;suggestionListChildren.length>i;i++){var item=suggestionListChildren[i];c_s.removeClass(item,"hover")}if(inc){try{if(suggestionListChildren[suggestionListChildren.length-1].getAttribute("suggestion_type")==="personalized_by_chaordic")var last_child_index=suggestionListChildren.length-2;else var last_child_index=suggestionListChildren.length-1}catch(e){var last_child_index=suggestionListChildren.length-1}var i=c_s.suggestionListIndex;i+=inc,i>-1&&last_child_index>i&&c_s.suggestionList.children[i].getAttribute("suggestion_type")==="products_title"&&(i+=inc),-1>i?i=last_child_index:i>last_child_index&&(i=-1)}if(i===-1)c_s.inputBox.value=c_s.lastTypedQuery;else if(c_s.addClass(suggestionListChildren[i],"hover"),suggestionListChildren[i].className.indexOf("product")>-1)c_s.inputBox.value=c_s.lastTypedQuery;else{var text=suggestionListChildren[i].getAttribute("clean_title");c_s.inputBox.value=text.trim()}c_s.suggestionListIndex=i},c_s.doSearch=function(query){var timeoutId=setTimeout(function(){var index=c_s.timeoutIds.indexOf(timeoutId);if(index!==-1&&(query=encodeURIComponent(query?query.trim():c_s.inputBox.value.trim()),c_s.timeoutIds.splice(index,1),!(c_s.timeoutIds.length||query===c_s.last_query&&c_s.suggestionsVisible))){c_s.suggestionListIndex=-1,c_s.spinner.spin(),c_s.ignore_pending_requests=!1,c_s.request_count+=1;var special_params="&fp=";special_params+=c_s.config.big_images?"&bi=":"",special_params+=c_s.config.html_products?"&hp=":"",c_s.jsonp("//"+c_s.base_url_host+"/autocomplete?search_id="+c_s.search_id+special_params+"&count="+c_s.request_count+"&q="+query+"&apikey="+c_s.config.apikey,"afterAutocomplete"),c_s.last_query=query}},c_s.config.typing_delay);c_s.timeoutIds.push(timeoutId)},c_s.afterAutocomplete=function(res){c_s.ignore_pending_requests||isEmpty(res)||c_s.updateSuggestions(res),c_s.spinner.stop()},c_s.jsonp=function(url,fnName){var script=document.createElement("script");url+=url.indexOf("?")!=-1?"&":"?",script.src=url+"callback=c_s."+fnName,document.body.appendChild(script)},c_s.xhr=function(url,callback){var oReq;oReq=function(m){return m&&m[1]}(navigator.userAgent.match(/MSIE\s([^;]*)/))?new XDomainRequest:new XMLHttpRequest,oReq.onload=callback,oReq.open("get",url,!0),oReq.send()},c_s.getStyle=function(oElm,css3Prop){var strValue="";if(window.getComputedStyle)strValue=getComputedStyle(oElm).getPropertyValue(css3Prop);else if(oElm.currentStyle)try{strValue=oElm.currentStyle[css3Prop]}catch(e){}return strValue},c_s.addClass=function(el,class_name){for(var output="",i=0;el.className.split(" ").length>i;i++){var str=el.className.split(" ")[i];str&&str!==" "&&(output+=str+" ")}return el.className=output,el.className+=class_name,el.className},c_s.removeClass=function(el,class_name){for(var output="",i=0;el.className.split(" ").length>i;i++){var str=el.className.split(" ")[i];str&&str!==" "&&str!=class_name&&(output+=str+" ")}return el.className=output,el.className},c_s.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=="x"?r:r&3|8;return v.toString(16)})},c_s.pre_widget_inject_page_js=function(){},c_s.inject_page_js=function(){},c_s.pre_widget_inject_page_js(),c_s.initWidget(),c_s.inject_search_page()},c_s.cs_setWidget=function(host,no_reload){var cookieDomain=c_s.config.client_url_host||location.hostname;host?document.cookie="cs_widget_host="+host+"; domain="+cookieDomain+"; path=/":(document.cookie="cs_widget_host=; domain="+cookieDomain+"; path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="cs_widget_host=; domain="+cookieDomain+";expires=Thu, 01 Jan 1970 00:00:00 GMT"),no_reload||location.reload()};var trim=function(text){return text&&text.replace(/^\s+|\s+$/g,"")},getCookie=function(cname){for(var name=cname+"=",split=document.cookie.split(";"),i=0;split.length>i;i++){var c=trim(split[i]);if(c.indexOf(name)===0)return c.substring(name.length,c.length)}return null},hashCode=function(str){var hash=0;if(!str||!str.length)return hash;for(i=0;str.length>i;i++){var char=str.charCodeAt(i);hash=(hash<<5)-hash+char,hash&=hash}return hash};c_s.partialProduction=function(){if(c_s.config.partial_production&&c_s.config.partial_production>0){var browserid=getCookie("chaordic_browserId");if(browserid&&c_s.config.partial_production>Math.abs(hashCode(browserid)%100))return!0}return!1},c_s.decideInit=function(){if(location.hostname.indexOf(".chaordicsearch.com")>-1&&0>location.hostname.indexOf("server.chaordicsearch.com")){var script,scripts=document.getElementsByTagName("script"),i=scripts.length-1,script_src="//"+location.hostname+"/static/generated/"+c_s.config.apikey+"/loader.js",script_found=!1;while(i>-1){if(script=scripts[i],script.src.indexOf(script_src)>-1){script_found=!0;break}i-=1}if(script_found)c_s.static_url_host=c_s.base_url_host=location.hostname,c_s.__init();else{window.c_s=void 0;var s=document.createElement("script");s.src=script_src,document.getElementsByTagName("head")[0].appendChild(s)}}else{var cookieHost;if(document.URL.indexOf("searchHomolog")>-1?(c_s.cs_setWidget(c_s.config.base_url_host,!0),cookieHost=c_s.config.base_url_host):cookieHost=getCookie("cs_widget_host"),cookieHost&&!document.querySelector("#chaordic_search_homologation")){var overlay=document.createElement("div");overlay.style.position="fixed",overlay.style.bottom="0px",overlay.style.background="rgba(218, 71, 71, 1)",overlay.style.padding="14px 0",overlay.style.zIndex="99999999",overlay.style.fontSize="16px",overlay.style.width="100%",overlay.style.color="#FFFFFF",overlay.style.textAlign="center",overlay.style.textShadow="1px 1px rgba(0, 0, 0, 0.3)",overlay.id="chaordic_search_homologation",overlay.innerHTML="Chaordic Search em homologação para: "+cookieHost+" ("+c_s.config.apikey+') desligar homologação',setTimeout(function(){document.getElementsByTagName("body")[0].appendChild(overlay)},500),c_s.base_url_host=cookieHost,c_s.static_url_host="static.chaordicsystems.com",c_s.__init()}else(c_s.config.widget_in_production||c_s.partialProduction())&&(c_s.base_url_host=c_s.config.base_url_host,c_s.static_url_host="static.chaordicsystems.com",c_s.__init())}},c_s.decideInit()};