var JSON=JSON||{};if(!JSON.parse){JSON.parse=function(jsonString){jsonString=jsonString.replace(/[\n\r]/g,"");return eval('('+jsonString+')');};}
jx={getHTTPObject:function(){var http=false;if(typeof ActiveXObject!='undefined'){try{http=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}
catch(E){http=false;}}}else if(window.XMLHttpRequest){try{http=new XMLHttpRequest();}
catch(e){http=false;}}
return http;},load:function(url,callback,format){var http=this.init();if(!http||!url)return;if(!format)var format="text";format=format.toLowerCase();if(http.overrideMimeType){if(format.charAt(0)=="j"){http.overrideMimeType('application/json');}else{http.overrideMimeType('text/xml');}}
var now="uid="+new Date().getTime();url+=(url.indexOf("?")+1)?"&":"?";url+=now;http.open("GET",url,true);http.onreadystatechange=function(){if(http.readyState==4){if(http.status==200){var result="";if(http.responseText)result=http.responseText;if(format.charAt(0)=="j"){result=JSON.parse(result);}
if(callback)callback(result);}else{if(error)error(http.status);}}}
http.send(null);},init:function(){return this.getHTTPObject();}}
function error(){}
function addEvent(element,type,handler){if(element.addEventListener){element.addEventListener(type,handler,false);}else{if(!handler.$$guid)handler.$$guid=addEvent.guid++;if(!element.events)element.events={};var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type];}}
handlers[handler.$$guid]=handler;element["on"+type]=handleEvent;}};addEvent.guid=1;function removeEvent(element,type,handler){if(element.removeEventListener){element.removeEventListener(type,handler,false);}else{if(element.events&&element.events[type]){delete element.events[type][handler.$$guid];}}};function handleEvent(event){var returnValue=true;event=event||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);if(event.target.nodeType==3){event.target=event.target.parentNode;}
var handlers=this.events[event.type];for(var i in handlers){this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false;}}
return returnValue;};function fixEvent(event){event.preventDefault=fixEvent.preventDefault;event.stopPropagation=fixEvent.stopPropagation;event.target=event.target||event.srcElement;return event;};fixEvent.preventDefault=function(){this.returnValue=false;};fixEvent.stopPropagation=function(){this.cancelBubble=true;};var onready_handlers={};var onread_count=0;function onReady(handler){onready_handlers[onread_count++]=handler;}
function init(){if(arguments.callee.done)return;arguments.callee.done=true;for(var i in onready_handlers){onready_handlers[i]();}}
if(document.addEventListener){document.addEventListener('DOMContentLoaded',init,false);}
(function(){/*@cc_on
if(document.body){try{document.createElement('div').doScroll('left');
return init();} catch(e) {}}
/*@if (false) @*/if(/loaded|complete/.test(document.readyState))return init();/*@end @*/if(!init.done)setTimeout(arguments.callee,50);})();_prevOnload=window.onload;window.onload=function(){if(typeof _prevOnload==='function')_prevOnload();init();};function $s(id){var elem=document.getElementById(id);if(elem){if(elem.id!=id){for(var i=1;i<document.all[id].length;i++){if(document.all[id][i].id==id){return document.all[id][i];}}}}
return elem;};function $c(tag){return document.createElement(tag);}
url_encode=encodeURIComponent||escape;function lightbox(content){var l=$c('div');l.id='light';var c=$c('div');c.className='content';var close=$c('span');close.title="Click to close";addEvent(close,'click',function(e){e.preventDefault();document.body.removeChild(l);});close.innerHTML=content+'<a class="close" href="#">Close window</a>';c.appendChild(close);l.appendChild(c);document.body.insertBefore(l,document.body.firstChild);/*@cc_on
 var i=$c('iframe');i.id='back';i.style.height=$s('content').offsetHeight*1.1;
l.insertBefore(i,c);i.frameborder="0";i.doc=i.contentWindow.document;i.doc.open();
i.doc.close();i.doc.body.style.backgroundColor="#000";
/*@if (false) @*/var b=$c('span');b.id='back';l.insertBefore(b,c);/*@end @*/document.body.scrollTop=0;}
(function(){if(!window.jQuery)
return;window.Rating={};window.Rating.JSON_TARGET="/json_processor.php";window.Rating.controlOver=function(){var note=$(this).parents("TABLE:first").find(".product_rating_note:first");note.data("message",note.html());note.html("Click to rate");};window.Rating.controlOut=function(){var note=$(this).parents("TABLE:first").find(".product_rating_note:first");if(note.find("IMG").size()>0)
return;var oldMessage=note.data("message")||"";note.html(oldMessage);}
window.Rating.controlStarClick=function(){var ratingToSet=$(this).parent().index()+1;var control=$(this).parents("TABLE:first").find(".rating:first");var note=$(this).parents("TABLE:first").find(".product_rating_note:first");var prompt=$(this).parents("TABLE:first").find(".product_rating_prompt:first");var callback=function(data){if(data.error||!data.rating){note.html(data.error);}else{note.html("You've rated this "+data.rating+" out of 5 stars.");note.data("message",note.html());if(data.avg_rating){var avg=parseInt(data.avg_rating);control.removeClass("worst bad fair good best");switch(avg){case 5:control.addClass("best");break;case 4:control.addClass("good");break;case 3:control.addClass("fair");break;case 2:control.addClass("bad");break;case 1:control.addClass("worst");break;}}}};var target=Rating.JSON_TARGET+"?cmd=json_rate_product"
+"&rating="+ratingToSet
+"&id="+control.attr("barcode");$.ajax({type:"POST",url:target,dataType:"json",success:callback,complete:function(){if(note.find("IMG").size())note.html("");}});note.html("<img src=\"http://assets.fishpond.co.nz/progress.gif\" border=\"0\" alt=\"Please wait...\" title=\"Please wait...\" />");}})();(function(){var acMinWidth=3;var acDelay=300;var acNumRows=10;var acCache=[];$(document).ready(function(){$('input#keywords').autocomplete({source:function(request,response){var cat=url_encode($('#cPath').val());if(cat==''){cat='all';}
var text=url_encode(request.term);var cachekey=cat+'_'+text;if(acCache[cachekey]){response(acCache[cachekey]);}else{$.ajax({url:'/ac/'+cat+'/'+text+'?row='+acNumRows,dataType:'json',success:function(data){var keywords=new Array();var docs=data.response.docs;for(i in docs){keywords.push(docs[i].p);}
acCache[cachekey]=keywords;response(keywords);}});}},select:function(event,ui){$(event.target).val(ui.item.value);$('#advanced_search').submit();},minLength:acMinWidth,delay:acDelay});});})();jQuery(document).ready(function($){if(jQuery('a.liveperson').length){var lpMTagConfig={'lpServer':"server.iad.liveperson.net",'lpNumber':"69206002",'lpProtocol':"https"};function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}
if(src.indexOf('http')!=0)
{src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);}
if(window.attachEvent)window.attachEvent('onload',lpAddMonitorTag);else window.addEventListener("load",lpAddMonitorTag,false);jQuery('a.liveperson').click(function(){_gaq.push(['_setCustomVar',3,'Used_LivePerson_Chat','Yes',2]);_gaq.push(['_trackEvent','LivePerson','Used Chat']);lpButtonCTTUrl='https://server.iad.liveperson.net/hc/69206002/?cmd=file&file=visitorWantsToChat&site=69206002&imageUrl=https://server.iad.liveperson.net/hcp/Gallery/ChatButton-Gallery/English/Retail/3a&referrer='+escape(document.location);lpButtonCTTUrl=(typeof(lpAppendVisitorCookies)!='undefined'?lpAppendVisitorCookies(lpButtonCTTUrl):lpButtonCTTUrl);lpButtonCTTUrl=((typeof(lpMTag)!='undefined'&&typeof(lpMTag.addFirstPartyCookies)!='undefined')?lpMTag.addFirstPartyCookies(lpButtonCTTUrl):lpButtonCTTUrl);window.open(lpButtonCTTUrl,'chat69206002','width=475,height=400,resizable=yes');});}});(function(){if(typeof(uservoiceOptions)!=='undefined'){function async_uservoice_load(){var s=document.createElement('script');s.setAttribute('id','userVoiceScript');s.setAttribute('type','text/javascript');s.setAttribute('async','true');s.setAttribute('src',("https:"==document.location.protocol?"https://":"http://")
+"cdn.uservoice.com/javascripts/widgets/tab.js");document.getElementsByTagName('head')[0].appendChild(s);if(typeof(customerHasFishpondAddress)!=='undefined'&&customerHasFishpondAddress){$('#userVoiceScript').load(function(){var tab=$('#uservoice-feedback-tab');tab.attr('href',tab.attr('href')+'/access/denied');});}}
if(window.attachEvent){window.attachEvent('onload',async_uservoice_load);}else{window.addEventListener('load',async_uservoice_load,false);}}})();
