
$("#sb_what").focus(function(){if($("#sb_what").val()=="Type and wait..."){$("#sb_what").val("");}});$("#sb_what").blur(function(){if($("#sb_what").val()==""){$(this).val("Type and wait...");}});function select_item(){$("#sb_search").submit();}
$("#sb_what").result(select_item);function formatItem(row){if(row[1]){return row[0]+"<br><i>"+row[1]+"</i>";}
else{return row[0];}}
$(document).ready(function(){$("textarea.review").autogrow();$("#sb_what").autocomplete("ac_search_what.php",{minChars:2,max:12,formatItem:formatItem,onItemSelect:select_item,scrollHeight:300});$("span.location").each(function(intIndex){var businessid=$(this).children('input.businessid').val();$(this).html(" <small><a class=\"emtipmap\" href=\"#\" title=\"Location map\" rel=\""+businessid+"\">[map]</a><small>");});var sketchLink='<a id="comment_sketchlink" href="/" title="Reveal drawing tool" onclick="showDrawingTool(); return false;">Reveal drawing tool</a>';$('.comment_sketch').html(sketchLink);$('#comment_rating_text').html('Click on the left to rate');$('#comment_rating').addClass('commentStars');$('#comment_rating').html("<a href='/' onmouseover='ratingHover(&quot;0.5&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;0.5&quot;); return false;' title='Rate this 0.5 star out of 5'><img src='images/trans.gif' width='8' height='16' alt='0.5' /></a><a href='/' onmouseover='ratingHover(&quot;1.0&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;1.0&quot;); return false;' title='Rate this 1 star out of 5'><img src='images/trans.gif' width='8' height='16' alt='1' /></a><a href='/' onmouseover='ratingHover(&quot;1.5&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;1.5&quot;); return false;' title='Rate this 1.5 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='1.5' /></a><a href='/' onmouseover='ratingHover(&quot;2.0&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;2.0&quot;); return false;' title='Rate this 2 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='2' /></a><a href='/' onmouseover='ratingHover(&quot;2.5&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;2.5&quot;); return false;' title='Rate this 2.5 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='2.5' /></a><a href='/' onmouseover='ratingHover(&quot;3.0&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;3.0&quot;); return false;' title='Rate this 3 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='3' /></a><a href='/' onmouseover='ratingHover(&quot;3.5&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;3.5&quot;); return false;' title='Rate this 3.5 star out of 5'><img src='images/trans.gif' width='8' height='16' alt='3.5' /></a><a href='/' onmouseover='ratingHover(&quot;4.0&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;4.0&quot;); return false;' title='Rate this 4 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='4' /></a><a href='/' onmouseover='ratingHover(&quot;4.5&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;4.5&quot;); return false;' title='Rate this 4.5 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='4.5' /></a><a href='/' onmouseover='ratingHover(&quot;5.0&quot;);' onmouseout='ratingReturn();' onclick='setRating(&quot;5.0&quot;); return false;' title='Rate this 5 stars out of 5'><img src='images/trans.gif' width='8' height='16' alt='5' /></a>");$("a.emtipclose").hover(function(){$(this).addClass("cursor_help");},function(){$(this).removeClass("cursor_help");});$.cluetip.setup({insertionType:'prependTo',insertionElement:'#body'});$('a.emtipclose').cluetip({activation:'click',cluetipClass:'emtipclose',arrows:false,dropShadow:false,sticky:true,mouseOutClose:false,closePosition:'title',closeText:'<img src="images/close.gif" alt="close" width="13" height="13" />'});$('a.emtipsmall').cluetip({clickThrough:false,cluetipClass:'emtip',arrows:true,width:254,positionBy:'auto',dropShadow:false,tracking:false,sticky:false,mouseOutClose:true,hoverIntent:{sensitivity:3,interval:250,timeout:0},fx:{open:'fadeIn',openSpeed:'500'}});$('a.emtipprofile').cluetip({clickThrough:true,cluetipClass:'emtip',arrows:true,width:254,positionBy:'auto',dropShadow:false,tracking:false,sticky:false,mouseOutClose:true,hoverIntent:{sensitivity:3,interval:250,timeout:0},fx:{open:'fadeIn',openSpeed:'500'}});$('a.emtipmed').cluetip({clickThrough:false,cluetipClass:'emtip',arrows:true,width:504,positionBy:'auto',dropShadow:false,tracking:false,sticky:false,mouseOutClose:true,hoverIntent:{sensitivity:3,interval:250,timeout:0},fx:{open:'fadeIn',openSpeed:'500'}});$('a.emtipscroll').cluetip({activation:'click',cluetipClass:'emtipscroll',arrows:false,width:504,positionBy:'mouse',dropShadow:false,sticky:true,mouseOutClose:false,closePosition:'title',closeText:'<img src="images/close.gif" alt="close" width="13" height="13" />'});$('a.emtiphover').cluetip({cluetipClass:'emtip',arrows:false,dropShadow:false,sticky:false,mouseOutClose:true,hoverIntent:true});$('a.emtipmap').cluetip({showTitle:false,titleAttribute:'none',cluetipClass:'emtipmap',arrows:true,width:254,height:254,positionBy:'auto',dropShadow:false,tracking:false,sticky:false,mouseOutClose:true,hoverIntent:{sensitivity:3,interval:250,timeout:0},fx:{open:'fadeIn',openSpeed:'500'}});$('a[href*=#]').click(function(){if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){var $target=$(this.hash);$target=$target.length&&$target||$('[name='+this.hash.slice(1)+']');if($target.length){var targetOffset=$target.offset().top;$('html,body').animate({scrollTop:targetOffset},1000);return false;}}});$('.commentimagereplace').click(function(){var commentid=$(this).children('.commentimage').attr('rel');var swf='media/drawsketch.swf?id='+commentid;$(this).children('.commentimage').remove();$(this).flash({src:swf,width:220,height:160,flashvars:{id:commentid}});$(this).unbind("click");$(this).unbind("hover");});$('.commentimagereplace').hover(function(){var hoverText='<span class="hoverSketchText">Click here to see how the sketch was drawn</span>';$(this).addClass("hover");$(this).append(hoverText);$(this).children('.commentimage').fadeTo("fast",0.3);},function(){$(this).removeClass("hover");$(this).children('.hoverSketchText').remove();$(this).children('.commentimage').fadeTo("fast",1.0);});var businessid=$("#businessid").val();if($('#fivepmoffers').is('*')){$("#fivepmoffers").html("<p><img src=\"images/loading_em.gif\" width=50 height=30 alt=\"Loading...\" /></p>");var fivepmpagetoget="/get5pmoffers.php?id="+businessid;$.ajax({type:"GET",url:fivepmpagetoget,dataType:"html",success:function(fivepmhtml){$("#fivepmoffers").html(fivepmhtml);}});}
if($('#toptableoffers').is('*')){$("#toptableoffers").html("<p><img src=\"images/loading_em.gif\" width=50 height=30 alt=\"Loading...\" /></p>");var toptablepagetoget="/gettoptableoffers.php?id="+businessid;$.ajax({type:"GET",url:toptablepagetoget,dataType:"html",success:function(toptablehtml){$("#toptableoffers").html(toptablehtml);}});}
$("a.evevelink").click(function(){window.open($(this).attr('href'),'','height=420,width=450,scrolling=auto,location=no,status=yes,toolbar=no');var businessid=$("#businessid").val();var track="/outgoing/eveve/"+businessid;pageTracker._trackPageview(track);return false;});$("a.livebookingslink").click(function(){var businessid=$("#businessid").val();var track="/outgoing/livebookings/"+businessid;pageTracker._trackPageview(track);return false;});$("a.justeatlink").click(function(){var businessid=$("#businessid").val();var track="/outgoing/justeat/"+businessid;pageTracker._trackPageview(track);return true;});$("a.fivepmlink").click(function(){var businessid=$("#businessid").val();var track="/outgoing/fivepm/"+businessid;pageTracker._trackPageview(track);return true;});$("a.toptablelink").click(function(){var businessid=$("#businessid").val();var track="/outgoing/toptable/"+businessid;pageTracker._trackPageview(track);return true;});$("a.livebookingslink").click(function(){var businessid=$("#businessid").val();var track="/outgoing/livebookings/"+businessid;pageTracker._trackPageview(track);return true;});});