(function() { var doc, executeScripts, here, i, iframe, myFrameId, myId, ref, scriptIndex, scripts, setMyContentFunctionName, setMyHeightFunctionName, src, width; if (window.__coursecraftFrameCount == null) { window.__coursecraftFrameCount = 0; } myId = "course_z9P5d_1491700577_tall_" + (window.__coursecraftFrameCount++); if (window.__coursecraftFrameIds == null) { window.__coursecraftFrameIds = []; } window.__coursecraftFrameIds.push(myId); myFrameId = "coursecraft_widget_frame_" + myId; setMyContentFunctionName = "setCoursecraftFrameContent_" + myId; setMyHeightFunctionName = "setCoursecraftFrameHeight_" + myId; executeScripts = function(document, bodyElement) { var child, childrenNodes, evalScript, i, j, len, len1, nodeName, results, script, scripts; nodeName = function(elem, name) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); }; evalScript = function(elem) { var data, e, error, firstChild, head, script; data = elem.text || elem.textContent || elem.innerHTML || ""; head = document.getElementsByTagName("head")[0] || document.documentElement; script = document.createElement("script"); script.type = "text/javascript"; try { script.appendChild(document.createTextNode(data)); } catch (error) { e = error; script.text = data; } firstChild = head.firstChild; head.insertBefore(script, firstChild); return head.removeChild(script); }; scripts = []; childrenNodes = bodyElement.childNodes; for (i = 0, len = childrenNodes.length; i < len; i++) { child = childrenNodes[i]; if (nodeName(child, "script") && (!child.type || child.type.toLowerCase() === "text/javascript")) { scripts.push(child); } } results = []; for (j = 0, len1 = scripts.length; j < len1; j++) { script = scripts[j]; if (script.parentNode) { script.parentNode.removeChild(script); } results.push(evalScript(script)); } return results; }; window[setMyContentFunctionName] = function(iframe) { var doc, f, r; doc = (iframe.contentWindow || iframe.contentDocument).document; f = function() { return executeScripts(doc, doc.body); }; r = function(f) { if (/in/.test(document.readyState)) { return setTimeout((function() { return r(f); }), 9); } else { return f(); } }; return r(f); }; window[setMyHeightFunctionName] = function(height) { var frame; frame = document.getElementById(myFrameId); frame.style.height = height; return frame.setAttribute('height', height); }; scripts = document.getElementsByTagName('script'); here = null; for (scriptIndex = i = ref = scripts.length - 1; i >= 0; scriptIndex = i += -1) { src = scripts[scriptIndex].src.replace(/^https?:/, '').replace(/&.*/, ''); if (src === "//coursecraft.net/courses/z9P5d/widget.js?size=tall") { here = scripts[scriptIndex]; break; } } if (here !== null) { iframe = document.createElement('iframe'); iframe.setAttribute('onLoad', "window." + setMyContentFunctionName + "(this);"); iframe.setAttribute('id', myFrameId); iframe.setAttribute('class', "coursecraft_widget coursecraft_widget_tall"); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('border', 'none'); iframe.setAttribute('seamless', 'true'); iframe.setAttribute('src', 'javascript:void(0);'); iframe.setAttribute('style', 'border: none;'); /* * calculate width or use size specified by @size */ width = Number("160"); if (isNaN(width)) { width = Math.min(here.parentNode.offsetWidth, 1200); } iframe.setAttribute('width', width); here.parentNode.insertBefore(iframe, here); doc = (iframe.contentWindow || iframe.contentDocument).document; doc.open(); /* */ doc.write("\n\n \u003clink rel=\"stylesheet\" media=\"all\" href=\"//d1qh6uxm3ebwtf.cloudfront.net/assets/widget-72f923e8d3c9c45ebedf9509088a145a7998c82a823ed05776082db97196dd01.css\" /\u003e\u003c!--[if IE]\u003e\u003clink rel=\"stylesheet\" media=\"all\" href=\"//d1qh6uxm3ebwtf.cloudfront.net/assets/ie-83731eb946f81a3ea73669f76af0933b0f9d06b54d87e08f2ea9261967f54e15.css\" /\u003e\u003c![endif]--\u003e\u003cstyle\u003e#participant_body #topnav h1 a { background-image: url(\"/wll/9140\"); }\n\u003c/style\u003e\n \u003cdiv id='widget'\u003e\n\u003cdiv class='cover_photo'\u003e\n\u003cimg alt=\"\" width=\"300\" src=\"http://coursecraft.net/cover/course/4966?size=normal\" /\u003e\n\u003c/div\u003e\n\u003cdiv class='details'\u003e\n\u003ch2\u003eThrifting: Never Pay Retail Again\u003c/h2\u003e\n\n\u003cdiv class='enroll_container'\u003e\n\u003cdiv class='price'\u003e\n\u003cstrong\u003e\n$1.99\n\u003c/strong\u003e\n\u003csmall\u003eUSD\u003c/small\u003e\n\u003c/div\u003e\n\u003ca class='enroll_button button round' href='http:\u0026#47;\u0026#47;coursecraft.net\u0026#47;courses\u0026#47;z9P5d\u0026#47;splash' onclick='javascript:parent.window.open( \u0026quot;http:\u0026#47;\u0026#47;coursecraft.net\u0026#47;courses\u0026#47;z9P5d\u0026#47;splash\u0026quot;, \u0026#39;_blank\u0026#39; );return false;'\u003e\nView Course\n\u003cspan class='serif'\u003e\u0026raquo;\u003c/span\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cscript\u003e\n function getHeight( elm ) {\n var cStyle = elm.ownerDocument \u0026\u0026 elm.ownerDocument.defaultView \u0026\u0026\n elm.ownerDocument.defaultView.getComputedStyle \u0026\u0026\n elm.ownerDocument.defaultView.getComputedStyle(elm, null);\n var ret = cStyle \u0026\u0026 cStyle.getPropertyValue('height') || '';\n if( ret \u0026\u0026 ret.indexOf('.') \u003e -1 ) {\n ret = parseFloat(ret) +\n parseInt(cStyle.getPropertyValue('padding-top')) +\n parseInt(cStyle.getPropertyValue('padding-bottom')) +\n parseInt(cStyle.getPropertyValue('border-top-width')) +\n parseInt(cStyle.getPropertyValue('border-bottom-width'));\n }\n else {\n ret = elm.offsetHeight;\n }\n return ret;\n }\n \n function calc() {\n var el = document.getElementById('widget');\n var height = parseInt( getHeight( el ), 10 );\n window.parent[\"setCoursecraftFrameHeight_\"+document.body.getAttribute('rel')]( height );\n }\n window.onresize = calc\n calc()\n\u003c/script\u003e\n\n"); doc.close(); } else { window.document.write(""); } }).call(this);