/*!
 * jQuery Tools v1.2.5 - The missing UI library for the Web
 * 
 * scrollable/scrollable.js
 * scrollable/scrollable.autoscroll.js
 * scrollable/scrollable.navigator.js
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 */
(function(g){g.tools=g.tools||{version:"v1.2.5"},g.tools.scrollable={conf:{activeClass:"active",circular:!1,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:!0,mousewheel:!1,next:".next",prev:".prev",speed:1500,vertical:!1,touch:!0,wheelSpeed:0}};function f(k,e){var m=parseInt(k.css(e),10);if(m){return m}var l=k[0].currentStyle;return l&&l.width&&parseInt(l.width,10)}function j(a,k){var e=g(k);return e.length<2?e:a.parent().find(k)}var i;function h(x,w){var v=this,u=x.add(v),t=x.children(),s=0,r=w.vertical;i||(i=v),t.length>1&&(t=g(w.items,x)),g.extend(v,{getConf:function(){return w},getIndex:function(){return s},getSize:function(){return v.getItems().size()},getNaviButtons:function(){return d.add(c)},getRoot:function(){return x},getItemWrap:function(){return t},getItems:function(){return t.children(w.item).not("."+w.clonedClass)},move:function(k,e){return v.seekTo(s+k,e)},next:function(b){return v.move(1,b)},prev:function(b){return v.move(-1,b)},begin:function(b){return v.seekTo(0,b)},end:function(b){return v.seekTo(v.getSize()-1,b)},focus:function(){i=v;return v},addItem:function(e){e=g(e),w.circular?(t.children("."+w.clonedClass+":last").before(e),t.children("."+w.clonedClass+":first").replaceWith(e.clone().addClass(w.clonedClass))):t.append(e),u.trigger("onAddItem",[e]);return v},seekTo:function(o,B,z){o.jquery||(o*=1);if(w.circular&&o===0&&s==-1&&B!==0){return v}if(!w.circular&&o<0||o>v.getSize()||o<-1){return v}var y=o;o.jquery?o=v.getItems().index(o):y=v.getItems().eq(o);var e=g.Event("onBeforeSeek");if(!z){u.trigger(e,[o,B]);if(e.isDefaultPrevented()||!y.length){return v}}var A=r?{top:-y.position().top}:{left:-y.position().left};s=o,i=v,B===undefined&&(B=w.speed),t.animate(A,B,w.easing,z||function(){u.trigger("onSeek",[o])});return v}}),g.each(["onBeforeSeek","onSeek","onAddItem"],function(e,k){g.isFunction(w[k])&&g(v).bind(k,w[k]),v[k]=function(l){l&&g(v).bind(k,l);return v}});if(w.circular){var q=v.getItems().slice(-1).clone().prependTo(t),p=v.getItems().eq(1).clone().appendTo(t);q.add(p).addClass(w.clonedClass),v.onBeforeSeek(function(k,e,l){if(!k.isDefaultPrevented()){if(e==-1){v.seekTo(q,l,function(){v.end(0)});return k.preventDefault()}e==v.getSize()&&v.seekTo(p,l,function(){v.begin(0)})}}),v.seekTo(0,0,function(){})}var d=j(x,w.prev).click(function(){v.prev()}),c=j(x,w.next).click(function(){v.next()});!w.circular&&v.getSize()>1&&(v.onBeforeSeek(function(k,e){setTimeout(function(){k.isDefaultPrevented()||(d.toggleClass(w.disabledClass,e<=0),c.toggleClass(w.disabledClass,e>=v.getSize()-1))},1)}),w.initialIndex||d.addClass(w.disabledClass)),w.mousewheel&&g.fn.mousewheel&&x.mousewheel(function(k,e){if(w.mousewheel){v.move(e<0?1:-1,w.wheelSpeed||50);return !1}});if(w.touch){var a={};t[0].ontouchstart=function(k){var e=k.touches[0];a.x=e.clientX,a.y=e.clientY},t[0].ontouchmove=function(k){if(k.touches.length==1&&!t.is(":animated")){var e=k.touches[0],m=a.x-e.clientX,l=a.y-e.clientY;v[r&&l>0||!r&&m>0?"next":"prev"](),k.preventDefault()}}}w.keyboard&&g(document).bind("keydown.scrollable",function(e){if(w.keyboard&&!e.altKey&&!e.ctrlKey&&!g(e.target).is(":input")){if(w.keyboard!="static"&&i!=v){return}var k=e.keyCode;if(r&&(k==38||k==40)){v.move(k==38?-1:1);return e.preventDefault()}if(!r&&(k==37||k==39)){v.move(k==37?-1:1);return e.preventDefault()}}}),w.initialIndex&&v.seekTo(w.initialIndex,0,function(){})}g.fn.scrollable=function(a){var d=this.data("scrollable");if(d){return d}a=g.extend({},g.tools.scrollable.conf,a),this.each(function(){d=new h(g(this),a),g(this).data("scrollable",d)});return a.api?d:this}})(jQuery);(function(d){var c=d.tools.scrollable;c.autoscroll={conf:{autoplay:!0,interval:3000,autopause:!0}},d.fn.autoscroll=function(f){typeof f=="number"&&(f={interval:f});
var b=d.extend({},c.autoscroll.conf,f),a;this.each(function(){var e=d(this).data("scrollable");e&&(a=e);var h,g=!0;e.play=function(){h||(g=!1,h=setInterval(function(){e.next()},b.interval))},e.pause=function(){h=clearInterval(h)},e.stop=function(){e.pause(),g=!0},b.autopause&&e.getRoot().add(e.getNaviButtons()).hover(e.pause,e.play),b.autoplay&&e.play()});return b.api?a:this}})(jQuery);(function(e){var d=e.tools.scrollable;d.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,idPrefix:null,history:!1}};function f(a,h){var g=e(h);return g.length<2?g:a.parent().find(h)}e.fn.navigator=function(b){typeof b=="string"&&(b={navi:b}),b=e.extend({},d.navigator.conf,b);var a;this.each(function(){var u=e(this).data("scrollable"),t=b.navi.jquery?b.navi:f(u.getRoot(),b.navi),s=u.getNaviButtons(),r=b.activeClass,q=b.history&&e.fn.history;u&&(a=u),u.getNaviButtons=function(){return s.add(t)};function p(g,i,h){u.seekTo(i);if(q){location.hash&&(location.hash=g.attr("href").replace("#",""))}else{return h.preventDefault()}}function o(){return t.find(b.naviItem||"> *")}function n(g){var h=e("<"+(b.naviItem||"a")+"/>").click(function(i){p(e(this),g,i)}).attr("href","#"+g);g===0&&h.addClass(r),b.indexed&&h.text(g+1),b.idPrefix&&h.attr("id",b.idPrefix+g);return h.appendTo(t)}o().length?o().each(function(g){e(this).click(function(h){p(e(this),g,h)})}):e.each(u.getItems(),function(g){n(g)}),u.onBeforeSeek(function(h,g){setTimeout(function(){if(!h.isDefaultPrevented()){var i=o().eq(g);!h.isDefaultPrevented()&&i.length&&o().removeClass(r).eq(g).addClass(r)}},1)});function c(h,g){var i=o().eq(g.replace("#",""));i.length||(i=o().filter("[href="+g+"]")),i.click()}u.onAddItem(function(g,h){h=n(u.getItems().index(h)),q&&h.history(c)}),q&&o().history(c)});return b.api?a:this}})(jQuery);$(function(){if($("#popup").length){$(window).bind("resize load",function(){$("#popup-content").css("top",($(window).height()-278)/2)});$("#popup-overlay, #popup-close").bind("click",function(){$("#popup").fadeOut();return false})}$(".fscrollable").scrollable({circular:true}).navigator().autoscroll(5000);$(".inputClear").focus(function(){if(!$(this).attr("rel")){$(this).attr("rel",$(this).val()).val("")}else{if($(this).val()==$(this).attr("rel")){$(this).val("")}}}).blur(function(){if($(this).val()==""){$(this).val($(this).attr("rel"))}});(function(b){b.fn.checkEmail=function(){var c;this.each(function(){var d=b(this).val();c=d.indexOf("@")==-1||d.lastIndexOf(".")==-1?false:true});return c}})(jQuery);$("#baf_return").hide();$("#baf").submit(function(){chkeml=$("#baf_eml").checkEmail();if(chkeml){$.ajax({type:"POST",url:"media/php/process.php",data:"emailadd="+$("#baf_eml").val(),success:function(b){$("#baf_return").html(b).fadeIn();$("#baf_eml").val("")}})}else{$("#baf_return").html("Please enter a valid email address.").fadeIn().delay(1900).slideUp()}return false});$("#baf_return").hide();$("#baf").submit(function(){chkeml=$("#baf_eml").checkEmail();fname=$("#baf_fname").val();sname=$("#baf_sname").val();emlval=$("#sign_up_email input").val();if(chkeml){$.ajax({type:"GET",url:"media/php/process.php",data:"emailadd="+emlval+"&fname="+fname+"&sname="+sname,success:function(b){switch(b){case"failed":message="Error adding to the database";$("#baf_return").html(message).fadeIn();$("#baf_eml, #baf_fname, #baf_sname");break;case"success":message="Thank you. Your email has been added to our database.";$("#baf_return").html(message).fadeIn();$("#baf input").not("#join").val("");break;case"email":message="Your email address is already registered";$("#baf_return").html(message).fadeIn();$("#baf_eml, #baf_fname, #baf_sname");$("#baf_return").delay(1900).slideUp();break}}})}else{$("#baf_return").html("Please supply a valid email address.").slideDown();$("#baf_return").delay(1900).html("Please supply a valid email address.").slideUp()}return false});$("#thumbs").scrollable({circular:true,next:".g_next",prev:".g_prev"}).autoscroll(5000);var a=$("#showhideother");a.toggle(function(){$("#other_restaurants").animate({duration:2000,queue:false,height:100});$("#expand").animate({duration:2000,queue:false,height:100})},function(){$("#other_restaurants").animate({duration:2000,queue:false,height:6});$("#expand").animate({duration:2000,queue:false,height:0})});var a=$("#showhidetext");a.toggle(function(){$("#lower_content").slideUp("slow",function(){a.html("Show text")})},function(){$("#lower_content").slideDown("slow",function(){a.html("Hide text")})});(function(){var b=$("#changer_button");var c=$(".changer>div");c.eq(0).hide();b.click(function(){c.hide().eq(0).show();b.hide();return false})})()});window.onload=function(){var c=window.location.href;c=c.split("/");c=c[c.length-1];if(c==="index.php"||c===""){var a=0;var b=$("#app_tooltip");b.css({display:"block"});while(a<5){b.animate({bottom:-95}).animate({bottom:-85});a++}b.animate({opacity:0})}};
