PROPHOTO.define("pinterest",["jquery"],function(e){return{basePinUrl:"http://pinterest.com/pin/create/button/",loadJS:function(t){var n="//assets.pinterest.com/js/"+t+".js";t=t||"pinit";if(t=="pinit"){var r=document.createElement("SCRIPT"),i=document.getElementsByTagName("SCRIPT")[0];r.type="text/javascript",r.async=!1,r.src=n,r.setAttribute("data-pin-build","parsePinBtns"),i.parentNode.insertBefore(r,i)}else e.ajax({url:n,dataType:"script",cache:!1})},bindPinmarkletEvents:function(){this.pinmarklet.on("click",function(t){t.preventDefault(),this.loadJS("pinmarklet"),e(t.target).addClass("initialized")}.bind(this))},bindPinitEvents:function(t,n){n||t.on("mouseenter",".pp-pinit-overlay",function(){e(this).closest(".pp-pinit-wrap").addClass("hover")}).on("mouseleave",".pp-pinit-overlay",function(){e(this).closest(".pp-pinit-wrap").removeClass("hover")}),t.on("click","a.pp-pinit-link",function(r){var i=e(r.target),s=i.closest(".pp-pinit-wrap").find("img:not(.pp-overlay)").eq(0),o=t.find(".article-title"),u,a,f;f=s.attr("title"),f=f?f:s.attr("alt"),f=f?f:o.text().replace("Edit",""),f=f?f:document.title,a=o.find("a").not(".post-edit-link").length?o.find("a").attr("href"):window.location.href,u=this.pinitUrl({url:a,media:s.attr("src"),description:f}),r.preventDefault(),n?window.location=u:window.open(u,"Pinterest","width=960,height=420,status=0,toolbar=0,menubar=0,location=1,scrollbars=1")}.bind(this))},pinitUrl:function(t){return this.basePinUrl+"?"+e.param(t)}}});