if(window.global_debug===undefined){window.global_debug=false}if(window.data===undefined){window.data={}}if(window.constants===undefined){window.constants={}}void 0===window.PJ&&(window.PJ={}),void 0===window.PJ.gettext&&(window.PJ.gettext={}),void 0===window.PJ.gettext.translations&&(window.PJ.gettext.translations={}),window.PJ.gettext.translations.handlebars={domain:"messages",locale_data:{messages:{"":{domain:"messages",plural_forms:"nplurals=2; plural=n != 1;",lang:"en_NZ"},"login.username":[null,"Username"],"login.password":[null,"Password"],"login.password.forgot":[null,"Forgot?"],"common.login":[null,"Log in"],"login.remembered_password":[null,"Did you remember your password after all?"],"login.password_recovery.header":[null,"Forgot your password?"],"login.password_recovery.description":[null,"Please enter your username or email address and we will send a reset link."],"common.or":[null,"or"],"common.email":[null,"Email"],"login.password_recovery.send":[null,"Send password reset link"],"login.error.wrong_market":[null,"The account is registered on our sister site in %(country)s"],"login.verification_email.send":[null,"Send verification email"],"login.account_information.header":[null,"Why log in?"],"login.account_information.description":[null,"Members can monitor price changes, create product lists, submit reviews for products and shops, and much more."],"login.registration.step_2":[null,"Step 2 of 2"],"login.account.create":[null,"Create new account"],"common.email_address":[null,"Email address"],"login.registration.newsletter":[null,"I want to receive the PriceSpy Newsletter for updates and information"],"login.registration.terms_and_conditions":[null,'I\'ve read and agree to Pricespy\'s Rules and guidelines and Privacy policy'],"common.create_account":[null,"Create account"],"updated_terms.title":[null,"Updated Terms & Conditions at PriceSpy"],"updated_terms.description":[null,"We updated our Terms & Conditions %(date)s."],"updated_terms.read_terms":[null,"Read our new Terms & Conditions here"],"common.ok":[null,"OK"],"login.or_with_email":[null,"Or use your PriceSpy account"],"login.registration.step_1":[null,"Step 1 of 2"],"login.or_with":[null,"or with"],"login.registration.info.description":[null,'When registering for membership you accept PriceSpy\'s Privacy Policy and Rules & Guidelines. You also agree to receive our newsletter* which will be sent to your registered e-mail address.
\n\n* The newsletter may contain adverts from other companies. You can terminate the subscription at any time.'],"login.recovery.your_activation_code":[null,"Your activation code"],"login.recovery.your_activation_code.description":[null,"Write the code that was sent in the email"],"login.verify.header":[null,"Verification code"],"login.recovery.choose_new_password.for":[null,"Choose a new password for %(username)s"],"login.recovery.choose_new_password.description":[null,"Choose a password with both numbers and letters"],"login.recovery.choose_new_password":[null,"Choose a new password"],"common.username":[null,"Username"],"login.password.new":[null,"New password"]}}};
void 0===window.PJ&&(window.PJ={}),void 0===window.PJ.gettext&&(window.PJ.gettext={}),void 0===window.PJ.gettext.translations&&(window.PJ.gettext.translations={}),window.PJ.gettext.translations.mustache={domain:"messages",locale_data:{messages:{"":{domain:"messages",plural_forms:"nplurals=2; plural=n != 1;",lang:"en_NZ"},"wrapper.search.show_more_results":[null,"Show more results"],"common.feedback.give_us":[null,"Provide feedback or report errors"],"common.feedback":[null,"Feedback"],"common.close":[null,"Close"],"wrapper.raw.search":[null,"Advanced search"],"common.product":["common.product","product","products"],"common.category.not_available":[null,"The category is not available"],"common.price.alternative.from":[null,"Alternative prices from"],"common.brand":["common.brand","Brand","Brands"],"common.price.from":[null,"from"],"search.super.raw.only":[null,"Only prices from PriceSpy Raw"],"common.no_prices":[null,"No prices"]}}};
void 0===window.PJ&&(window.PJ={}),void 0===window.PJ.gettext&&(window.PJ.gettext={}),void 0===window.PJ.gettext.translations&&(window.PJ.gettext.translations={}),window.PJ.gettext.translations.global_foot={domain:"messages",locale_data:{messages:{"":{domain:"messages",plural_forms:"nplurals=2; plural=n != 1;",lang:"en_NZ"},"common.error.connection":[null,"Lost connection. Please try again."],"common.error.json":[null,"Something went wrong (JSON error). Please contact us, and we will try to solve the problem."],"common.error.server":[null,"An error occurred on the server. Please contact us, and we will try to solve the problem."],"common.error.try_again":[null,"An error occured, please try again"],"product.select_by_checking":[null,"Select products by clicking the checkboxes before each product"],"product.compare.error.none_available":[null,"No products available, cannot compare"],"common.feedback.give_us":[null,"Provide feedback or report errors"],"common.report.error.type.missing":[null,"You have not selected what kind of error this report relates to"],"common.report.reason.missing":[null,"Missing reason for report."],"common.loading":[null,"Loading ..."],"common.report.submitted":[null,"Thank you for your feedback!"],"common.error_occurred":[null,"An error occurred"],"common.submit":[null,"Submit"],"list.error.add.id.missing":[null,"Don't know what to add, cancelling!"],"common.product.ucfirst":["common.product.ucfirst","Product","Products"],"search.category":[null,"Categories"],"search.store.and_brand":[null,"Shops and Brands"],"common.forum.posts.ucfirst":["common.forum.posts.ucfirst","Post","Posts"],"search.users":[null,"Users"],"search.admin_only":[null,"(only for admins)"],"search.continue_typing_to_narrow_search":[null,"Continue typing to narrow your search."],"search.in_progress":[null,"Search in progress"],"search.finished":[null,"Search finished"],"search.no_results":[null,"No results found. Please edit your search phrase."],"store.credit_note.no_indexable_products":[null,"No indexable products"],"store.credit_note.does_not_fulfill_requirements":[null,"Does not fulfill PriceSpy's requirements for listing"],"login.welcome.header":[null,"Welcome back"],"login.password_recovery.email_sent":[null,"A password reset link has been sent to the email address you stated when you registered with us"],"login.password.description":[null,'The password must contain at least 8 characters and cannot begin or end with "space"'],"category.filter.status.no_matches":[null,"No matching products"],"category.filter":[null,"Filter"],"common.of_total":[null,"of %(total)d"],"category.filter.none_chosen":[null,"No filters selected"],"category.products.showing_all_products":[null,"Showing all %(number)s"],"my_page.preference.status":[null,"Status"],"analytics.status.agent.running":[null,"Ongoing price reading"],"analytics.status.agent.waiting":[null,"Waiting"],"analytics.status.agent.ok":[null,"Price reading successful."],"analytics.dashboard.agent_is_prioritized":[null,"Your shop was prioritized at %(time)s, prices will be fetched as soon as possible."]}}};
var url=window.location.href,hashpos=url.indexOf("#"),hash=-1==hashpos?"":url.substr(hashpos+1);if("rparams="==hash.substr(0,8)){var s_rparams=hash.substr(8),rparams=qstring2obj(s_rparams);for(var param in rparams)"function"!=typeof rparams[param]&&(handle_rparam(param,rparams[param])||delete rparams[param]);if(obj2qstring(rparams)){var qstring=window.location.search.substr(1),qparams=qstring2obj(qstring);(0"),this.WAIT_TIME=400);var e=this;$(window).unload(function(){e.firstLoad=null}),this.isInternetExplorer()&&(this.iframe=document.getElementById("DhtmlHistoryFrame"))},getIFrameHash:function(){var t=document.getElementById("DhtmlHistoryFrame").contentWindow.document,e=new String(t.location.search);return 1==e.length&&"?"==e.charAt(0)?e="":2<=e.length&&"?"==e.charAt(0)&&(e=e.substring(1)),e},removeHash:function(t){return null==t||null==t?null:""==t?"":1==t.length&&"#"==t.charAt(0)?"":1'),s=$("#"+e))}var o={source:function(t,e){var s={mode:r,search:t.term};$.get("/ajax/jsonajaxserver.php?m=combobox_handler&format=jquery&p="+encodeURIComponent(JSON.stringify(s)),{},function(t){e(t)})},select:function(t,e){s&&s.val(e.item.id),i.data("id",e.item.id),n&&n(e.item)},change:function(t,e){e.item||(i.data("id",""),s&&s.val(""))},minLength:2};t&&(o=$.extend(o,t)),$(this).autocomplete(o).data("uiAutocomplete")._renderItem=function(t,e){var s=$("").data("item.autocomplete",e),r="";return e.extra_info&&(r=' - '+e.extra_info+""),s.append(""+e.label+r+""),s.appendTo(t),s}});var json_ajax_client=new JSONAJAXClient;function json_ajax_call(t,e,s,r){json_ajax_client.call_server(t,e,s,r)}var _delayed_calls={};function delayed_ajax_call(t,e,s,r,n){clear_delayed_call(t),_delayed_calls[t]={method:t,params:e,fnCallback:s,options:n},_delayed_calls[t].timeout_id=window.setTimeout('_do_delayed_ajax_call("'+t+'")',r)}function clear_delayed_call(t){_delayed_calls[t]&&_delayed_calls[t].timeout_id&&window.clearTimeout(_delayed_calls[t].timeout_id),_delayed_calls[t]={}}function abort_ajax_call(){json_ajax_client.abort()}function _do_delayed_ajax_call(t){var e=_delayed_calls[t];e?json_ajax_client.call_server(e.method,e.params,e.fnCallback,e.options):json_ajax_client.debug&&dbg("VARNING: _do_delayed_ajax_call: _delayed_calls["+t+"] saknas.")}function exec_js_in_html(html){if(!is_IE)return html;var pattern="(?:)([^\xa4]*?)(?:<\/script>)",re=new RegExp(pattern,"img"),html2=html.replace(re,""),scripts=html.match(re);return scripts&&(re=new RegExp(pattern,"im"),setTimeout(function(){for(var i=0;iexec_js_in_htmlmessage:"+JSON.stringify(t)+"")}},200)),html2}function XHConnHandler(){this.threads=[],this.maxthreads=20,this.debug=!1}JSONAJAXClient.prototype.call_server=function(method,params,fnCallback,options){options=options||{},options.debug&&(this.debug=!0),this._xhconnhandler||(this._xhconnhandler=new XHConnHandler,this._xhconnhandler.debug=this.debug);var _this=this,_fnIntCallback=function(raw_response,status){switch(status){case"OK":var rstartpos=raw_response.indexOf("\x3c!-- START JSON OUTPUT:")+24,rendpos=raw_response.indexOf("END JSON OUTPUT --\x3e",rstartpos);if(-1!=rstartpos&&-1!=rendpos){var json_response=raw_response.substr(rstartpos,rendpos-rstartpos),debug_output=raw_response.substr(0,rstartpos-24),response;try{eval("response = "+json_response+";")}catch(t){_this.debug&&dbg("Eval-exception
message:"+JSON.stringify(t)+"")}if(response){if(options.checktime){var tkey=method+"_"+vars.p;if(tkey=tkey.substr(0,35),_this._timestamps[tkey]&&!(response.timestamp>_this._timestamps[tkey]))return dbg("Sl\xe4nger gammalt resultat! Nyckel:["+tkey+"]"),void fnCallback(null,"OLD_RESULT");_this._timestamps[tkey]=parseInt(response.timestamp)}_this.debug,response.result.error?(user_msg(response.result.error,"error"),fnCallback(response.result,"METHOD_ERROR")):fnCallback(response.result,"OK")}else _this.debug&&dbg("JSON-avkodningsfel
Utdata fr\xe5n servern: "),options.show_error_msg&&user_msg(PJ.jed.gettext("common.error.json"),"error"),fnCallback(null,"RUNTIME_ERROR")}else _this.debug&&dbg("AJAX-k\xf6rfel
Utdata fr\xe5n servern: "+raw_response),options.show_error_msg&&user_msg(PJ.jed.gettext("common.error.server"),"error"),fnCallback(null,"RUNTIME_ERROR");break;case"STREAM_END":fnCallback(null,status);break;default:_this.debug&&dbg("AJAX-fel: "+status+"
Utdata fr\xe5n servern: "+raw_response),options.show_error_msg&&user_msg(PJ.jed.gettext("common.error.connection"),"error"),fnCallback(null,status)}},d=new Date,vars={};vars.m=method,vars.p=JSON.stringify(params),vars.t=d.getTime(),options.stream&&(vars.s="1");var qstring=obj2qstring(vars);options.timeout||(options.timeout=this.timeout),options.attempts||(options.attempts=1);var getpost=900AJAX-fel: Kunde inte skapa en uppkoppling")},JSONAJAXClient.prototype.abort=function(){this._xhconnhandler&&this._xhconnhandler.abort()},XHConnHandler.prototype.connect=function(t,e,s,r,n,i,o){for(var a,h=0;h=this.maxthreads)return dbg("Maximalt antal uppkopplingar \xf6verskridet"),!1;a=new XHConn(this.debug,o),this.threads.push(a)}return a?(a.timeout=n,a.attempts=i,a.connect(t,e,s,r)):(dbg("XHConnHandler: Failed to create XHConn"),!1)},XHConnHandler.prototype.abort=function(){for(var t=0;t');window.frames&&window.frames[r]&&(this.iframe=window.frames[r]),this.iframe.id=r}}XHConn.prototype.toString=function(){return"_XHConns["+this._id+"]"},XHConn.prototype.connect=function(t,e,s,r){if(this.complete=!1,t&&(this.url=t),e&&(this.httpMethod=e.toUpperCase()),s&&(this.qstring=s),r&&(this._fnCallback=r),this.qstring+="&id="+this._id,this.xmlhttp){this.debug&&dbg("AJAX-anrop, URL: "+this.url+"?"+this.qstring);try{"GET"==this.httpMethod?this.xmlhttp.open(this.httpMethod,this.url+"?"+this.qstring,!0):(this.xmlhttp.open(this.httpMethod,this.url,!0),this.xmlhttp.setRequestHeader("Method","POST "+this.url+" HTTP/1.1"),this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"))}catch(t){return dbg("exception (xmlhttp.open)
message:"+JSON.stringify(t)+""),!1}var n=this;this.xmlhttp.onreadystatechange=function(){if(2==n.xmlhttp.readyState||3==n.xmlhttp.readyState)n._timeoutid&&(clearTimeout(n._timeoutid),n._timeoutid=0);else if(4==n.xmlhttp.readyState&&!n.complete){n.complete=!0,n._timeoutid&&(clearTimeout(n._timeoutid),n._timeoutid=0);try{n.xmlhttp.status}catch(t){return dbg("xmlhttp-anrop blockerades
"+JSON.stringify(t)),void n._fnCallback("","CONNECTION_ERROR")}200==n.xmlhttp.status?n._fnCallback(n.xmlhttp.responseText,"OK"):(dbg("serverfel:
"+n.xmlhttp.statusText+" ("+n.xmlhttp.status+")"),n._fnCallback(n.xmlhttp.responseText,"CONNECTION_ERROR"))}},this._timeoutid=window.setTimeout(this.toString()+"._server_timeout()",this.timeout),this.xmlhttp.send(this.qstring)}else if(this.iframe){this._timeoutid=window.setTimeout(this.toString()+"._server_timeout()",this.timeout);try{if("GET"!=this.httpMethod)return dbg("POST not allowed for iframes
"),!1;this.iframe.document.location.href=this.url+"?"+this.qstring}catch(t){return dbg("exception (location.href)
message:"+JSON.stringify(t)+""),!1}this.debug&&dbg("AJAX-anrop (iframe), URL: "+this.url+"?"+this.qstring)}return!0},XHConn.prototype.iframe_response=function(t,e){"stream_connection_notify"!=e&&"json_stream_response"!=e&&"json_response"!=e||this._timeoutid&&(clearTimeout(this._timeoutid),this._timeoutid=0),"json_stream_end"!=e&&"json_response"!=e||(this.complete=!0),"json_stream_response"!=e&&"json_response"!=e||this._fnCallback(t,"OK"),"json_stream_end"==e&&this._fnCallback("","STREAM_END")};var json_response=function(t,e){_XHConns[t].iframe_response(e,"json_response")},json_stream_response=function(t,e){_XHConns[t].iframe_response(e,"json_stream_response")},json_stream_connection_notify=function(t){_XHConns[t].iframe_response("","json_stream_connection_notify")},json_stream_end=function(t){_XHConns[t].iframe_response("","json_stream_end")};XHConn.prototype._server_timeout=function(){this.xmlhttp?this.xmlhttp.abort():this.iframe&&this.iframe.stop(),this.attempts--,0URL: "+this.url+"?"+this.qstring),window.setTimeout(this.toString()+".connect()",500)):(this.complete=!0,this._timeoutid=0,this.debug&&dbg("server-timeout
URL: "+this.url+"?"+this.qstring),this._fnCallback?this._fnCallback("","TIMEOUT"):user_msg(PJ.jed.gettext("common.error.connection"),"error"))};
function pu_prod(o,e,t,_){ajaxpopup_show(o,{mode:t?"produkt_utan_bild":"produkt",produkt_id:e})}function pu_ftg_info(o,e){ajaxpopup_show(o,{mode:"ftg_info",ftgid:e})}function pu_ftg_recommended(o,e,t){ajaxpopup_show(o,{mode:"ftg_recommended",ftgid:e,tillv_id:t},170)}function pu_hide(){ajaxpopup_hide()}function love_hate(o,e,t,_,i){o?_love_hate(o,e,t,_,i):(window.prisjakt_login_callback=function(o){_love_hate(o,e,t,_,i),setTimeout("window.location.reload()",1e3)},open_login({msg:"require_login"}))}function _love_hate(o,_,i,e,a){var t={};t.user_id=o,t.type=_,t.id=i,t.what=e,_&&i&&e?json_ajax_call("love_hate",t,function(o,e){if("OK"==e&&void 0===a){var t=$("#love_hate_"+_+"_"+i);0").addClass("commandbox prodsel-floater").html($(".actions-for-selected").first().clone().css("opacity",1)).append('');_.before(l),$("#actions-for-selected-admin").length&&l.before($("#actions-for-selected-admin").first().clone().attr("id","actions-admin-clone").css("opacity",1).addClass("prodsel-floater")),_.addClass("prod-selected")}}}}function tgp(e,t){return toggle_sel("prod",e,t)}function tgp_all(e){var t=$(e).find(".icon");if($(t).hasClass("checked"))$(t).addClass("empty"),$(t).removeClass("checked"),$("span[id^='prod_sel'] .icon").each(function(){$(this).addClass("empty"),$(this).removeClass("checked")}),prod_ids_selected={};else{$(t).addClass("checked"),$(t).removeClass("empty");var r=0;$("span[id^='prod_sel'] .icon").each(function(){$(this).hasClass("empty")&&($(this).addClass("checked"),$(this).removeClass("empty"),r=this.id.replace("prod_sel_",""),prod_ids_selected[r]=r)})}(!$(".actions-for-selected").is(":visible")&&0';$submit_button.prop("disabled",!0),$submit_button.html(t+" "+PJ.jed.gettext("common.loading"));json_ajax_call("error_report_add",e,function(e,t,r,s){if(e){e.html;user_msg(PJ.jed.gettext("common.report.submitted")),$("#dialog").dialog("destroy").remove()}else user_msg(PJ.jed.gettext("common.error_occurred"),"error"),$submit_button.prop("disabled",!1),$submit_button.html(PJ.jed.gettext("common.submit"))},{timeout:3e4})}else user_msg(PJ.jed.gettext("common.report.reason.missing"),"error")}else user_msg(PJ.jed.gettext("common.report.error.type.missing"),"error")}
function hide_infobox(i){var o=$("#infobox_"+i);o.animate({height:0},"medium",function(){o.hide(),o.remove()});var e=getCookie("hide_infobox"),n=(e=e||"").split("|");arr_insertUnique(n,i),e=n.join("|"),setCookie("hide_infobox",e,2e3,"/",constants.COOKIE_DOMAIN)}
function produktlista_invert_selection(){if(void 0!==window.prod_ids&&prod_ids.length)for(var e=0;e '+n.jed.gettext("search.in_progress")).show(),a.removeClass("error"),c[r]=u.ajax({url:e,data:"",dataType:"json",success:function(e){if(c[r]=null,e.error)return v("Error from server: "+e.message),void a.addClass("error");a.removeClass("error"),u("#"+t.content_container).html(function(e,t,r){var s,o,a,n,i;if(i="box_table",o=h.modes[e].modes,a=!0,n=!1,u.each(o,function(e){t.message[o[e]]&&(t.message[o[e]].more_hits_available&&(n=!0),0'+n.jed.gettext("search.finished")),p&&!g?u("#ss_keep_typing").html(n.jed.gettext("search.no_results")):g||u("#ss_keep_typing").html(n.jed.gettext("search.continue_typing_to_narrow_search")),d.functions.module_active("supersearch.keyboard_navigation")&&(document.activeElement===document.body&&i.focus(),i.keydown(function(e){if(e.which===u.ui.keyCode.DOWN){e.preventDefault();var t={};return t[u.ui.keyCode.ENTER]=function(e){window.location.href=e.find("a").first().attr("href")},t[u.ui.keyCode.TAB]="deactivate",t[u.ui.keyCode.ESCAPE]="deactivate",u("tr, ul li","#search_results").keynavigator({activeClass:"selected",keys:t,onWrappedTop:function(e,t){u("#super_search_textbox").focus(),t.deactivate()},onAfterDeactive:function(){i.focus()}}),u("tr","#search_results").first().click(),!1}})))}})}(e,t,r)},s)}}function a(){var e=i.val().trim();if(e.length<2)return m=null,s(),y(),!1;if(e!==m)for(var t in m=e,void 0!==n.tracking&&(n.tracking.google_analytics.fields.set("dimension4","yes"),n.tracking.facebook_pixel.events.log_event("Search")),p=!0,u("#party").hide(),u("#"+h.large_search_container_id).length&&(u("#super_search_textbox").removeClass("super_search_textbox_big"),u("#supersearch_large").addClass("supersearch_large_hide")),u("#"+h.results_container_id).show(),u("#ss_keep_typing").html(n.jed.gettext("search.continue_typing_to_narrow_search")),u.doTimeout("supersearch",1e3,function(){d.functions.set_ajax_state_params({ss:i.val()})}),h.modes)h.modes.hasOwnProperty(t)&&"string"==typeof t&&(r[t]&&clearTimeout(r[t]),r[t]=o(t,h.modes[t],e,50)())}function v(e){g=!0,y(),f(e),u("#ss_keep_typing").html(n.jed.gettext("common.error.try_again")),u("#ss_status").hide(),u(".infobox.infotext","#search_results").addClass("error")}function y(){for(var e in h.modes)h.modes.hasOwnProperty(e)&&"string"==typeof e&&u("#"+h.modes[e].content_container).html("")}function x(e){var t={raw:w,product:j,forum_topic:k,brand_category:A,store:C,brand:S,flight:P,user:q};return t.hasOwnProperty(e)?t[e]:function(){f("No row renderer found for '"+e+"'")}}function b(e,t){var r={translate:function(){return E},currency:function(){return function(e,t){return d.functions.currency(t(e))}},image_server:d.variables.product_image_server,static_server:d.variables.static_server,search_url:d.variables.search_url,raw_search_url:d.variables.raw_search_url,tusen:function(){return function(e,t){return d.functions.tusen(t(e))}},country:d.variables.country};return u.extend(r,t),Mustache.render(e,r)}function w(e){return b(l["search/super/rows/raw.mustache"],{item:e})}function j(e){var t,r;return b(l["search/super/rows/product.mustache"],{item:function(e){e.not_available=e.price.regular<=0&&e.price.alternative<=0,e.has_cheaper_alternative_price=0