if (typeof(FoxyDomain) == 'undefined') {
var FoxyDomain = "secure.goodsoil.com";
}

// foxybox.js (slightly modified ThickBox 3.1) RAW: https://www.foxycart.com/v/0.4.0/raw/foxybox.js
if(!fc_tb_pathToImage){var fc_tb_pathToImage="https://www.foxycart.com/files/images/loadingAnimation.gif";}
$(document).ready(function(){fc_tb_init('a.foxycart');imgLoader=new Image();imgLoader.src=fc_tb_pathToImage;});function fc_tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;if(this.href.match("cart=checkout")||this.href.match("cart=updateinfo")){location.href=this.href;}else{if(typeof(fc_PreProcess)=='function'&&!this.href.match("cart=view")){MyFoxyData=this.href.substring(this.href.indexOf("?")+1);MyFoxyID=$(this).attr('id');if(!fc_PreProcess(MyFoxyData,MyFoxyID)){return false;}}
fc_tb_show(t,a,g);}
this.blur();return false;});}
function fc_tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("fc_tb_HideSelect")===null){$("body").append("<iframe id='fc_tb_HideSelect' src='https://www.foxycart.com/empty.html'></iframe><div id='fc_tb_overlay'></div><div id='fc_tb_window'></div>");$("#fc_tb_overlay").click(fc_tb_remove);}}else{if(document.getElementById("fc_tb_overlay")===null){$("body").append("<div id='fc_tb_overlay'></div><div id='fc_tb_window'></div>");$("#fc_tb_overlay").click(fc_tb_remove);}}
if(fc_tb_detectMacXFF()){$("#fc_tb_overlay").addClass("fc_tb_overlayMacFFBGHack");}else{$("#fc_tb_overlay").addClass("fc_tb_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='fc_tb_load'><img src='"+imgLoader.src+"' /></div>");$('#fc_tb_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);var queryString=url.replace(/^[^\?]+\??/,'');var params=fc_tb_parseQuery(queryString);if(typeof(fc_tb_WIDTH)=='undefined'){fc_tb_WIDTH=(params['x:width']*1)+30||500;}
if(typeof(fc_tb_HEIGHT)=='undefined'){fc_tb_HEIGHT=(params['x:height']*1)+40||350;}
ajaxContentW=fc_tb_WIDTH-30;ajaxContentH=fc_tb_HEIGHT-45;url=url.replace(/'/g,"%27");$("#fc_tb_iframeContent").remove();$("#fc_tb_window").append("<div id='fc_tb_titleTop' class='fc_tb_title'><div id='fc_tb_ajaxWindowTitleTop' class='fc_tb_ajaxWindowTitle'>"+caption+"</div><div class='fc_tb_closeAjaxWindow' id='fc_tb_closeAjaxWindowTop'><a href='#' class='fc_tb_closeWindowButton fc_link_nav' id='fc_tb_closeWindowButtonTop' title='Close'>close</a> <span>or Esc Key</span></div></div><iframe frameborder='0' hspace='0' src='"+url+"' id='fc_tb_iframeContent' name='fc_tb_iframeContent"+Math.round(Math.random()*1000)+"' onload='fc_tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe> <div class='fc_tb_title' id='fc_tb_titleBot'><div class='fc_tb_closeAjaxWindow' id='fc_tb_closeAjaxWindowBot'><a href='#' class='fc_tb_closeWindowButton fc_link_nav' id='fc_tb_closeWindowButtonBot' title='Continue Shopping'><span>Â«</span>Continue Shopping</a></div></div>");$("#fc_tb_closeWindowButtonTop, #fc_tb_closeWindowButtonBot").click(fc_tb_remove);fc_tb_position();if($.browser.safari){$("#fc_tb_load").remove();$("#fc_tb_window").css({display:"block"});}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){fc_tb_remove();}};}}catch(e){}}
function fc_tb_showIframe(){$("#fc_tb_load").remove();$("#fc_tb_window").css({display:"block"});}
function fc_tb_remove(){$("#fc_tb_imageOff").unbind("click");$("#fc_tb_closeWindowButtonTop, #fc_tb_closeWindowButtonBot").unbind("click");$("#fc_tb_window").fadeOut("fast",function(){$('#fc_tb_window,#fc_tb_overlay,#fc_tb_HideSelect').trigger("unload").unbind().remove();});$("#fc_tb_load").remove();fc_UpdateCart(FoxyDomain);if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function fc_tb_position(){$("#fc_tb_window").css({marginLeft:'-'+parseInt((fc_tb_WIDTH/2),10)+'px',width:fc_tb_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#fc_tb_window").css({marginTop:'-'+parseInt((fc_tb_HEIGHT/2),10)+'px'});}}
function fc_tb_parseQuery(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function fc_tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function fc_tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}


// foxycart.js RAW: https://www.foxycart.com/v/0.4.0/raw/foxycart.js
$(document).ready(function(){if(location.href.substring(location.href.lastIndexOf('/')+1,location.href.lastIndexOf('/')+5)!="cart"){fc_UpdateCart(FoxyDomain);$("form.foxycart").submit(function(){MyFoxyData=$(this).serialize(false);MyFoxyID=$(this).attr('id');if(typeof(fc_PreProcess)=='function'){if(!fc_PreProcess(MyFoxyData,MyFoxyID)){return false;}}
if(MyFoxyData.match("cart=checkout")){location.href="https://"+FoxyDomain+"/cart.php?"+MyFoxyData+fc_AddSession();}else{fc_tb_show(null,"https://"+FoxyDomain+"/cart.php?"+MyFoxyData+fc_AddSession(),false);$("a.fc_tb_closeWindowButton").click(function(){fc_UpdateCart(FoxyDomain);return false;});}
return false;});}});function fc_FoxyJSON(json){fc_json=json;(json.product_count>0)?$("#fc_minicart").show():$("#fc_minicart").css("display","none");$("#fc_quantity").html(""+json.product_count);$("#fc_total_price").html(""+json.total_price);if(typeof(fc_BuildFoxyCart)=='function'){fc_BuildFoxyCart();}};function fc_UpdateCart(StoreDomain){$.getScript('https://'+StoreDomain+'/cart.php?cart=get&noCacheIE='+(new Date()).getTime()+fc_AddSession());};function fc_AddSession(){sessionName="fc_PHPSESSID";sessionString="";if(document.cookie.length>0){c_start=document.cookie.indexOf(sessionName+"=");if(c_start!=-1){c_start=c_start+sessionName.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length;}
sessionString=unescape(document.cookie.substring(c_start,c_end));}}
if(sessionString==""){if(fc_json){domain=window.location.href.split('/');domain=domain[2];pos1=domain.lastIndexOf(".");pos2=domain.lastIndexOf(".",pos1-1);if(pos2>1){domain=domain.substr(pos2);}else{domain="."+domain;}
document.cookie=sessionName+"="+escape(fc_json.session_id)+";path=/;domain="+domain;sessionString=fc_json.session_id;}else{fc_regex=/#fc_PHPSESSID=([A-Za-z0-9]*)/;if(fc_regex.test(window.location.href)){fc_match=fc_regex.exec(window.location.href);sessionString=fc_match[1];}}}
if(sessionString!=""){return"&PHPSESSID="+sessionString;}else{return"";}};function fc_CookieFix(){$('a:not([href*=PHPSESSID])').filter('[href*='+FoxyDomain+']').each(function(){$(this).attr('href',$(this).attr('href')+fc_AddSession());});}


// *** DO NOT PACK THESE LINES *** //
var fc_json; // your JSON object including your current cart data
var fc_FoxyCart; // string to hold your cart
var fc_scriptCounter = 0; // counter used when adding dynamic script tags to update the json object 
