/* SECTION 1: SITE STAT CODE FRAGMENT */ function sitestat(ns_l,ns_0){ ns_l+='&ns__t='+(new Date()).getTime();ns_pixelUrl=ns_l; $('#refererDebug').append('

JAVASCRIPT referer is '+ns_0+'

'); ns_0=(ns_0.lastIndexOf('/')==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf('/'),0):ns_0; if(ns_0.length>0)ns_l+='&ns_referrer='+escape(ns_0); if(document.images){ns_1=new Image();ns_1.src=ns_l;}else document.write('\"\"'); } /* SECTION 2: DYNAMIC HEADLINES */ curHeadline=-1; headlines=[]; headlines[0]={headline1:'FREE',headline2:'parking at Tenpin!'}; headlines[1]={headline1:'Welcome!',headline2:'Welcome to Tenpin online...'}; headlines[2]={headline1:'New student discount nights',headline2:'check out your local Tenpin for details'}; /* SECTION 3: DYNAMIC QUOTES */ curQuote=-1; curQuoteKaraoke=-1; allQuotes={}; allQuotes.KARAOKE=[]; allQuotes.KARAOKE[0]={phrase:'Thanks for a fab night of Karaoke, cocktails and great hospitality…',name:'Jennifer',date:'27/07/2010'}; allQuotes.KARAOKE[1]={phrase:'It should be on the NHS, fantastic de-stress!',name:'Liz',date:'27/07/2010'}; allQuotes.KARAOKE[2]={phrase:'Sing Dizzy certainly know how to throw a party!',name:'Sarah',date:'27/07/2010'}; allQuotes.KARAOKE[3]={phrase:'Sing Dizzy is simply the best place on earth!',name:'Nick',date:'27/07/2010'}; allQuotes.KARAOKE[4]={phrase:'Simply the best way to hang out with friends and sing…',name:'Andrew',date:'27/07/2010'}; allQuotes.KARAOKE[5]={phrase:'Sing Dizzy is my favourite place in the world ever…',name:'Laura',date:'27/07/2010'}; allQuotes.MAIN=[]; allQuotes.MAIN[0]={phrase:'TENPIN CHESHIRE OAKS RULES ! ! ! ! !',name:'Benjamin Thomas Swash',date:''}; allQuotes.MAIN[1]={phrase:'TENPIN SUNDERLAND BABY!!!!!',name:'Adam Hudson',date:''}; allQuotes.MAIN[2]={phrase:'I LUV TENPIN!! where excitment strikes... EVERYTIME!!!!!',name:'April McCarthy',date:''}; allQuotes.MAIN[3]={phrase:'I\'m goin tonight in wrexham, well ace',name:'Hannah Rosemary Gater',date:''}; allQuotes.MAIN[4]={phrase:'TENPIN C.OAKS IS THE WAY 4WARD',name:'Dionne Maxwell',date:''}; allQuotes.MAIN[5]={phrase:'WOOOO!!! GO TENPIN WREXHAM!!!',name:'Jimmy Adams',date:''}; allQuotes.MAIN[6]={phrase:'Lovin the new tenpin in wrexham',name:'Rebecca Riding',date:''}; allQuotes.MAIN[7]={phrase:'Whoop whoop love bowling! X',name:'Jazz Torrence',date:''}; allQuotes.MAIN[8]={phrase:'Love Tenpin at Star City. Will be heading there next week with a few friends. I\'m rubbish at it, but I love bowling!',name:'Elizabeth Fleming',date:''}; allQuotes.MAIN[9]={phrase:'Me and my girl off to have a wicked night tomorrow at Sixfields, Northampton. 2 pints and the ball\'s in the gutter. Lol',name:'A.j. Stevenson',date:''}; allQuotes.MAIN[10]={phrase:'It\'s my boy Harry\'s birthday tomorrow, cant wait to bowl!',name:'Frances Elizabeth Weeks',date:''}; allQuotes.MAIN[11]={phrase:'My birthday on Monday, me and my mate\'s are going on Sat. can\'t wait, whoop whoop xxx',name:'Adam Beaumont',date:''}; allQuotes.MAIN[12]={phrase:'I\'ve just looked for 3 games for 2 adults + 6 kids 14 and under with a bite (cheese burger) for everyone and it come to £94.50 bargain!!',name:'Gudrun Reynolds',date:''}; allQuotes.MAIN[13]={phrase:'Had Party at Tenpin for my 6 year old and her friends. Different to the usual soft play thing and worth every penny',name:'Sime Sawyers',date:''}; allQuotes.MAIN[14]={phrase:'Going today and really looking forward to it!',name:'Jack Palmer',date:''}; allQuotes.MAIN[15]={phrase:'I have booked it through the website and saved a fortune - cant wait!!',name:'Nichola Brennan',date:''}; allQuotes.MAIN[16]={phrase:'Taking my 5 year old to Swansea bowling today - only just discovered the joys of bowling and we love it! heh',name:'Anthony Poole',date:''}; allQuotes.MAIN[17]={phrase:'Wicked!',name:'Hayley Mcneil',date:''}; allQuotes.MAIN[18]={phrase:'I lovee Tenpin...',name:'Lorna Holly\' Pulsford',date:''}; allQuotes.MAIN[19]={phrase:'Bowling Today! In 10 Hours! So Excited!',name:'Joe Carswell',date:''}; allQuotes.MAIN[20]={phrase:'I can\'t wait to go bowling, thanks for making this dream happen!',name:'Eleanor Duncan',date:''}; /* SECTION 3 - jQuery */ $(document).ready(function(){ //Tab box stuff $('#tab-box div.content').css("display","none"); $('#tab-box div.content').eq(0).css("display","block"); $('#tabs li').click(function(){ var index = $('#tabs li').index(this); var tab = $(this); if (tab.hasClass('on')) { } else { $('#tabs li').removeClass('on'); tab.addClass('on'); $('#tab-box div.content').css("display","none"); $('#tab-box div.content').eq(index).css("display","block"); } }); //Show location pop-up when town link is clicked (showing on mouseover would obscure some towns...) $('#locations #towns div div > a').click(function(){ $('#locations #towns > div > div').css({"position" : "static", "z-index" : "1000"}); // to fix IE6 z-index bug $(this).parent().css({"position" : "relative", "z-index" : "5000"}); // ditto $('#locations #towns div div .pop-up').css("display","none"); $(this).next().css("display","block"); return false; }); $('#locations #towns .pop-up').mouseleave(function(){ $(this).css("display","none"); }); // Use PNG fix (http://www.dillerdesign.com/experiment/DD_belatedPNG/) to get PNG transparency working in IE6 if ($.browser.msie && $.browser.version.substr(0,1)<7) { DD_belatedPNG.fix('img, #meta li.facebook, #header, .box-thin-top, .box-thin-bottom, .box-med-top, .box-med-bottom, .box-wide-top, .box-wide-bottom, #find-nearest-1 .content, #find-nearest-2 .content, #find-nearest-2 a.book-online-now, #book-online, #what-next, #locations .content, #locations .content a.icon, form#postcode-search, #tabs li, #tabs li a, #tabs li.on, #tabs li.on a, #tab-box, #tab-box-bottom, #tab-box, #tab-box-bottom'); } $("#tenpinSlides").jKlikFlow({ width: "638px", height: "223px", easing: "easeOutBack", prev: "#jFlowPrev", next: "#jFlowNext", duration: 1000, pauseBetweenSlides: 2500, auto: false }); newHeadline(); if ($("#quote-block").length > 0) newQuote(); if ($("#quote-block-karaoke").length > 0) newQuoteKaraoke(); }); /* SECTION 4 - Google Analytics */ var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-18054217-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); /* SECTION 5 - Tenpin specific JS functions */ function newHeadline() { curHeadline=Math.floor(Math.random()*(headlines.length)); $('#the-headline').attr("style","margin-left:0px"); headline=""+headlines[curHeadline].headline1+" | "+headlines[curHeadline].headline2; $('#news').html("
"+headline+"
"); if ($('#the-headline').width()<$('#news').width()) { setTimeout("newHeadline();",5000); } else { setTimeout("animateHeadline();",3000); } /* alert("the-headline.width="+$('#the-headline').width()+" and news.width="+$('#news').width()); */ } function animateHeadline() { // How long is the current headline? (roughly 6px per char) pixelsToShift=(6*(headlines[curHeadline].headline1.length+headlines[curHeadline].headline2.length)); $('#the-headline').animate({marginLeft: "-"+pixelsToShift+"px"},pixelsToShift*15,"linear",newHeadline); } function newQuote() { curQuote=Math.floor(Math.random()*(allQuotes.MAIN.length)); $('#the-quote').attr("style","margin-left:0px"); phrase=allQuotes.MAIN[curQuote].phrase+" "+allQuotes.MAIN[curQuote].name+" "+allQuotes.MAIN[curQuote].date+""; $('#quote-block').html("
"+phrase+"
"); if ($('#the-quote').width()<$('#quote-block').width()) { setTimeout("newQuote();",6000); } else { setTimeout("animateQuote();",6000); } } function animateQuote() { // How long is the current phrase? (roughly 10px per char) pixelsToShift=(10*(allQuotes.MAIN[curQuote].phrase.length+allQuotes.MAIN[curQuote].name.length+allQuotes.MAIN[curQuote].date.length)); $('#the-quote').animate({marginLeft: "-"+pixelsToShift+"px"},pixelsToShift*15,"linear",newQuote); } function newQuoteKaraoke() { curQuoteKaraoke=Math.floor(Math.random()*(allQuotes.KARAOKE.length)); $('#the-quote-karaoke').attr("style","margin-left:0px"); phrase=allQuotes.KARAOKE[curQuoteKaraoke].phrase+" "+allQuotes.KARAOKE[curQuoteKaraoke].name+" "+allQuotes.KARAOKE[curQuoteKaraoke].date+""; $('#quote-block-karaoke').html("
"+phrase+"
"); if ($('#the-quote-karaoke').width()<$('#quote-block-karaoke').width()) { setTimeout("newQuoteKaraoke();",6000); } else { setTimeout("animateQuoteKaraoke();",6000); } } function animateQuoteKaraoke() { // How long is the current phrase? (roughly 5px per char) pixelsToShift=(5*(allQuotes.KARAOKE[curQuoteKaraoke].phrase.length+allQuotes.KARAOKE[curQuoteKaraoke].name.length+allQuotes.KARAOKE[curQuoteKaraoke].date.length)); $('#the-quote-karaoke').animate({marginLeft: "-"+pixelsToShift+"px"},pixelsToShift*15,"linear",newQuoteKaraoke); } var qWindow = ''; function qOpen(url) { if (!qWindow.closed && qWindow.location){ qWindow.location=url; } else { qWindow = window.open(url, '_blank', "height=620, width=960, top=30, left=30, status=yes, toolbar=no, menubar=no, location=no, scrollbars=yes, resizable=yes", true); if (!qWindow.opener) qWindow.opener = self; } qWindow.focus(); return false; } function cl(goWhere) { document.location.href=goWhere; }