$(document).ready(function(){window.setTimeout(function(){ $(".delay").each(function(){var str = $(this).html().match(/<!--([\s\S]+?)-->/);if (str) {$(this).html($.trim(RegExp.$1));}});},100);});$(function(){$("a[href^=#]").click(function(){var Hash = $(this.hash);var HashOffset = $(Hash).offset().top;$("html,body").animate({scrollTop: HashOffset},{queue:false,duration:1000,easing:'easeOutBounce'});return false;});});$(function(){$(window).scroll(function(){var menuTop = $(document).scrollTop()-$("#sidebar").offset().top+10;if(menuTop<0)menuTop=0;$("#side_navi").stop().animate({top : menuTop+"px"},{queue:false,duration:1000,easing:'easeOutBounce'});});});$(document).ready(function(){var totWidth=0;var positions = new Array();$('#slides .slide').each(function(i){positions[i]= totWidth;totWidth += $(this).width();if(!$(this).width()){alert("Please, fill in width & height for all your images!");return false;}});$('#slides').width(totWidth);$('#menu ul li a').click(function(e,keepScroll){$('li.faceThumb').removeClass('act').addClass('inact');$(this).parent().addClass('act');var pos = $(this).parent().prevAll('.faceThumb').length;$('#slides').stop().animate({marginLeft:-positions[pos]+'px'},{queue:false,duration:450,easing:'easeInOutQuad'});e.preventDefault();if(!keepScroll) clearInterval(itvl);});$('#menu ul li.faceThumb:first').addClass('act').siblings().addClass('inact'); var current=1;function autoAdvance(){if(current==-1) return false;$('#menu ul li a').eq(current%$('#menu ul li a').length).trigger('click',[true]);current++;}var changeEvery = 10;var itvl = setInterval(function(){autoAdvance()},changeEvery*700);});$(function(){$("ol.commentlist li:nth-child(odd)").css("background","#f8ddb7");});$(function(){$("ol.commentlist li:nth-child(even)").css("background","#fbe8cd");});var j$ = jQuery;j$(function(){j$(".aco").each(function(){j$("li > a", this).each(function(index){var $this = j$(this);if(index > -1) $this.next().hide();$this.click(function(){var params = {height:"toggle", opacity:"toggle"};j$(this).next().animate(params).parent().siblings().children("ul:visible").animate(params);return false;});});});});jQuery.easing['jswing'] = jQuery.easing['swing'];jQuery.extend( jQuery.easing,{easeInOutQuad: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t + b;return -c/2 * ((--t)*(t-2) - 1) + b;},easeOutBounce: function (x, t, b, c, d) {if ((t/=d) < (1/2.75)) {return c*(7.5625*t*t) + b;} else if (t < (2/2.75)) {return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;} else if (t < (2.5/2.75)) {return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;} else {return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;}}});(function($){$.fn.lazyload=function(options){var settings={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(options){$.extend(settings,options);}var elements=this;if("scroll"==settings.event){$(settings.container).bind("scroll",function(event){var counter=0;elements.each(function(){if($.abovethetop(this,settings)||$.leftofbegin(this,settings)){}else if(!$.belowthefold(this,settings)&&!$.rightoffold(this,settings)){$(this).trigger("appear");}else{if(counter++>settings.failurelimit){return false;}}});var temp=$.grep(elements,function(element){return!element.loaded;});elements=$(temp);});}this.each(function(){var self=this;if(undefined==$(self).attr("original")){$(self).attr("original",$(self).attr("src"));}if("scroll"!=settings.event||undefined==$(self).attr("src")||settings.placeholder==$(self).attr("src")||($.abovethetop(self,settings)||$.leftofbegin(self,settings)||$.belowthefold(self,settings)||$.rightoffold(self,settings))){if(settings.placeholder){$(self).attr("src",settings.placeholder);}else{$(self).removeAttr("src");}self.loaded=false;}else{self.loaded=true;}$(self).one("appear",function(){if(!this.loaded){$("<img />").bind("load",function(){$(self).hide().attr("src",$(self).attr("original"))[settings.effect](settings.effectspeed);self.loaded=true;}).attr("src",$(self).attr("original"));};});if("scroll"!=settings.event){$(self).bind(settings.event,function(event){if(!self.loaded){$(self).trigger("appear");}});}});$(settings.container).trigger(settings.event);return this;};$.belowthefold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).height()+$(window).scrollTop();}else{var fold=$(settings.container).offset().top+$(settings.container).height();}return fold<=$(element).offset().top-settings.threshold;};$.rightoffold=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).width()+$(window).scrollLeft();}else{var fold=$(settings.container).offset().left+$(settings.container).width();}return fold<=$(element).offset().left-settings.threshold;};$.abovethetop=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollTop();}else{var fold=$(settings.container).offset().top;}return fold>=$(element).offset().top+settings.threshold+$(element).height();};$.leftofbegin=function(element,settings){if(settings.container===undefined||settings.container===window){var fold=$(window).scrollLeft();}else{var fold=$(settings.container).offset().left;}return fold>=$(element).offset().left+settings.threshold+$(element).width();};$.extend($.expr[':'],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"});})(jQuery);jQuery(document).ready(function($){if (navigator.platform == "iPad") return;jQuery("body.page img,body.archive img").lazyload({effect:"fadeIn",placeholder: "http://irishpub-booties.net/wp-content/themes/booties/images/clear.gif"});});


