(function(){var DEBUG=!1,HOST=DEBUG?"http://test.yumprint.com":"http://yumprint.com",SECURE_HOST=DEBUG?"https://test.yumprint.com":"https://yumprint.com",API_HOST=DEBUG?"http://testapi.yumprint.com":"http://api.yumprint.com",SECURE_API_HOST=DEBUG?"https://testapi.yumprint.com":"https://api.yumprint.com",ANIMATION_TIME=200,MESSAGE_TIME=1E3,TOUCH="undefined"!==typeof window&&"ontouchstart"in window||"undefined"!==typeof navigator&&(0a;a+=2)"margin"===b&&(d+=j.css(n,b+Ba[a],!0,f)),c?("content"===b&&(d-=j.css(n,"padding"+Ba[a],!0,f)),"margin"!==b&&(d-=j.css(n,"border"+Ba[a]+"Width",!0,f))):(d+=j.css(n,"padding"+Ba[a],!0,f),"padding"!==b&&(d+=j.css(n,"border"+Ba[a]+"Width",!0,f)));return d}function C(n,a,b){var c=!0,f="width"===a?n.offsetWidth:n.offsetHeight,d=Ca(n),h=j.support.boxSizing&&"border-box"===j.css(n,"boxSizing",!1,d);if(0>=f||null==f){f=Da(n,a,d);if(0>f||null==f)f=n.style[a];if(jb.test(f))return f;c=h&&(j.support.boxSizingReliable||f===n.style[a]);f=parseFloat(f)||0}return f+z(n,a,b||(h?"border":"content"),c,d)+"px"}function L(n){var a=A,b=tc[n];if(!b){b=M(n,a);if("none"===b||!b)Ua=(Ua||j("").attr("src",SECURE_API_HOST+"/proxy").appendTo("body").get(0)});var f=1,h=[],k=async();window.addEventListener("message",function(a){if(a.origin===SECURE_API_HOST)if("yumprint-proxy-ready"===a.data)k.set();else try{var b=JSON.parse(a.data),c=b.id;if(c){var d=h[c];delete h[c];d&&d(b.data)}}catch(e){}});g=function(a,b,c,d){k.await(function(){var e=f++;h[e]=d;l.contentWindow.postMessage(JSON.stringify({id:e,url:a,method:b,data:c}),SECURE_API_HOST)})}}var m=function(a){return function(b){a&&(b.success?"result"in b?a(b.result):a(!0):a(!1))}},p=function(a){if("object"===typeof a){if("start"in a){var c=a.start,d=b(c);a.start=function(a){d(t(a))};a.startUrl=c}if("next"in a){var c=a.next,e=b(c);a.next=function(a){var b;b=m(function(b){p(b);a&&a(b)});e(b)};a.nextUrl=c}}},t=function(a){return m(function(b){if(b&&b.feeds&&b.feeds.length)for(var c=0;c
").appendTo(a.find(".blog-yumprint-dialog-contents"));d.find(".blog-yumprint-star-container").replaceWith(createStars({stars:4,selected:b.rating,constant:!0,size:18,clickable:!1,hasText:!1,prefix:c}));d.find(".blog-yumprint-review-owner .blog-yumprint-image").css("background-image","url("+b.image+")");d.find(".blog-yumprint-review-owner .blog-yumprint-text").text(b.name);d.find(".blog-yumprint-time").text(b.at);d.find(".blog-yumprint-review").text(b.review||"");d.find(".blog-yumprint-review-owner").fastClick(function(){window.open(HOST+"/app/object/"+ b.shelf)})})(b[d])})} function showDialog(a){var e=function(c){var b=function(){$(".ui-draggable-dragging.dragging").remove();d.stop().fadeOut(ANIMATION_TIME,function(){d.remove();a.close&&a.close()})},d=$("
").hide().appendTo($("body")),e=$("
Cancel
").hide().click(function(){return!1}).appendTo(d.find(".blog-yumprint-dialog-wrapper"));d.click(b).show("fade",ANIMATION_TIME,function(){e.close=b;a.id&&e.attr("id",a.id);a.width&&e.css({width:a.width+"px"});a.height&&e.css({height:a.height+"px"});e.find(".blog-yumprint-dialog-contents").html(c);e.find(".blog-yumprint-dialog-title").text(a.title);e.find(".blog-yumprint-close").click(e.close);a.show&&a.show(e);e.show("fade",ANIMATION_TIME,function(){a.ready&&a.ready(e)}).css("display","inline-block");$(document).keydown(function(a){if(27===a.which)return e.close(),!1})})};a.url?$.get(a.url,e):e("")} function star(a,e,c,b,d,g,l,f){l.save();l.strokeStyle=g;f&&(l.fillStyle=g);l.beginPath();l.translate(a,e);l.moveTo(0,0-c);for(a=0;a").appendTo(a.find(".blog-yumprint-star-container")).get(0);g.width=21*e;g=g.getContext("2d");g.clearRect(0,0,84,20);star(10,10,10,5,0.5,c,g,!0);star(31,10,10,5,0.5,c,g,!0);star(52,10,10,5,0.5,c,g,!0);star(73,10,10,5,0.5,c,g,!0);c=$("").appendTo(a.find(".blog-yumprint-star-container")).get(0);c.width=21*e;e=c.getContext("2d");e.clearRect(0,0,84,20);star(10,10,10,5,0.5,b,e,!0);star(31,10,10,5,0.5,b,e,!0);star(52,10,10,5,0.5,b,e,!0);star(73,10,10,5,0.5,b,e,!0)}a=$("").appendTo(a.find(".blog-yumprint-star-container")).get(0).getContext("2d");a.clearRect(0,0,84,20);star(10,10,10,5,0.5,d,a);star(31,10,10,5,0.5,d,a);star(52,10,10,5,0.5,d,a);star(73,10,10,5,0.5,d,a)} function getPixels(a){return(a=/^(\d+)px$/.exec(a))&&a[0]||null} function initRecipe(a){if(699<$(window).width()){var e=a.find(".blog-yumprint-save");if(!e.length||!e.is(":visible")||"hidden"===e.css("visibility")||e.css("background-color")===e.css("color")||"0px"!==e.css("top")||"0px"!==e.css("left")||"0px"!==e.css("bottom")||"0px"!==e.css("right")||"0px"!==e.css("margin-top")&&""!==e.css("margin-top")||"0px"!==e.css("margin-right")&&""!==e.css("margin-right")||"0px"!==e.css("margin-bottom")&&""!==e.css("margin-bottom")||"0px"!==e.css("margin-left")&&""!==e.css("margin-left")||"0px"!==e.css("margin")&&""!==e.css("margin")||"0px"===e.css("height")||"0px"===e.css("width")||!e.text()){a.remove();return}}a.find(".blog-yumprint-print").click(function(){for(var b={title:a.find(".blog-yumprint-recipe-title").text(),image:a.find(".blog-yumprint-google-image").attr("src"),link:a.find(".blog-yumprint-recipe-source").text(),serves:a.find(".blog-yumprint-serves").text(),sections:[],stats:[]},c=0;cPrint - "+a.find(".blog-yumprint-recipe-title").text()+"