document.write("<link rel=\"stylesheet\" href=\"https://www.leafbuyer.com/cannawidget/css/wSelect.css\" />");document.write("<link rel=\"stylesheet\" href=\"https://www.leafbuyer.com/cannawidget/css/widget.css?v=110517\" />");document.write("<link rel=\"stylesheet\" href=\"https://www.leafbuyer.com/cannawidget/grasscity/css/widget.css?v=040817\" />");document.write("<link rel=\"stylesheet\" href=\"https://www.leafbuyer.com/css/jquery-ui.css\" />");document.write("<script type=\"text/javascript\" src=\"https://www.leafbuyer.com/js/widgetdropdowns.js\"></script>");document.write("<script>");document.write("	if (typeof ga === 'undefined')");document.write("	{");document.write("		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){");document.write("			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),");document.write("				m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)");document.write("			})(window,document,'script','//www.google-analytics.com/analytics.js','ga');");document.write("	}");document.write("	ga('create','UA-45851918-8',{ 'name':'leafbuyer' });");document.write("	ga('leafbuyer.send','event','grasscity','widget:embed','widget:-:widget:embed:' + document.location.hostname.replace(/^w+\./,'') + ':rXfu326j');");document.write("	var	overlayTopOffset = 0;");document.write("</script>");document.write("<div class=\"lbmwidget\">");document.write("	<div style=\"display: block; width: auto; text-align:center\">");document.write("		<div id=\"lbmfilters\" class=\"lbmfilters lbmclearfix\">");document.write("			<input type=\"hidden\" name=\"lbmstype\" id=\"lbmstype\" value=\"business\">");document.write("			<div class=\"lbmfilter\">");document.write("				<select id=\"lbmcity\" name=\"city\">");document.write("				</select>");document.write("			</div>");document.write("			<div class=\"lbmfilter\">");document.write("				<select id=\"lbmvtype\" name=\"vtype\">");document.write("				</select>");document.write("			</div>");document.write("			<div class=\"lbmclearfix\"></div>");document.write("			<div class=\"lbmfilter\">");document.write("				<input type=\"hidden\" name=\"lbmvendorID\" id=\"lbmvendorID\">");document.write("				<input type=\"text\" name=\"lbmsearch\" id=\"lbmsearch\" placeholder=\"Shop Name\" style=\"border-radius:5px; width:200px; height:20px; font-size:12px; padding:1px 5px\" onfocus=\"jQuery(this).val(searchTerm); jQuery(this).autocomplete('search')\">");document.write("			</div>");document.write("		</div>");document.write("		<div class=\"lbmcanvas\" id=\"lbmcoupons-wrapper\" style=\"height:0px\">");document.write("			<div id=\"lbmcoupons\"></div>");document.write("		</div>");document.write("		<div class=\"lbmnav\">");document.write("			<div style=\"float:left; width:40%\">");document.write("				<img src=\"https://www.leafbuyer.com/cannawidget/grasscity/images/up_arrow.png\" id=\"coupon_prev\" width=\"33\" height=\"33\" alt=\"\" style=\"cursor:pointer\"/>");document.write("				<img src=\"https://www.leafbuyer.com/cannawidget/grasscity/images/down_arrow.png\" id=\"coupon_next\" width=\"33\" height=\"33\" alt=\"\" style=\"cursor:pointer\"/>");document.write("			</div>");document.write("			<div style=\"float:right; width:60%\">");document.write("				<a href=\"https://www.leafbuyer.com\" title=\"Leafbuyer.com\" target=\"_blank\"><img alt=\"\" src=\"https://www.leafbuyer.com/cannawidget/grasscity/images/poweredby.png\" style=\"margin-top:-2px\"></a>");document.write("			</div>");document.write("		</div>");document.write("	</div>");document.write("</div>");document.write("<div id=\"lbmoverlay\" class=\"lbmwidget-overlay\">");document.write("  <div id=\"lbmoverlay-contents\">");document.write("	<div id=\"lbmcouponpanel\">");document.write("  	<div id=\"lbmdesktop\">");document.write("	<div class=\"lbmcoupon-tools lbmwide lbmclearfix\">");document.write("	  <div id=\"sharing\" class=\"lbmsharing\">");document.write("		<a href=\"javascript:;\" onclick=\"hideOverlay()\" class=\"lbmcoupon-close\"><img src=\"https://www.leafbuyer.com/images/modal-close.png\" width=\"22\" height=\"22\" border=\"0\"></a>");document.write("		<a class=\"lbmprint\" href=\"javascript:popupPrint(false)\">print</a>");document.write("	  </div>");document.write("	  <div id=\"lbmpopupcoupon\" class=\"lbmcoupon lbmbig lbmclearfix\">");document.write("		<div class=\"lbmcoupon-header\">");document.write("		  <div><h3 id=\"couponheading\" class=\"lbmresizable\"></h3></div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmpricebar\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div id=\"couponpercentage\" class=\"lbmcell lbmdiscount\"></div>");document.write("			<div id=\"couponpricecell\" class=\"lbmcell\">");document.write("			  <div class=\"lbmtitle lbmoriginal\" id=\"couponoriginal\"></div>");document.write("			  <div class=\"lbmtitle lbmsale\" id=\"couponsale\"></div>");document.write("			</div>");document.write("			<div id=\"couponquantitycell\" class=\"lbmcell\">");document.write("			  <div class=\"lbmtitle\">Quantity</div>");document.write("			  <div id=\"couponweight\" class=\"lbmvalue\"></div>");document.write("			</div>");document.write("			<div id=\"couponthccbdcell\" class=\"lbmcell\">");document.write("			  <div id=\"couponthccbdtitle\" class=\"lbmtitle\"></div>");document.write("			  <div id=\"couponthccbd\" class=\"lbmvalue\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmclearfix lbmtable lbmdescription\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell lbmcol50\">");document.write("			  <div id=\"coupontext\" class=\"lbmtext\"></div>");document.write("			  <div id=\"coupondisclaimer\" class=\"lbmdisclaimer\"></div>");document.write("			</div>");document.write("			<div class=\"lbmcell lbmlogo lbmcol50\">");document.write("			  <div class=\"lbmtextcenter\"><img id=\"couponlogo\" class=\"lbmcouponlogo\" src=\"\"></div>");document.write("			  <div id=\"couponvendor\" class=\"lbmtextcenter\"></div>");document.write("			  <div id=\"couponlink\" class=\"lbmtextcenter\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmfooter lbmclearfix\">");document.write("		  <div class=\"lbmcol20 lbmleft\">");document.write("			<div id=\"couponexpires\"></div>");document.write("		  </div>");document.write("		  <div class=\"lbmcol80 lbmright\">");document.write("			<span id=\"couponaddr\" class=\"lbmtextright\"></span> | <span id=\"couponphone\" class=\"lbmtextright\"></span>");document.write("		  </div>");document.write("		</div>");document.write("		<div id=\"couponmedrecdel\" class=\"lbmmedrecdel lbmtextcenter\"></div>");document.write("		<div id=\"couponbarcode\" class=\"lbmtextcenter\"></div>");document.write("	  </div>");document.write("	  <div class=\"lbmterms\">");document.write("		<div class=\"lbmdisclaimer\" style=\"font-size:10px\">This advertisement is for customer reference only and has no value and is not intended to be exchanged for any product. Leafbuyer (Leafbuyer Technologies, Inc) is not responsible for the content of any advertisement. All advertisements are the sole responsibility of the vendor publishing the advertisement. If an advertisement is not valid, please contact the vendor directly as errors may have been made in the creation of the advertisement. This advertisement is only intended to be viewed by those of legal age and in the state/local area where the product is legally open for sale. Additionally, all state and local laws and restrictions apply to all advertisements. Void where prohibited.</div>");document.write("	  </div>");document.write("	</div>");document.write("	</div>");document.write("  	<div id=\"lbmmobile\" class=\"lbmmobile\">");document.write("	<div class=\"lbmcoupon-tools lbmnarrow lbmclearfix\">");document.write("	  <div id=\"sharing\" class=\"lbmsharing\">");document.write("		<a href=\"javascript:;\" onclick=\"hideOverlay()\" class=\"lbmcoupon-close\"><img src=\"https://www.leafbuyer.com/images/modal-close.png\" width=\"22\" height=\"22\" border=\"0\"></a>");document.write("	  <a class=\"lbmprint\" href=\"javascript:popupPrint(true)\">print</a>");document.write("	  </div>");document.write("<img id=\"lbmcoupon-image\" style=\"display:none\" />");document.write("	  <div id=\"lbmcoupon-contents\" class=\"lbmcoupon lbmsmall lbmclearfix\">");document.write("		<div class=\"lbmcoupon-header\">");document.write("		  <div><h3 id=\"couponheading\" class=\"lbmcouponheading lbmresizable\"></h3></div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmpricebar\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div id=\"couponpercentage\" class=\"lbmcell lbmdiscount\"></div>");document.write("			<div id=\"couponpricecell\" class=\"lbmcell\">");document.write("			  <div class=\"lbmtitle lbmoriginal\" id=\"couponoriginal\"></div>");document.write("			  <div class=\"lbmtitle lbmsale\" id=\"couponsale\"></div>");document.write("			</div>");document.write("			<div id=\"couponquantitycell\" class=\"lbmcell\">");document.write("			  <div class=\"lbmtitle\">Quantity</div>");document.write("			  <div id=\"couponweight\" class=\"lbmvalue\"></div>");document.write("			</div>");document.write("<!--");document.write("			<div id=\"couponthccbdcell\" class=\"lbmcell\">");document.write("			  <div id=\"couponthccbdtitle\" class=\"lbmtitle\"></div>");document.write("			  <div id=\"couponthccbd\" class=\"lbmvalue\"></div>");document.write("			</div>");document.write("-->");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix lbmdescription\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell\">");document.write("			  <div id=\"coupontext\" class=\"lbmtext\" style=\"height:initial; max-height:initial\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell\">");document.write("			  <div id=\"coupondisclaimer\" class=\"lbmdisclaimer\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell\">");document.write("				<div id=\"couponmedrecdel\" class=\"lbmtextcenter\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell lbmlogo\">");document.write("			  <div class=\"lbmtextcenter\"><img id=\"couponlogo\" class=\"lbmcouponlogo\" src=\"\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell lbmvendor\">");document.write("			  <div id=\"couponvendor\" class=\"lbmtextcenter\"></div>");document.write("			  <div class=\"lbmtextcenter\"><span id=\"couponaddr\"></span><br><span id=\"couponphone\" class=\"lbmtextright\"></span></div>");document.write("			  <div id=\"couponlink\" class=\"lbmtextcenter\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell\">");document.write("			  <div id=\"couponexpires\" class=\"lbmexpires lbmtextcenter\"></div>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("		<div class=\"lbmtable lbmclearfix\">");document.write("		  <div class=\"lbmrow\">");document.write("			<div class=\"lbmcell lbmtextcenter\">");document.write("			  <a href=\"http://www.leafbuyer.com\" target=\"blank\"><img src=\"https://www.leafbuyer.com/images/widget-footer.png\" border=\"0\" alt=\"Visit LeafBuyer.com\"></a>");document.write("			</div>");document.write("		  </div>");document.write("		</div>");document.write("	  </div>");document.write("	  <div class=\"lbmterms\">");document.write("		<div class=\"lbmcol lbmdisclaimer\"><a href=\"javascript:null(void)\" onclick=\"jQuery('#lbmfineprint').toggle()\">legal notice</a><p id=\"lbmfineprint\">This advertisement is for customer reference only and has no value and is not intended to be exchanged for any product. Leafbuyer (Leafbuyer Technologies, Inc) is not responsible for the content of any advertisement. All advertisements are the sole responsibility of the vendor publishing the advertisement. If an advertisement is not valid, please contact the vendor directly as errors may have been made in the creation of the advertisement. This advertisement is only intended to be viewed by those of legal age and in the state/local area where the product is legally open for sale. Additionally, all state and local laws and restrictions apply to all advertisements. Void where prohibited.</p></div>");document.write("	  </div>");document.write("	</div>");document.write("	</div>");document.write("	</div>");document.write("<style>");document.write("#lbmemailpanel * {");document.write("	font-size:14px;");document.write("}");document.write("#lbmemailpanel input,");document.write("#lbmemailpanel select {");document.write("	border:solid #d0d0d0 2px;");document.write("	border-radius:3px;");document.write("	font-size:14px;");document.write("	width:80%;");document.write("	height:25px;");document.write("}");document.write("#lbmemailpanel input[type=\"button\"] {");document.write("	width:100px;");document.write("	background-color:rgb(129,35,23);");document.write("	color:#fff;");document.write("	border-radius:5px;");document.write("	text-align:center;");document.write("}");document.write("</style>");document.write("	<div id=\"lbmemailpanel\" style=\"padding:10px; max-width:400px\">");document.write("		<div style=\"margin-bottom:10px\" class=\"lbmpanelheader\">");document.write("			<a href=\"javascript:;\" onclick=\"hideOverlay()\" class=\"lbmcoupon-close\"><img src=\"https://www.leafbuyer.com/images/modal-close.png\" width=\"22\" height=\"22\" border=\"0\"></a>");document.write("			<h2>Sign Up for Deal Alerts</h2>");document.write("		</div>");document.write("		<div class=\"lbmcontent lbmsignup\">");document.write("			<div class=\"lbmsignup-header\" style=\"text-align:center; margin-bottom:10px; font-size:16px\">");document.write("				Get exclusive updates on the hottest cannabis deals and industry events in your area!");document.write("			</div>");document.write("			<form>");document.write("			<div class=\"lbmtable lbmsignupform lbmclearfix\">");document.write("				<div style=\"margin-bottom:10px\">");document.write("					Email Address<br>");document.write("					<input type=\"text\" name=\"email\" id=\"signupEmail\">");document.write("				</div>");document.write("				<div style=\"margin-bottom:10px\">");document.write("					Mobile Phone #<br>");document.write("					<input type=\"text\" name=\"phone\" id=\"signupPhone\">");document.write("				</div>");document.write("				<div style=\"margin-bottom:10px\">");document.write("					City<br>");document.write("					<select id=\"signupCity\">");document.write("						<option>Other</option>");document.write("						<option>AZ --&gt; Phoenix</option>");document.write("						<option>AZ --&gt; Mesa</option>");document.write("						<option>AZ --&gt; Scottsdale</option>");document.write("						<option>AZ --&gt; Tucson</option>");document.write("						<option>AZ --&gt; Other</option>");document.write("						<option>CA --&gt; Los Angeles</option>");document.write("						<option>CA --&gt; Oakland</option>");document.write("						<option>CA --&gt; Sacramento</option>");document.write("						<option>CA --&gt; San Diego</option>");document.write("						<option>CA --&gt; San Francisco</option>");document.write("						<option>CA --&gt; San Jose</option>");document.write("						<option>CA --&gt; Santa Ana</option>");document.write("						<option>CA --&gt; Other</option>");document.write("						<option>CO --&gt; Denver</option>");document.write("						<option>CO --&gt; Colorado Springs</option>");document.write("						<option>CO --&gt; Boulder</option>");document.write("						<option>CO --&gt; South (Pueblo/Trinidad)</option>");document.write("						<option>CO --&gt; Other</option>");document.write("						<option>FL --&gt; Jacksonville</option>");document.write("						<option>FL --&gt; Miami</option>");document.write("						<option>FL --&gt; Orlando</option>");document.write("						<option>FL --&gt; Tampa</option>");document.write("						<option>FL --&gt; Other</option>");document.write("						<option>IL --&gt; Chicago</option>");document.write("						<option>IL --&gt; Springfield</option>");document.write("						<option>IL --&gt; Other</option>");document.write("						<option>MA --&gt; Boston</option>");document.write("						<option>MA --&gt; Other</option>");document.write("						<option>ME --&gt; Portland</option>");document.write("						<option>ME --&gt; Other</option>");document.write("						<option>MI --&gt; Ann Arbor</option>");document.write("						<option>MI --&gt; Detroit</option>");document.write("						<option>MI --&gt; Grand Rapids</option>");document.write("						<option>MI --&gt; Lansing</option>");document.write("						<option>MI --&gt; Traverse City</option>");document.write("						<option>MI --&gt; Other</option>");document.write("						<option>NV --&gt; Henderson</option>");document.write("						<option>NV --&gt; Las Vegas</option>");document.write("						<option>NV --&gt; Reno</option>");document.write("						<option>NV --&gt; Stateline</option>");document.write("						<option>NV --&gt; Other</option>");document.write("						<option>NY --&gt; Buffalo</option>");document.write("						<option>NY --&gt; New York</option>");document.write("						<option>NY --&gt; Rochester</option>");document.write("						<option>NY --&gt; Other</option>");document.write("						<option>OH --&gt; Cincinnati</option>");document.write("						<option>OH --&gt; Cleveland</option>");document.write("						<option>OH --&gt; Columbus</option>");document.write("						<option>OH --&gt; Other</option>");document.write("						<option>OR --&gt; Bend</option>");document.write("						<option>OR --&gt; Eugene</option>");document.write("						<option>OR --&gt; Portland</option>");document.write("						<option>OR --&gt; Salem</option>");document.write("						<option>OR --&gt; Other</option>");document.write("						<option>TX --&gt; Dallas</option>");document.write("						<option>TX --&gt; Houston</option>");document.write("						<option>TX --&gt; Other</option>");document.write("						<option>WA --&gt; Seattle</option>");document.write("						<option>WA --&gt; Tacoma</option>");document.write("						<option>WA --&gt; Spokane</option>");document.write("						<option>WA --&gt; Vancouver</option>");document.write("						<option>WA --&gt; Other</option>");document.write("					</select>");document.write("				</div>");document.write("<div class=\"lbmrow\">");document.write("					<div class=\"lbmcell\">");document.write("						<input type=\"button\" value=\"submit\" class=\"lbmbutton\" onclick=\"doSignup(); return false\">");document.write("					</div>");document.write("				</div>");document.write("			</div>");document.write("			</form>");document.write("		</div>");document.write("	</div>");document.write("  </div>");document.write("</div>");document.write("<!-- start omit --><!-- end omit -->");document.write("<span id=\"lbmruler\" style=\"visibility:hidden; text-wrap:none\"></span>");document.write("");var _debug=(document.location.href.match(/.*\/leafbuyer/)!=null);var lbmCouponID=-1;function popup(id,v)
{lbmCouponID=id;updateCoupon(id);jQuery('#lbmemailpanel').hide();jQuery('#lbmcouponpanel').show();showOverlay();resizeOverlay(false);jQuery('.lbmresizable').each(function(index,value){if(jQuery(this).is(':visible'))
while(pixels(jQuery(this))>jQuery(this).width())
jQuery(this).css('font-size',(jQuery(this).css('font-size').replace(/[^0-9]/g,'')- 1)+'px');});jQuery('#lbmcoupon-image').html('').hide();jQuery('#lbmcoupon-contents').show();_lbvendor=v;_lbcoupon=_coupons[id].attributes.couponID;ga('leafbuyer.send','event','grasscity','widget:lightbox','widget:-:widget:lightbox:'+_vendor+':'+_lbvendor);ga('leafbuyer.send','event','grasscity','widget:lightbox-coupon','widget:-:widget:lightbox:'+_vendor+':'+_lbvendor+':'+_lbcoupon);lb('click','coupon:lightbox:'+_lbvendor+':'+_lbcoupon+':'+lat+':'+lng);}
function popupEmail()
{jQuery('#lbmemailpanel').show();jQuery('#lbmcouponpanel').hide();showOverlay();resizeOverlay();}
function doSignup()
{jQuery.ajax({url:"https://www.leafbuyer.com/php/signup.php?email="+ jQuery('#signupEmail').val()+"&phone="+ jQuery('#signupPhone option:selected').text()+"&city="+ jQuery('#signupCity option:selected').text()+"&source=grasscity",type:'GET',success:function(response){alert(response);hideOverlay();ga('leafbuyer.send','event','newsletter','widget::newsletter:signedup');}});}
var _coupons=[],_types=[],_subtypes=[];var _vendor=document.location.host+':rXfu326j',_lbvendor='',initialize=false;var lat=null,lng=null;function lb(e,d)
{jQuery.ajax({url:"https://www.leafbuyer.com/proxy/tracker.lbn?e="+ e+"&d="+ d,type:'GET',complete:function(response){},success:function(response){}});}
function lbmUpdate(init)
{initialize=init;jQuery('#lbmloading').show();jQuery('#lbmnonefound').hide();jQuery('.caroufredsel_wrapper').css('visibility','hidden');var type=jQuery('#lbmvtype').val(),mode=jQuery('#lbmstype').val(),vtype=null,ptype=null,url="https://www.leafbuyer.com/proxy/widgetsearch.lbn?vid=rXfu326j&init="+ init;if(lat!=null&&lng!=null)
url+="&lat="+ lat+"&lng="+ lng;if(mode=='business')
{if(type!=null)
{vtype=type.split(":")[0];ptype=type.split(":")[1];url+=(jQuery('#lbmcity').val()!=null?"&city="+ jQuery('#lbmcity').val():'')+(vtype!=null?"&vtype="+ vtype:"")+(ptype!=null?"&ptype="+ ptype:"");}}
else if(mode=='name')
url+=(jQuery('#lbmvendorID').val()!=null?"&vendorID="+ jQuery('#lbmvendorID').val():'');url+="&t="+(new Date()).getTime(),jQuery.ajax({url:url,success:function(data){lbmUpdateCallback(data);}});}
var types=new Array();function lbmUpdateCallback(xml)
{jQuery('#lbmcoupons').html('');try
{var xmla=xml2array(xml);var root=xmla.rsp,filters=root.filters,coupons=root.coupons;if(typeof(filters)!='undefined')
{var list=filters.cities;for(var i=0;i<list.attributes.count;i++)
{var city=(list.attributes.count==1?list.city:list.city[i]);if(city.attributes.typeIDs=='')
continue;types[city.value]=city.attributes.typeIDs.split(/,/);jQuery('#lbmcity').append(jQuery('<option/>',{value:city.value,text:city.value.replace(/,.*/,'')}));}
if(list.attributes.closest!=null)
jQuery('#lbmcity option[value="'+ list.attributes.closest+'"]').prop('selected',true);if(lat==null&&lng==null)
try
{lat=list.attributes.lat;lng=list.attributes.lng;}
catch(e)
{}
list=filters.types;for(var i=0;i<list.attributes.count;i++)
{var item=(list.attributes.count==1?list.type:list.type[i]),type=item.attributes.name;_types[i]=type;_subtypes[i]=new Array();for(var j=0;j<item.attributes.count;j++)
{var subtype=item.subtype[j];_subtypes[i][j]=subtype;}}
jQuery('#lbmcity').trigger('change',[false]);}
destroyCarousel();var html='';for(var i=0;i<coupons.attributes.count;i++)
{var coupon=(coupons.attributes.count==1?coupons.coupon:coupons.coupon[i]);if(i>0)
{if(coupon.vendor.name.toLowerCase().substring(0,Math.min(5,coupon.vendor.name.length))==coupons.coupon[i- 1].vendor.name.toLowerCase().substring(0,Math.min(5,coupons.coupon[i- 1].vendor.name.length)))
{for(var j=i+ 1;j<coupons.attributes.count;j++)
{if(coupon.vendor.name.toLowerCase().substring(0,Math.min(5,coupon.vendor.name.length))!=coupons.coupon[j].vendor.name.toLowerCase().substring(0,Math.min(5,coupons.coupon[j].vendor.name.length)))
{var c1=coupon,c2=coupons.coupon[j];coupons.coupon[i]=c2;coupons.coupon[j]=c1;coupon=coupons.coupon[i];break;}}}
if(i%8==0)
{html+='<div class="lbmwidget-coupon" style="text-align:center" onclick="popupEmail()">';html+='	<div class="lbmcoupon-signup">Get Exclusive Deals<br>in your Inbox!</div>';html+='	<div class="lbmcoupon-signup-btn">SIGN UP NOW</div>';html+='</div>';}}
_coupons[i]=coupon;var maxlen=70,name=coupon.vendor.name.replace(/&apos/g,'\\&apos');html+='<div id="coupon_'+ coupon.attributes.couponID+'" class="lbmwidget-coupon" onclick="popup('+ i+',\''+ name+':'+ coupon.vendor.vendorID+'\')">';html+='	<div class="lbmcoupon-logo"><img src="https://www.leafbuyer.com/vendors/'+ coupon.vendor.vendorID+'/thumblogo.png"></div>';html+='	<div class="lbmcoupon-body"><span>';html+='		<div class="lbmcoupon-heading">';html+='			<div class="lbmcoupon-type">';if(coupon.medical=='true'&&coupon.retail=='false')
html+='Med Only';else if(coupon.medical=='false'&&coupon.retail=='true')
html+='Rec Only';else if(coupon.medical=='true'&&coupon.retail=='true')
html+='Med/Rec';html+='			</div>';html+='			<div class="lbmcoupon-title">'+ coupon.product+'</div>';html+='		</div>';var text=coupon.text.replace(/(<br>)+/gi,' ').replace(/<a.*?>/i,'').replace(/<\/a>/i,'');html+='		<div class="lbmcoupon-text">'+(text.length>maxlen?text.substring(0,maxlen).replace(/ [^ ]+$/,'')+'...':text)+'</div>';html+='	</span></div>';html+='</div>';}
jQuery('#lbmcoupons').html(html);}
catch(e)
{jQuery.ajax({url:'https://www.leafbuyer.com/cw-error?m='+ e.message.replace(/ /g,'+')});}
try
{buildCarousel();}
catch(e)
{console.log(e.message);}
if(coupons.attributes.count==0)
{jQuery('#lbmloading').hide();jQuery('#lbmnonefound').show();}
jQuery('.caroufredsel_wrapper').css('visibility','visible');jQuery('#lbmloading').hide();}
function pixels(el)
{var ruler=jQuery('#lbmruler').css('font',el.css('font')).css('white-space','nowrap').html(el.html());return ruler.width();}
function viewProfile()
{ga('leafbuyer.send','event','grasscity','widget:profile','widget:-:widget:profile:'+_vendor);ga('leafbuyer.send','event','grasscity','widget:profile','widget:-:widget:profile:'+_lbvendor);}
function updateCoupon(id)
{id=lbmCouponID;var active=jQuery('#lbmdesktop'),inactive=jQuery('#lbmmobile');if(jQuery('#lbmmobile').css('display')!='none')
{active=jQuery('#lbmmobile');inactive=jQuery('#lbmdesktop');}
jQuery(inactive).find("*").each(function(){if(typeof(jQuery(this).attr("id"))!='undefined')
jQuery(this).attr('id','_'+ jQuery(this).attr('id').replace(/^_/,''));});jQuery(active).find("*").each(function(){if(typeof(jQuery(this).attr("id"))!='undefined')
jQuery(this).attr('id',jQuery(this).attr('id').replace(/^_/,''));});var cxml=_coupons[id],fontsize=28,tgt=jQuery(active).attr('id');jQuery('#'+ tgt+' #couponheading').css('font-size',fontsize+'px').html(cxml.product);jQuery('#'+ tgt+' #couponheading').html(cxml.product);if(typeof(cxml.percentage)!='undefined')
jQuery('#'+ tgt+' #couponpercentage').html(Math.floor(cxml.percentage)+"% Off");if(typeof(cxml.originalPrice)!='undefined')
jQuery('#'+ tgt+' #couponoriginal').html((jQuery('#lbmdesktop').length!=0?"Original ":"")+ cxml.originalPrice);if(typeof(cxml.salePrice)!='undefined')
jQuery('#'+ tgt+' #couponsale').html((jQuery('#lbmdesktop').length!=0?"Sale ":"")+ cxml.salePrice);if(typeof(cxml.quantity)!='undefined')
jQuery('#'+ tgt+' #couponweight').html(cxml.quantity);jQuery('#'+ tgt+' #coupontext').html(cxml.text);jQuery('#'+ tgt+' #coupondisclaimer').html(cxml.disclaimer);jQuery('#'+ tgt+' #couponexpires').html(cxml.expires!=''?"Expires "+ cxml.expires:"No expiration");jQuery('#'+ tgt+' #couponvendor').html(cxml.vendor.name);jQuery('#'+ tgt+' #couponlink').html('<a href="https://www.leafbuyer.com/'+ cxml.vendor.typename+'/'+ cxml.vendor.state+'/'+ cxml.vendor.city+'/'+ cxml.vendor.pathname+'" target="_blank" rel="nofollow" onclick="viewProfile()">View all our deals on Leafbuyer.com</a>');jQuery('#'+ tgt+' #couponlogo').attr('src','https://www.leafbuyer.com/vendors/'+ cxml.vendor.vendorID+'/logo.png?t='+(new Date()).getTime());jQuery('#'+ tgt+' #couponaddr').html(cxml.vendor.addr1+', '+(cxml.vendor.addr2.length!=0?cxml.vendor.addr2+', ':'')+ cxml.vendor.city+', '+ cxml.vendor.state);jQuery('#'+ tgt+' #couponphone').html(cxml.vendor.phone);jQuery('#'+ tgt+' #couponmed').hide();jQuery('#'+ tgt+' #couponrec').hide();jQuery('#'+ tgt+' #coupondel').hide();jQuery('#'+ tgt+' #couponmedrecdel').html('');if(cxml.vendor.medical=='true')
jQuery('#'+ tgt+' #couponmed').show();if(cxml.medical=='true')
jQuery('#'+ tgt+' #couponmedrecdel').html('Medical Only');if(cxml.vendor.retail=='true')
jQuery('#'+ tgt+' #couponrec').show();if(cxml.retail=='true')
jQuery('#'+ tgt+' #couponmedrecdel').html('Recreational Only');if(cxml.medical=='true'&&cxml.retail=='true')
jQuery('#'+ tgt+' #couponmedrecdel').html('Medical or Recreational');if(cxml.vendor.delivery=='true')
jQuery('#'+ tgt+' #coupondel').show();jQuery('#'+ tgt+' #couponbarcode').hide();jQuery('#'+ tgt+' #couponbarcode').html('');if(cxml.barcode!=null)
{jQuery('#'+ tgt+' #couponbarcode').show();jQuery('#'+ tgt+' #couponbarcode').html('<img src="https://www.leafbuyer.com/vendors/'+
cxml.vendor.vendorID+'/barcodes/'+ cxml.barcode+'.png" class="lbmbarcode" onerror="jQuery(\'#'+ tgt+' #couponbarcode\').css(\'height\',\'0px\'); jQuery(this).hide()">');}
var title=null,value=null;var thc=(typeof(cxml.thc)!='undefined'?cxml.thc:null),cbd=(typeof(cxml.cbd)!='undefined'?cxml.cbd:null);jQuery('#'+ tgt+' #couponthccbdcell').hide();if(thc!=null||cbd!=null)
{if(cxml.type==1)
{if(thc!=null&&cbd!=null)
{title="THC / CBD Levels";value=thc+" / "+ cbd;}
else if(thc!=null)
{title="THC Level";value=thc;}
else if(cbd!=null)
{title="CBD Level";value=cbd;}
if(title!=null&&value!=null)
{jQuery('#'+ tgt+' #couponthccbdtitle').html(title);jQuery('#'+ tgt+' #couponthccbd').html(value);jQuery('#'+ tgt+' #couponthccbdcell').show();}}}
jQuery('#'+ tgt+' #couponpercentage').hide();jQuery('#'+ tgt+' #couponpricecell').hide();jQuery('#'+ tgt+' #couponoriginal').hide();jQuery('#'+ tgt+' #couponsale').hide();jQuery('#'+ tgt+' #couponquantitycell').hide();if(typeof(cxml.percentage)!='undefined')
jQuery('#'+ tgt+' #couponpercentage').show();if(typeof(cxml.originalPrice)!='undefined')
{jQuery('#'+ tgt+' #couponoriginal').show();jQuery('#'+ tgt+' #couponpricecell').show();}
if(typeof(cxml.salePrice)!='undefined')
{jQuery('#'+ tgt+' #couponsale').show();jQuery('#'+ tgt+' #couponpricecell').show();}
if(typeof(cxml.quantity)!='undefined')
jQuery('#'+ tgt+' #couponquantitycell').show();if(cxml.vendor.city.match(/(boulder|garden city)/i))
jQuery('#'+ tgt+' #lbmpopupcoupon').addClass('lbmnodashes');else
jQuery('#'+ tgt+' #lbmpopupcoupon').removeClass('lbmnodashes');}
function resizeOverlay(redraw)
{if(!jQuery('#lbmoverlay').is(':visible'))
return;if(typeof(redraw)!=="undefined"&&redraw)
updateCoupon();jQuery('#lbmoverlay-contents').css('height','initial');jQuery('#lbmoverlay-contents').css('overflow-y','visible');jQuery('#lbmoverlay-contents').css('width','initial');jQuery('#lbmoverlay-contents').css('overflow-x','visible');if(jQuery('#lbmoverlay-contents').height()>jQuery(window).height()- 44)
{jQuery('#lbmoverlay-contents').height(jQuery(window).height()- 44);jQuery('#lbmoverlay-contents').css('top','10px');jQuery('#lbmoverlay-contents').css('overflow-y','scroll');}
if(jQuery('#lbmoverlay-contents').width()>jQuery(window).width()- 44)
{jQuery('#lbmoverlay-contents').width(jQuery(window).width()- 44);jQuery('#lbmoverlay-contents').css('left','10px');jQuery('#lbmoverlay-contents').css('overflow-x','scroll');}}
var cpopup=null;function popupPrint(mobile)
{ga('leafbuyer.send','event','grasscity','widget:print','widget:-:widget:print:'+_vendor+':'+_lbvendor);ga('leafbuyer.send','event','grasscity','widget:print-coupon','widget:-:widget:print:'+_vendor+':'+_lbvendor+':'+_lbcoupon);lb('click','coupon:print:'+_lbvendor+':'+_lbcoupon+':'+lat+':'+lng);if(mobile)
{return;}
if(cpopup==null||cpopup.closed)
cpopup=window.open();var doc=cpopup.document;var html='<html><head>';html+='<link rel="stylesheet" href="https://www.leafbuyer.com/cannawidget/css/widget.css" />';html+='<link rel="stylesheet" href="https://www.leafbuyer.com/cannawidget/grasscity/css/widget.css" />';html+='<link href="//fonts.googleapis.com/css?family=Lato:400,700,700italic" rel="stylesheet" type="text/css">';html+='<script type="text/javascript" src="https://www.leafbuyer.com/js/vendor/jquery.js"><\/script>';html+='<script>';html+='	jQuery(window).on("load", function(e) { jQuery("#lbmoverlay").css("display","block").css("background-image","none"); setTimeout( function() { window.print(); window.close(); }, 100); } );';html+='<\/script>';html+='<\/head>';html+='<body>';html+='<div id="lbmoverlay">'+ jQuery('#lbmoverlay-contents').html().replace(/"lbmsharing"/g,'"lbmsharing" style="visibility:hidden"').replace(/"lbmmobile">/,'"lbmmobile" style="visibility:hidden">')+'<\/div>';html+='<\/body>';html+='<\/html>';doc.write(html);doc.close();cpopup.focus();}
var resizeTimer=null;function destroyCarousel()
{jQuery("#lbmcoupons").trigger("destroy");}
function buildCarousel()
{if(!jQuery.fn.carouFredSel)
{setTimeout(buildCarousel,100);return;}
jQuery('.lbmcoupon-body').each(function(){jQuery(this).outerWidth(jQuery(this).closest('.lbmwidget-coupon').width()-
jQuery(this).prev().outerWidth()- 5);});jQuery('.lbmcoupon-text, .lbmcoupon-heading').each(function(){jQuery(this).outerWidth(jQuery(this).closest('.lbmcoupon-body').outerWidth());});var num=jQuery('#lbmmobile').css('display')!='none'?3:5;jQuery("#lbmcoupons-wrapper").outerHeight(jQuery(".lbmwidget-coupon").outerHeight()*num+ 2);jQuery("#lbmcoupons").carouFredSel({direction:"up",items:{visible:num},scroll:{items:1,pauseOnHover:'immediate-resume'},auto:{play:true,timeoutDuration:4000},prev:{button:'#coupon_prev',key:'up'},next:{button:'#coupon_next',key:'down'},debug:true});}
var searchTerm="";function onLoad()
{jQuery("#lbmsearch").autocomplete({open:function(){searchItem=null;},source:function(request,response){searchTerm=request.term;var l1,l2,reStartsWith=new RegExp("^"+ jQuery.ui.autocomplete.escapeRegex(request.term).replace(/ /g,' *'),"i"),reContainsNotStarts=new RegExp(".+"+ jQuery.ui.autocomplete.escapeRegex(request.term).replace(/ /g,' *')+".*","i"),reContains=new RegExp(".*"+ jQuery.ui.autocomplete.escapeRegex(request.term).replace(/ /g,' *')+".*","i");l1=jQuery.map(clients,function(item){if(reStartsWith.test(item.label)||reStartsWith.test(item.label.replace(/[^a-z 0-9]/gi,'')))
{return{label:item.label,vid:item.value}}});l2=jQuery.map(clients,function(item){if(reContainsNotStarts.test(item.label)||reContainsNotStarts.test(item.label.replace(/[^a-z 0-9]/gi,'')))
{return{label:item.label,vid:item.value}}});response(l1.concat(l2));},select:function(e,ui){jQuery('#lbmvendorID').val(ui.item.vid);jQuery('#search').val(ui.item.label);searchItem=ui.item;},close:function(e,ui){if(searchItem!=null)
{jQuery('#lbmstype').val('name');jQuery('#lbmvendorID').val(searchItem.vid);lbmUpdate(false);jQuery('#lbmsearch').blur();}
else
searchTerm='';},minLength:3,autoFocus:true});jQuery('select').on('keydown',function(e){if(e.keyCode===38||e.keyCode===40){e.preventDefault();return false;}});jQuery(document.body).append(jQuery('#lbmoverlay').detach());jQuery('#lbmoverlay').on("show",function(){jQuery('#lbmcoupons').trigger('stop',true);});jQuery('#lbmoverlay').on("hide",function(){jQuery('#lbmcoupons').trigger('play',true);});jQuery('#lbmcity').on('change',function(event,update){if(typeof update==="undefined")
update=true;jQuery('#lbmvtype').find('option').remove();for(var i=0;i<_types.length;i++)
{if(_subtypes[i].length==0)
continue;jQuery('#lbmvtype').append(jQuery('<option/>',{value:_types[i].split(':')[1]+':0',text:_types[i].split(':')[0]}));var added=false,found=false;for(var j=0;j<_subtypes[i].length;j++)
{var ptype=_subtypes[i][j],value=ptype.replace(/.*:/,''),text=ptype.replace(/:.*/,'');if(jQuery.inArray(value,types[jQuery('#lbmcity option:selected').val()])==-1)
continue;found=true;added=true;jQuery('#lbmvtype').append(jQuery('<option/>',{value:_types[i].replace(/.*:/,'')+':'+ value,text:'-'+ text}));}
if(!added&&!found)
jQuery('#lbmvtype option:last').remove();}
if(jQuery('#lbmcity option:selected').val().match(/.*[,:]ca/))
jQuery('#lbmvtype option:contains("shops")').text("collectives").wSelect('change');else
jQuery('#lbmvtype option:contains("collectives")').text("shops").wSelect('change');jQuery('#lbmvtype option:eq(0)').prop('selected',true);jQuery('#lbmvtype').wSelect('reset').wSelect();jQuery('#lbmstype').val('business');if(update)
lbmUpdate(false);jQuery('#lbmcity').wSelect();jQuery('.wSelect').css('width','120px');jQuery('.wSelect').css('margin-bottom','5px');});jQuery('#lbmvtype').change(function(){jQuery('#lbmstype').val('business');lbmUpdate(false);});jQuery('#lbmwidget').css('visibility','visible');if(jQuery('#lbmmobile').css('display')!='none'&&navigator.geolocation)
{navigator.geolocation.getCurrentPosition(function(position){lat=position.coords.latitude;lng=position.coords.longitude;lbmUpdate(true);},function(error){lbmUpdate(true);});}
else
lbmUpdate(true);jQuery(window).resize(function(){clearTimeout(resizeTimer)
resizeTimer=setTimeout(resizeOverlay,500);});}
var onLoadCalled=false;function checkjQuery()
{if(typeof jQuery==="undefined")
setTimeout(checkjQuery,100);else if(!onLoadCalled)
{onLoadCalled=true;var e=document.createElement("script");e=document.createElement("script");e.type="text/javascript";e.src="https://www.leafbuyer.com/js/jquery-ui.js";document.getElementsByTagName("head")[0].appendChild(e);e=document.createElement("script");e.type="text/javascript";e.src="https://www.leafbuyer.com/js/widget.js?v=101317";document.getElementsByTagName("head")[0].appendChild(e);checkjQueryUI();}}
function checkjQueryUI()
{if(typeof jQuery.ui==="undefined"||typeof jQuery.fn.wSelect==="undefined")
{setTimeout(checkjQueryUI,500);}
else
onLoad();}
checkjQuery();jQuery(window).on('load',function(e){jQuery('.lbmwidget span.jcf-select').remove();});function nagmon(){}