/* * jQuery Textarea Characters Counter Plugin v 2.0 * Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp * Copyright (c) 2010 Roy Jin * Version: 2.0 (11-JUN-2010) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * Requires: jQuery v1.4.2 or later */ function print_this_page(t,e){Hbz.trackEvent("Print Business",{placement:this_page||"hubbiz",business_id:$("#business_id").val()},!0);var n=$("#reviews").find(".hreview");e=shorten_url(e);n.each(function(e){e>4&&($(".hreview").eq(e).hide(),$(".total-review").text("Top 5 reviews for "+decodeURI(t)))}),$(".static-map").append("

Come back to review this business! Visit: "+e+"

"),setTimeout("javascript:print()",500),setTimeout("location.reload()",800)}!function(t){t.fn.textareaCount=function(e,n){function i(){return p.html(a()),void 0!==n&&n.call(this,s()),!0}function a(){var t=h.val(),n=t.length;if(e.maxCharacterSize>0){n>=e.maxCharacterSize&&(t=t.substring(0,e.maxCharacterSize));var i=c(t),a=e.maxCharacterSize-i;if(l()||(a=e.maxCharacterSize),n>a){var s=this.scrollTop;h.val(t.substring(0,a)),this.scrollTop=s}p.removeClass(e.warningStyle),a-n<=e.warningNumber&&p.addClass(e.warningStyle),b=h.val().length+i,l()||(b=h.val().length),w=d(u(h.val())),g=m-b}else{i=c(t);b=h.val().length+i,l()||(b=h.val().length),w=d(u(h.val()))}return r()}function r(){var t=e.displayFormat;return t=(t=t.replace("#input",b)).replace("#words",w),m>0&&(t=(t=t.replace("#max",m)).replace("#left",g)),t}function s(){return{input:b,max:m,left:g,words:w}}function o(t){return t.next(".charleft")}function l(){return-1!=navigator.appVersion.toLowerCase().indexOf("win")}function c(t){for(var e=0,n=0;n').prependTo(i).find("ul"),c="";o.each(function(){var e=t(this),n=e.data("section-title")||"";e.attr("id","scrollto-section-"+r);var i=s.titles?""+n+"":"";c+='
  • '+i+"
  • ",r++});var u=t(c).appendTo(l),d=u.map(function(){var e=t(t(this).find("a").attr("href"));if(e[0])return e});return u.on("click",function(e){var n=t(this).find("a").attr("href"),a="#"===n?0:t(n).offset().top;t("html, body").stop().animate({scrollTop:a-s.topOffset},s.scrollDuration,s.easing,function(){i.trigger("scrolled-to-section").stop()}),e.preventDefault()}),a.on("scroll",function(){var e,r=a.scrollTop()+a.height()/2.5,s=d.map(function(){if(t(this).offset().top