(function(b,a){b.fn.scrollbar=function(d){var c=b.extend({},b.fn.scrollbar.defaults,d);return this.each(function(){var e=b(this),f={arrows:c.arrows};if(c.containerHeight!="auto"){e.height(c.containerHeight)}f.containerHeight=e.height();f.contentHeight=b.fn.scrollbar.contentHeight(e);if(f.contentHeight<=f.containerHeight){return true}var g=new b.fn.scrollbar.Scrollbar(e,f,c);g.buildHtml().initHandle().appendEvents()})};b.fn.scrollbar.defaults={containerHeight:"auto",arrows:true,handleHeight:"auto",handleMinHeight:30,scrollSpeed:50,scrollStep:20,scrollSpeedArrows:40,scrollStepArrows:3};b.fn.scrollbar.Scrollbar=function(c,e,d){this.container=c;this.props=e;this.opts=d;this.mouse={};this.props.arrows=this.container.hasClass("no-arrows")?false:this.props.arrows};b.fn.scrollbar.Scrollbar.prototype={buildHtml:function(){this.container.children().wrapAll('<div class="scrollbar-pane"/>');this.container.append('<div class="scrollbar-handle-container"><div class="scrollbar-handle"/></div>');if(this.props.arrows){this.container.append('<div class="scrollbar-handle-up"/>').append('<div class="scrollbar-handle-down"/>')}var c=this.container.height();this.pane=this.container.find(".scrollbar-pane");this.handle=this.container.find(".scrollbar-handle");this.handleContainer=this.container.find(".scrollbar-handle-container");this.handleArrows=this.container.find(".scrollbar-handle-up, .scrollbar-handle-down");this.handleArrowUp=this.container.find(".scrollbar-handle-up");this.handleArrowDown=this.container.find(".scrollbar-handle-down");this.pane.defaultCss({top:0,left:0});this.handleContainer.defaultCss({right:0});this.handle.defaultCss({top:0,right:0});this.handleArrows.defaultCss({right:0});this.handleArrowUp.defaultCss({top:0});this.handleArrowDown.defaultCss({bottom:0});this.container.css({position:this.container.css("position")==="absolute"?"absolute":"relative",overflow:"hidden",height:c});this.pane.css({position:"absolute",overflow:"visible",height:"auto"});this.handleContainer.css({position:"absolute",top:this.handleArrowUp.outerHeight(true),height:(this.props.containerHeight-this.handleArrowUp.outerHeight(true)-this.handleArrowDown.outerHeight(true))+"px"});this.handle.css({position:"absolute",cursor:"pointer"});this.handleArrows.css({position:"absolute",cursor:"pointer"});return this},initHandle:function(){this.props.handleContainerHeight=this.handleContainer.height();this.props.contentHeight=this.pane.height();this.props.handleHeight=this.opts.handleHeight=="auto"?Math.max(Math.ceil(this.props.containerHeight*this.props.handleContainerHeight/this.props.contentHeight),this.opts.handleMinHeight):this.opts.handleHeight;this.handle.height(this.props.handleHeight);this.handle.height(2*this.handle.height()-this.handle.outerHeight(true));this.props.handleTop={min:0,max:this.props.handleContainerHeight-this.props.handleHeight};this.props.handleContentRatio=(this.props.contentHeight-this.props.containerHeight)/(this.props.handleContainerHeight-this.props.handleHeight);this.handle.top=0;return this},appendEvents:function(){this.handle.bind("mousedown.handle",b.proxy(this,"startOfHandleMove"));this.handleContainer.bind("mousedown.handle",b.proxy(this,"onHandleContainerMousedown"));this.handleContainer.bind("mouseenter.container mouseleave.container",b.proxy(this,"onHandleContainerHover"));this.handleArrows.bind("mousedown.arrows",b.proxy(this,"onArrowsMousedown"));this.container.bind("mousewheel.container",b.proxy(this,"onMouseWheel"));this.container.bind("mouseenter.container mouseleave.container",b.proxy(this,"onContentHover"));this.handle.bind("click.scrollbar",this.preventClickBubbling);this.handleContainer.bind("click.scrollbar",this.preventClickBubbling);this.handleArrows.bind("click.scrollbar",this.preventClickBubbling);return this},mousePosition:function(c){return c.pageY||(c.clientY+(a.documentElement.scrollTop||a.body.scrollTop))||0},startOfHandleMove:function(c){c.preventDefault();c.stopPropagation();this.mouse.start=this.mousePosition(c);
this.handle.start=this.handle.top;b(a).bind("mousemove.handle",b.proxy(this,"onHandleMove")).bind("mouseup.handle",b.proxy(this,"endOfHandleMove"));this.handle.addClass("move");this.handleContainer.addClass("move")},onHandleMove:function(c){c.preventDefault();var d=this.mousePosition(c)-this.mouse.start;this.handle.top=this.handle.start+d;this.setHandlePosition();this.setContentPosition()},endOfHandleMove:function(c){b(a).unbind(".handle");this.handle.removeClass("move");this.handleContainer.removeClass("move")},setHandlePosition:function(){this.handle.top=(this.handle.top>this.props.handleTop.max)?this.props.handleTop.max:this.handle.top;this.handle.top=(this.handle.top<this.props.handleTop.min)?this.props.handleTop.min:this.handle.top;this.handle[0].style.top=this.handle.top+"px"},setContentPosition:function(){this.pane.top=-1*this.props.handleContentRatio*this.handle.top;this.pane[0].style.top=this.pane.top+"px"},onMouseWheel:function(c,d){this.handle.top-=d;this.setHandlePosition();this.setContentPosition();if(this.handle.top>this.props.handleTop.min&&this.handle.top<this.props.handleTop.max){c.preventDefault()}},onHandleContainerMousedown:function(d){d.preventDefault();if(!b(d.target).hasClass("scrollbar-handle-container")){return false}this.handle.direction=(this.handle.offset().top<this.mousePosition(d))?1:-1;this.handle.step=this.opts.scrollStep;var c=this;b(a).bind("mouseup.handlecontainer",function(){clearInterval(e);c.handle.unbind("mouseenter.handlecontainer");b(a).unbind("mouseup.handlecontainer")});this.handle.bind("mouseenter.handlecontainer",function(){clearInterval(e)});var e=setInterval(b.proxy(this.moveHandle,this),this.opts.scrollSpeed)},onArrowsMousedown:function(c){c.preventDefault();this.handle.direction=b(c.target).hasClass("scrollbar-handle-up")?-1:1;this.handle.step=this.opts.scrollStepArrows;b(c.target).addClass("move");var d=setInterval(b.proxy(this.moveHandle,this),this.opts.scrollSpeedArrows);b(a).one("mouseup.arrows",function(){clearInterval(d);b(c.target).removeClass("move")})},moveHandle:function(){this.handle.top=(this.handle.direction===1)?Math.min(this.handle.top+this.handle.step,this.props.handleTop.max):Math.max(this.handle.top-this.handle.step,this.props.handleTop.min);this.handle[0].style.top=this.handle.top+"px";this.setContentPosition()},onContentHover:function(c){if(c.type==="mouseenter"){this.container.addClass("hover");this.handleContainer.addClass("hover")}else{this.container.removeClass("hover");this.handleContainer.removeClass("hover")}},onHandleContainerHover:function(c){if(c.type==="mouseenter"){this.handleArrows.addClass("hover")}else{this.handleArrows.removeClass("hover")}},preventClickBubbling:function(c){c.stopPropagation()}};b.fn.scrollbar.contentHeight=function(e){var d=e.wrapInner("<div/>");var c=e.find(":first").css({overflow:"hidden"}).height();return c};b.fn.defaultCss=function(c){var d={right:"auto",left:"auto",top:"auto",bottom:"auto",position:"static"};return this.each(function(){var f=b(this);for(var e in c){if(f.css(e)===d[e]){f.css(e,c[e])}}})};b.event.special.mousewheel={setup:function(){if(this.addEventListener){this.addEventListener("mousewheel",b.fn.scrollbar.mouseWheelHandler,false);this.addEventListener("DOMMouseScroll",b.fn.scrollbar.mouseWheelHandler,false)}else{this.onmousewheel=b.fn.scrollbar.mouseWheelHandler}},teardown:function(){if(this.removeEventListener){this.removeEventListener("mousewheel",b.fn.scrollbar.mouseWheelHandler,false);this.removeEventListener("DOMMouseScroll",b.fn.scrollbar.mouseWheelHandler,false)}else{this.onmousewheel=null}}};b.fn.extend({mousewheel:function(c){return c?this.bind("mousewheel",c):this.trigger("mousewheel")},unmousewheel:function(c){return this.unbind("mousewheel",c)}});b.fn.scrollbar.mouseWheelHandler=function(h){var f=h||window.event,e=[].slice.call(arguments,1),i=0,g=true,d=0,c=0;h=b.event.fix(f);h.type="mousewheel";if(h.wheelDelta){i=h.wheelDelta/120}if(h.detail){i=-h.detail/3}if(f.axis!==undefined&&f.axis===f.HORIZONTAL_AXIS){c=0;
d=-1*i}if(f.wheelDeltaY!==undefined){c=f.wheelDeltaY/120}if(f.wheelDeltaX!==undefined){d=-1*f.wheelDeltaX/120}e.unshift(h,i,d,c);return b.event.handle.apply(this,e)}})(jQuery,document);window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console){console.log(Array.prototype.slice.call(arguments))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})(window.console=window.console||{});$.fn.chaChaSlide=function(c){var d={last:0,change:0};c&&$.extend(d,c);$(function(){timer=setTimeout(dothescroll,5000)});dothescroll=function(){current=$(".feature-items").css("left");current=parseInt(current);d.change==0&&(clone=$(".feature-items img:first-child").clone(),$(".feature-items").append(clone));d.change-=1020;$(".feature-items").animate({left:d.change+"px"},500,function(){if(d.change==d.last){$(".feature-items").css({left:"0px"}),d.change=0,$(".feature-items img:last-child").remove()}});timer=setTimeout(dothescroll,5000)}};$.fn.chaSlide=function(a){var b={last:0,change:0};if(a){$.extend(b,a)}$(function(){timer=setTimeout(dothescroll2,10000)});dothescroll2=function(){current=$(".event-items").css("left");current=parseInt(current);if(b.change==0){clone=$(".event-items .event:first-child").clone();$(".event-items").append(clone)}b.change=b.change-283;$(".event-items").animate({left:b.change+"px"},500,function(){if(b.change==b.last){$(".event-items").css({left:"0px"});b.change=0;$(".event-items .event:last-child").remove()}});timer=setTimeout(dothescroll2,10000);$("#events-nav .current").addClass("woff").removeClass("current");$("#events-nav .next").addClass("wcurrent").removeClass("next");$("#events-nav .off").addClass("wnext").removeClass("off");$("#events-nav .woff").addClass("off").removeClass("woff");$("#events-nav .wcurrent").addClass("current").removeClass("wcurrent");$("#events-nav .wnext").addClass("next").removeClass("wnext")}};$.fn.bafnames=function(a){settings={table:"deafult",success:"Thank you",scripturl:""};if(a){$.extend(settings,a)}$(this).submit(function(){$(this).addClass("bafform");baffirstname=$(".bafform input:first-child").val();bafsurname=$(".bafform input:nth-child(2)").val();bafemailaddress=$(".bafform input:nth-child(3)").val();validdata=1;$.ajax({type:"POST",url:"./baf.php",data:"function=validate&firstname="+baffirstname+"&surname="+bafsurname+"&email="+bafemailaddress,success:function(b){if(b!=1){$(".bafform .return").addClass("baferror");$(".bafform .return p").html(b);validdata=0}if(validdata==1){$.ajax({type:"POST",url:"./baf.php",data:"function=add&firstname="+baffirstname+"&surname="+bafsurname+"&email="+bafemailaddress+"&table="+settings.table,success:function(c){if(c!=1){$(".bafform .return").addClass("baferror");$(".bafform .return p").html(c)}else{$(".bafform .return").addClass("bafsuccess");$(".bafform .return p").html(settings.success)}}})}}});return false})};$.fn.baf=function(a){settings={table:"deafult",success:"Thank you",scripturl:""};if(a){$.extend(settings,a)}$(this).submit(function(){$(this).addClass("bafform");bafemailaddress=$(".bafform input:first-child").val();validdata=1;$.ajax({type:"POST",url:"./baf.php",data:"function=validate&firstname=0&surname=0&email="+bafemailaddress,success:function(b){if(b!=1){$(".bafform .return").addClass("baferror");$(".bafform .return p").html(b);validdata=0}if(validdata==1){$.ajax({type:"POST",url:"./baf.php",data:"function=add&firstname=0&surname=0&email="+bafemailaddress+"&table="+settings.table,success:function(c){if(c!=1){$(".bafform .return").addClass("baferror");$(".bafform .return p").html(c)}else{$(".bafform .return").addClass("bafsuccess");$(".bafform .return p").html(settings.successmsg)}}})}}});return false})};$.fn.accordion=function(a){var d={effect:"slide",collapse:true,addsClass:"acc_current"};var a=$.extend(d,a);var b;var c;return this.each(function(e){var g=a.addsClass;var f=a.effect;var j=a.collapse;var h=$(this);h.children().each(function(k){if(k==0){b=this.nodeName}if(k==1){c=this.nodeName
}});h.children(c).hide();h.children(b).click(function(){var i=h.children(b).index(this);if(j==true&&$(this).hasClass(g)){switch(f){case"slide":h.children(b).removeClass(g).end().children(c).eq(i).removeClass(g).slideUp();break;case"normal":h.children(b).removeClass(g).end().children(c).eq(i).removeClass(g).hide();break}}else{switch(f){case"slide":h.children(b).removeClass(g).eq(i).addClass(g).end().end().children(c).removeClass(g).slideUp().eq(i).addClass(g).slideDown();break;case"normal":h.children(b).removeClass(g).eq(i).addClass(g).end().end().children(c).removeClass(g).hide().eq(i).addClass(g).show();break}}})})};$(document).ready(function(){$("#booking-button").click(function(){currentheight=$("#booking-box").height();if(currentheight==0){$("#booking-box").animate({height:"64px","padding-top":"20px"})}else{$("#booking-box").animate({height:"0","padding-top":"0px"})}return false});if($("#feature").width()){count=0;movement=$("#feature").width();movement_store=movement;bigslide=2880;$(".feature-inner").each(function(){count++});maxmovement=movement*count;maxmovement=maxmovement-(maxmovement*2);clone=$(".feature-inner:first-child").clone();$(".feature-items").append(clone);slide=1;sSlider=setTimeout(function(){if(slide==1){$(".feature-items").animate({left:"-"+movement},1000,function(){movement=movement+movement_store;currentmovement=parseInt($(this).css("left"));if(currentmovement==maxmovement){$(".feature-items").css("left",0);movement=movement_store}})}setTimeout(arguments.callee,6000)},6000);$(".feature-small img, .feature-big img").click(function(){if(slide==1){slide=0;storethis=this;if($(this).width()=="960"){position=$(this).parent().parent().data("slidenumber");firstmove=position*bigslide-bigslide;moveto=position*movement_store-movement_store;currentmovement=moveto;movement=moveto+movement_store;$("#feature").animate({height:"0"},1000,function(){$(".feature-items").animate({left:"-"+moveto},0);$("#feature").animate({height:"284"},1000);http:$(".feature-small").css({height:"284",width:"385"});$(".feature-inner").animate({width:"960"},1001,function(){slide=1});$(".feature-big").animate({height:"284",width:"575"},1000).css("marginRight","0");$(".feature-big img").animate({height:"284",width:"575"},1000);$(".feature-small img").animate({height:"140",width:"385"},1000).css({"float":"none",marginRight:"20px"});$("#feature img").css({marginRight:"0"});$("#events").show("slow");maxmovement=maxmovement/3})}else{position=$(this).data("imagenumber");moveto=position*movement_store-movement_store;currentmovement=moveto;movement=moveto+movement_store;$("#feature").animate({height:"0"},1000,function(){$(".feature-items").animate({left:"-"+moveto},1000);$("#feature").animate({height:"440"},1000,function(){slide=1});$(".feature-small").css({height:"440",width:"1920"});$(".feature-big").animate({height:"440",width:"960"},1000).css("marginRight","0");$(".feature-inner").css({width:"2880",marginRight:"0"});$("#feature img").animate({height:"440",width:"960"},1000).css({"float":"left"});$(".feature-small img").css("marginRight","0");$("#events").hide("slow");maxmovement=maxmovement*3;$(storethis).toggleClass("selected")})}$(".zoom_small1, .zoom_small2").toggleClass("exp")}})}$(".scrollabalej").scrollbar();if($("#events-switcher").width()>0){$("#events-switcher").chaSlide({last:-1132})}$("#baf").bafnames({table:"jolly_miller",success:"Thank you",scripturl:"jollymiller/"});if($("div.faq").length>0){$("div.faq").accordion()}$.fn.pgeConCen=function(){Pheight=$(window).height()/2;Thisheight=$(this).height()/2;Cheight=Pheight-Thisheight;$(this).animate({top:Cheight+"px"},{duration:200,queue:false})};$(".pgewrapper").hide();$(".pgemask").css({opacity:0.8});$(window).bind("resize",function(){$(".pgecontainer").pgeConCen()});$(".pgemask").click(function(){$(".pgewrapper").hide()});$(".pgemask").click(function(){$(".pgewrapper2").hide()});if($("#book-table").length>0){$("#book-table").click(function(){$(".pgewrapper").show();$(".pgecontainer").pgeConCen()})}if($("#book-room").length>0){$("#book-room").click(function(){$(".pgewrapper2").show();$(".pgecontainer2").pgeConCen()})}});
