var hold_PDM_cat_menu,hold_PDM_tag_menu,PDM_cat_menu,PDM_tag_menu,first_post_onscreen,last_post_onscreen,next_post,previous_post;jQuery(document).ready(function(h){h(".css_hide").css("display","block");var k=h("#footer");if(k.length){if(k.height()>500){k.css({overflow:"visible"});}}h("#sidebar #subscribe a[title]").tooltip({layout:"<div/>",delay:200,predelay:500,opacity:0.9,effect:"slide",direction:"up",slideInSpeed:400,slideOutSpeed:400,bounce:false,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}}).dynamic({bottom:{direction:"down",bounce:true}});h("#content .post_icon .icon a[title]").tooltip({layout:"<div/>",tipClass:"tooltip boxtip",opacity:0.95,delay:100,predelay:400,position:"top right",effect:"slide",direction:"right",slideInSpeed:400,slideOutSpeed:400,bounce:true,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}});h(".comment_wrapper .reply a").attr("title","Reply to this comment").tooltip({layout:"<div/>",delay:200,predelay:600,opacity:0.9,effect:"slide",direction:"up",offset:[-20,0],slideInSpeed:200,slideOutSpeed:200,bounce:false,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}}).dynamic({bottom:{direction:"down",bounce:true}});h(".postmetadata .post_comments_container a[title]").tooltip({layout:"<div/>",delay:200,predelay:600,opacity:0.9,effect:"slide",direction:"up",offset:[-20,0],slideInSpeed:200,slideOutSpeed:200,bounce:false,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}}).dynamic({bottom:{offset:[0,0],direction:"down",bounce:true}});h("#bottom-bar #bottom-social-icons a[title], #bottom-bar #jumpto-buttons a[title]").tooltip({layout:"<div/>",delay:200,predelay:300,opacity:0.9,effect:"slide",direction:"up",offset:[-30,0],slideInSpeed:250,slideOutSpeed:150,bounce:false,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}});var d=false;var j=h("#bottom-bar");if(h.cookie("CwJ_ID")){if(h.cookie("CwJ_HID")=="1"){d=true;}}else{h.cookie("CwJ_ID",genRandID(),{expires:365,path:"/",domain:window.location.hostname});h.cookie("CwJ_HID",0,{expires:365,path:"/",domain:window.location.hostname});}var m=h("#hide-show-bottombar");if(d){m.addClass("bottombar-hide").removeClass("bottombar-show");m.attr("title","Show Coffee with Julie Toolbar");}else{m.addClass("bottombar-show").removeClass("bottombar-hide");m.attr("title","Hide Coffee with Julie Toolbar");}m.tooltip({layout:"<div/>",tipClass:"tooltip righttip",position:"top left",offset:[-20,30],delay:200,predelay:500,opacity:0.9,effect:"slide",direction:"up",slideInSpeed:400,slideOutSpeed:400,bounce:true,onBeforeShow:function(){if(!this.getTip().find(".tooltip-text").length){this.getTip().html('<div class="tooltip-top"></div><div class="tooltip-mid"></div><div class="tooltip-bottom"></div><div class="tooltip-text">'+this.getTip().html()+"</div></div>");}}});m.click(function(){var n=h(this);try{n.tooltip().getTip().fadeOut(10);}catch(o){}n.slideUp("fast",function(){h(this).toggleClass("bottombar-show bottombar-hide").slideDown("fast");});j.slideToggle("slow",function(){d=!h(this).is(":visible");if(d){try{n.tooltip().getTip().find(".tooltip-text").text("Show Coffee with Julie Toolbar");}catch(p){}}else{try{n.tooltip().getTip().find(".tooltip-text").text("Hide Coffee with Julie Toolbar");}catch(p){}}h.cookie("CwJ_HID",Number(d),{expires:365,path:"/",domain:window.location.hostname});if(!h.cookie("CwJ_ID")){h.cookie("CwJ_ID",genRandID(),{expires:365,path:"/",domain:window.location.hostname});}});h("#wrapper").toggleClass("bottombar");});h(".post_the_categories_container .post_the_categories, .post_the_tags_container .post_the_tags").css({position:"absolute"});h(".post_the_categories_container").bind("mouseenter",function(){hold_PDM_cat_menu=true;h(this).children("div").slideDown("fast");}).bind("mouseleave blur",function(){hold_PDM_cat_menu=false;PDM_cat_menu=h(this);setTimeout('if(!hold_PDM_cat_menu){PDM_cat_menu.children("div").fadeOut("normal");}',200);}).each(function(n){h(this).children("a").bind("focus",function(){h(this).parent("div").children("div").slideDown("fast");h(this).parent("div").children("div").children("ul").children("li").children("a:last").bind("blur",function(){h(this).parent("li").parent("ul").parent("div").fadeOut("normal");});}).bind("click",function(){return false;}).bind("mouseenter",function(){hold_PDM_cat_menu=true;}).bind("mouseleave",function(){hold_PDM_cat_menu=false;});});h(".post_the_tags_container").bind("mouseenter",function(){hold_PDM_tag_menu=true;h(this).children("div").slideDown("fast");}).bind("mouseleave blur",function(){hold_PDM_tag_menu=false;PDM_tag_menu=h(this);setTimeout('if(!hold_PDM_tag_menu){PDM_tag_menu.children("div").fadeOut("normal");}',200);}).each(function(n){h(this).children("a").bind("focus",function(){h(this).parent("div").children("div").slideDown("fast");h(this).parent("div").children("div").children("ul").children("li").children("a:last").bind("blur",function(){h(this).parent("li").parent("ul").parent("div").fadeOut("normal");});}).bind("click",function(){return false;}).bind("mouseenter",function(){hold_PDM_tag_menu=true;}).bind("mouseleave",function(){hold_PDM_tag_menu=false;});});h(".navigation .nav-previous, .navigation .nav-next").live({mouseenter:function(){h(this).find(".nav-fader").fadeTo("fast",0);},mouseleave:function(){h(this).find(".nav-fader").fadeTo("slow",0.5);}}).find(".nav-fader").css({"background-color":"#fff"}).fadeTo(1,0.5);h(".reply a").live({mouseenter:function(){h(this).parent(".reply").addClass("over");},mouseleave:function(){h(this).parent(".reply").removeClass("over").removeClass("down");}}).find(".nav-fader").css({"background-color":"#fff"}).fadeTo(1,0.5);h("iframe").each(function(){var n=h(this).attr("src");h(this).attr({src:n+"?wmode=transparent",wmode:"transparent"});});jQuery("embed").each(function(n){var o=this.cloneNode(true);o.setAttribute("WMode","Transparent");jQuery(this).before(o);jQuery(this).remove();});var b=h("#bottom-bar #jumpto-buttons #jumpto-previous-post");var i=h("#bottom-bar #jumpto-buttons #jumpto-next-post");h(window).scroll(function(){c();f();});function c(){if(!singular){first_post_onscreen="";last_post_onscreen="";next_post="";var n=h('div[id^="post-"]').length;var o=true;h('div[id^="post-"]').each(function(p){if(h(this).isOnScreen()){o=false;if(first_post_onscreen==""){first_post_onscreen=h(this).attr("id");next_post=p+1;previous_post=p-1;}last_post_onscreen=h(this).attr("id");}});if(o){if(h(window).scrollTop()>h("#content").offset().top){previous_post=h('div[id^="post-"]').length-1;}}if(previous_post<0||previous_post==""){previous_post=0;}previous_post=h('div[id^="post-"]')[previous_post].id;b.attr("href","#"+previous_post);if(next_post>h('div[id^="post-"]').length-1||next_post==""){next_post=h('div[id^="post-"]').length-1;}next_post=h('div[id^="post-"]')[next_post].id;i.attr("href","#"+next_post);}}c();var a=h("#popup_wrapper");var e=h("#contact_popup");var g=0;function f(){if(e.is(":visible")){var q=h(window).height();var p=h(window).scrollTop();var o=0;if(!d){o=j.outerHeight();}var s=p+q-o;var t=e.outerHeight();var r=e.offset().top;var n=r+t;if(q>t){a.css({position:"fixed"});g=(q-t)/2;}else{a.css({position:"absolute"});if(r-p>0){g=p;}if(s-n>0){g=s-t;}}a.stop().animate({top:g+"px"},100);}}h(".contact_popup").bind("click",function(){var p=h(window).scrollTop();var o=h(window).height();a.css({visibility:"hidden",display:"block"});var n=h("#contact_popup").outerHeight();a.fadeOut(0).css({visibility:"visible"});if(o>n){a.css({position:"fixed"});g=(o-n)/2;}else{a.css({position:"absolute"});g=p;}a.css({top:g+"px"}).fadeIn("normal");return false;});h("#popup_close a").bind("click",function(){a.fadeOut("normal");return false;});var l=jQuery(".search-query");if(l.length>0){l.bind("focus dblclick",function(){if(jQuery(this).val()=="enter search text..."){jQuery(this).val("").css({color:"#333333"});}else{jQuery(this).select();}}).bind("blur",function(){if(trim(jQuery(this).val())==""){jQuery(this).val("enter search text...").css({color:"#cccccc"});}});if(l.val()=="enter search text..."){l.css({color:"#cccccc"});}jQuery(".search-form").bind("submit",function(){if(jQuery(this).find(".search-query").val()=="enter search text..."||trim(jQuery(this).find(".search-query").val())==""){return false;}});}h(".subscribe-email").click(function(){var n=550;var q=520;var p=(h(window).width()-n)/2;var o=(h(window).height()-q)/2;window.open(this.href,"popupwindow","scrollbars=yes,width="+n+",height="+q+",top="+o+",left="+p);return false;});});function genRandID(){var c="";var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var a=0;a<24;a++){c+=b.charAt(Math.floor(Math.random()*b.length));}return c;}function trim(b){b=b.replace(/^\s+/,"");for(var a=b.length-1;a>=0;a--){if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break;}}return b;}
/*!
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie=function(d,e,b){if(arguments.length>1&&String(e)!=="[object Object]"){b=jQuery.extend({},b);if(e===null||e===undefined){b.expires=-1;}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g);}e=String(e);return(document.cookie=[encodeURIComponent(d),"=",b.raw?e:encodeURIComponent(e),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""));}b=e||{};var a,f=b.raw?function(h){return h;}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null;};
/*!
 * jQuery isOnScreen - Copyright (c) 2010 
 * @author Laurence Wheway
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * @version 1.2.0
 */
(function(a){jQuery.extend({isOnScreen:function(d,b){for(var c in d){d[c]=parseFloat(d[c]);}for(var c in b){b[c]=parseFloat(b[c]);}if(!b){b={left:a(window).scrollLeft(),top:a(window).scrollTop(),width:a(window).width(),height:a(window).height()};}if(d.left+d.width-b.left>0&&d.left<b.width+b.left&&d.top+d.height-b.top>0&&d.top<b.height+b.top){return true;}return false;}});jQuery.fn.isOnScreen=function(b){for(var c in b){b[c]=parseFloat(b[c]);}if(!b){b={left:a(window).scrollLeft(),top:a(window).scrollTop(),width:a(window).width(),height:a(window).height()};}if(a(this).offset().left+a(this).width()-b.left>0&&a(this).offset().left<b.width+b.left&&a(this).offset().top+a(this).height()-b.top>0&&a(this).offset().top<b.height+b.top){return true;}return false;};})(jQuery);
/*!
 * jQuery Tools 1.2.5 - The missing UI library for the Web
 * 
 * [tooltip, tooltip.slide, tooltip.dynamic]
 * 
 * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
 * 
 * http://flowplayer.org/tools/
 * 
 * jquery.event.wheel.js - rev 1 
 * Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
 * Liscensed under the MIT License (MIT-LICENSE.txt)
 * http://www.opensource.org/licenses/mit-license.php
 * Created: 2008-07-01 | Updated: 2008-07-14
 * 
 * -----
 * 
 * File generated: Wed Sep 22 06:12:53 GMT 2010
 */
(function(b){function c(f,e,n){var l=n.relative?f.position().top:f.offset().top,m=n.relative?f.position().left:f.offset().left,k=n.position[0];l-=e.outerHeight()-n.offset[0];m+=f.outerWidth()+n.offset[1];if(/iPad/i.test(navigator.userAgent)){l-=b(window).scrollTop();}var g=e.outerHeight()+f.outerHeight();if(k=="center"){l+=g/2;}if(k=="bottom"){l+=g;}k=n.position[1];f=e.outerWidth()+f.outerWidth();if(k=="center"){m-=f/2;}if(k=="left"){m-=f;}return{top:l,left:m};}function a(A,z){var y=this,w=A.add(y),x,u=0,p=0,g=A.attr("title"),f=A.attr("data-tooltip"),e=d[z.effect],n,D=A.is(":input"),B=D&&A.is(":checkbox, :radio, select, :button, :submit"),C=A.attr("type"),o=z.events[C]||z.events[D?B?"widget":"input":"def"];if(!e){throw'Nonexistent effect "'+z.effect+'"';}o=o.split(/,\s*/);if(o.length!=2){throw"Tooltip: bad events configuration for "+C;}A.bind(o[0],function(h){clearTimeout(u);if(z.predelay){p=setTimeout(function(){y.show(h);},z.predelay);}else{y.show(h);}}).bind(o[1],function(h){clearTimeout(p);if(z.delay){u=setTimeout(function(){y.hide(h);},z.delay);}else{y.hide(h);}});if(g&&z.cancelDefault){A.removeAttr("title");A.data("title",g);}b.extend(y,{show:function(i){if(!x){if(f){x=b(f);}else{if(z.tip){x=b(z.tip).eq(0);}else{if(g){x=b(z.layout).addClass(z.tipClass).appendTo(document.body).hide().append(g);}else{x=A.next();x.length||(x=A.parent().next());}}}if(!x.length){throw"Cannot find tooltip for "+A;}}if(y.isShown()){return y;}x.stop(true,true);var h=c(A,x,z);z.tip&&x.html(A.data("title"));i=i||b.Event();i.type="onBeforeShow";w.trigger(i,[h]);if(i.isDefaultPrevented()){return y;}h=c(A,x,z);x.css({position:"absolute",top:h.top,left:h.left});n=true;e[0].call(y,function(){i.type="onShow";n="full";w.trigger(i);});h=z.events.tooltip.split(/,\s*/);if(!x.data("__set")){x.bind(h[0],function(){clearTimeout(u);clearTimeout(p);});h[1]&&!A.is("input:not(:checkbox, :radio), textarea")&&x.bind(h[1],function(j){j.relatedTarget!=A[0]&&A.trigger(o[1].split(" ")[0]);});x.data("__set",true);}return y;},hide:function(h){if(!x||!y.isShown()){return y;}h=h||b.Event();h.type="onBeforeHide";w.trigger(h);if(!h.isDefaultPrevented()){n=false;d[z.effect][1].call(y,function(){h.type="onHide";w.trigger(h);});return y;}},isShown:function(h){return h?n=="full":n;},getConf:function(){return z;},getTip:function(){return x;},getTrigger:function(){return A;}});b.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(i,h){b.isFunction(z[h])&&b(y).bind(h,z[h]);y[h]=function(j){j&&b(y).bind(h,j);return y;};});}b.tools=b.tools||{version:"1.2.5"};b.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(f,e,g){d[f]=[e,g];}};var d={toggle:[function(f){var e=this.getConf(),g=this.getTip();e=e.opacity;e<1&&g.css({opacity:e});g.show();f.call();},function(e){this.getTip().hide();e.call();}],fade:[function(f){var e=this.getConf();this.getTip().fadeTo(e.fadeInSpeed,e.opacity,f);},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e);}]};b.fn.tooltip=function(f){var e=this.data("tooltip");if(e){return e;}f=b.extend(true,{},b.tools.tooltip.conf,f);if(typeof f.position=="string"){f.position=f.position.split(/,?\s/);}this.each(function(){e=new a(b(this),f);b(this).data("tooltip",e);});return f.api?e:this;};})(jQuery);(function(c){var a=c.tools.tooltip;c.extend(a.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!c.browser.msie});var b={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};a.addEffect("slide",function(h){var e=this.getConf(),i=this.getTip(),d=e.slideFade?{opacity:e.opacity}:{},j=b[e.direction]||b.up;d[j[1]]=j[0]+"="+e.slideOffset;e.slideFade&&i.css({opacity:0});i.show().animate(d,e.slideInSpeed,h);},function(j){var e=this.getConf(),k=e.slideOffset,d=e.slideFade?{opacity:0}:{},l=b[e.direction]||b.up,i=""+l[0];if(e.bounce){i=i=="+"?"-":"+";}d[l[1]]=i+"="+k;this.getTip().animate(d,e.slideOutSpeed,function(){c(this).hide();j.call();});});})(jQuery);(function(d){function b(e){var i=d(window),g=i.width()+i.scrollLeft(),f=i.height()+i.scrollTop();return[e.offset().top<=i.scrollTop(),g<=e.offset().left+e.width(),f<=e.offset().top+e.height(),i.scrollLeft()>=e.offset().left];}function a(e){for(var f=e.length;f--;){if(e[f]){return false;}}return true;}var c=d.tools.tooltip;c.dynamic={conf:{classNames:"top right bottom left"}};d.fn.dynamic=function(e){if(typeof e=="number"){e={speed:e};}e=d.extend({},c.dynamic.conf,e);var g=e.classNames.split(/\s/),f;this.each(function(){var i=d(this).tooltip().onBeforeShow(function(k,j){k=this.getTip();var h=this.getConf();f||(f=[h.position[0],h.position[1],h.offset[0],h.offset[1],d.extend({},h)]);d.extend(h,f[4]);h.position=[f[0],f[1]];h.offset=[f[2],f[3]];k.css({visibility:"hidden",position:"absolute",top:j.top,left:j.left}).show();j=b(k);if(!a(j)){if(j[2]){d.extend(h,e.top);h.position[0]="top";k.addClass(g[0]);}if(j[3]){d.extend(h,e.right);h.position[1]="right";k.addClass(g[1]);}if(j[0]){d.extend(h,e.bottom);h.position[0]="bottom";k.addClass(g[2]);}if(j[1]){d.extend(h,e.left);h.position[1]="left";k.addClass(g[3]);}if(j[0]||j[2]){h.offset[0]*=-1;}if(j[1]||j[3]){h.offset[1]*=-1;}}k.css({visibility:"visible"}).hide();});i.onBeforeShow(function(){var h=this.getConf();this.getTip();setTimeout(function(){h.position=[f[0],f[1]];h.offset=[f[2],f[3]];},0);});i.onHide(function(){var h=this.getTip();h.removeClass(e.classNames);});ret=i;});return e.api?ret:this;};})(jQuery);
