(function() { // Localize variables to this anonymous function var jQuery; /******** Load jQuery if not present *********/ if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.6.4') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"); var script_is_loaded = false; script_tag.onreadystatechange = script_tag.onload = function() { if ((script_tag.readyState && script_tag.readyState!="complete" && script_tag.readyState!="loaded") || script_is_loaded) return; script_is_loaded = true; // flag to prevent any double execution (IE9 or Opera) scriptLoadHandler(); }; // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jQuery = window.jQuery; main(); } /******** Called once jQuery has loaded ******/ function scriptLoadHandler() { // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable jQuery = window.jQuery.noConflict(true); // Call our main function main(); } /******** Our main function ********/ function main() { jQuery(document).ready(function($) { // Hide container jQuery('#ww-8923123-bakespace-recipes-container').hide(); // Load CSS file var css_link = $("", { rel: "stylesheet", type: "text/css", href: "https://www.bakespace.com/widgets/style.css" }); css_link.appendTo('head'); // Generate widget HTML createHTML(); // Show widget container jQuery('#ww-8923123-bakespace-recipes-container').show(); // Add GA click jQuery("#ww-8923123-bakespace-recipes-top-section-button-img").click(function(){ jQuery("#ww-8923123-bakespace-recipes-gaimg").attr("src","http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=377711287&utmhn=www.bakespace.com&utmcs=UTF-8&utmhid=141354761&utmp=%2Frecipe-widget%2Flaunch%2F5132%2Fwww.bakespace.com&utmac=UA-5278656-3&utmcc=__utma%3D1.5393486600145214523.1129375333.1699932176.1699932176.15%3B%2B__utmz%3D1.1699932176.1.1.utmcsr%3Drecipe-widget1%7Cutmccn%3Dwidget%7Cutmcmd%3Drecipe-widget1%3B"); }); // Add GA click jQuery("#ww-8923123-bakespace-recipes-footer-img").click(function(){ jQuery("#ww-8923123-bakespace-recipes-gaimg").attr("src","http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=376508659&utmhn=www.bakespace.com&utmcs=UTF-8&utmhid=867089428&utmp=%2Frecipe-widget%2Flaunch%2Flogo%2Fwww.bakespace.com&utmac=UA-5278656-3&utmcc=__utma%3D1.2904858700145214523.1527187306.1699932176.1699932176.15%3B%2B__utmz%3D1.1699932176.1.1.utmcsr%3Drecipe-widget1%7Cutmccn%3Dwidget%7Cutmcmd%3Drecipe-widget1%3B"); }); }); } // Create final widget HTML function createHTML (){ // Change the div to the new HTML jQuery("#ww-8923123-bakespace-recipes-container").html('
Check out my cookbook!
Cookbook Cover
ABC’s Home Economics: Hayworth Family Cookbook
View My Cookbook
5 great recipes including:
ABC'S HOME ECONOMICS: Marina’s Traditional Chilaquiles
---
ABC'S HOME ECONOMICS: Denise’s “Breakfast for Dinner” French Toast Sliders
---
ABC'S HOME ECONOMICS: Sarah’s Baked Tofu Nuggets
analytics image
'); } })(); // We call our anonymous function immediately