(function() { // Hide the static link var staticCRLink = document.getElementById('crowdriseStaticLink-fundraiser-165926'); if (staticCRLink != undefined){ staticCRLink.style.display = 'none'; } // create a random global variable to run everything under var myProjCrowdriseVar = ""; for (var i = 0; i < 16; i++) { myProjCrowdriseVar += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[myProjCrowdriseVar] = {}; // create a private pointer so you dont have to keep saying window[myProjCrowdriseVar] var $ = window[myProjCrowdriseVar]; // Detect Mobile var browserBuildInfo = navigator.userAgent||navigator.vendor||window.opera; var mobileBrowser = false; if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(browserBuildInfo)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(browserBuildInfo.substr(0,4))){ mobileBrowser = true; } // Check if SSL, if not force mobile experience if (location.protocol !== 'https:') { mobileBrowser = true; } // $.f is your main function $.f = function() { return { runFunction : [], init : function(target) { var theScripts = document.getElementsByTagName("SCRIPT"); for (var i = 0; i < theScripts.length; i++) { // if you find yourself if (theScripts[i].src.match(target)) { // make a container for user arguments $.a = {}; // parse the innerHTML into arguments if (theScripts[i].innerHTML) { $.a = $.f.parseJson(theScripts[i].innerHTML); } // create a DIV to run inside $.w = document.createElement("DIV"); $.w.className = "container"; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); // remove yourself theScripts[i].parentNode.removeChild(theScripts[i]); // make and run the rest of the badge $.f.buildStructure(); // quit looping; you are done break; } } }, // safe JSON parser parseJson : function(json) { this.parseJson.data = json; if (typeof json !== "string") { return {"err":"trying to parse a non-string JSON object"}; } try { var f = Function(["var document,top,self,window,parent,Number,Data,Object,Function,", "Array,String,Math,RegExp,Image,ActiveXObject;", "return (" , json.replace(/<\!--.+-->/gim,'').replace(/\bfunction\b/g,'function') , ");"].join("")); return f(); } catch(e) { return {"err":"trouble parsing JSON object"}; } }, // insertCSS insertCSS : function(rules) { var ns = document.createElement("style"); document.getElementsByTagName("head")[0].appendChild(ns); // Safari does not see the new stylesheet unless you append something to it // However IE will blow chunks, so ... filter it thusly: if (!window.createPopup) { ns.appendChild(document.createTextNode("")); ns.setAttribute("type", "text/css"); } var s = document.styleSheets[document.styleSheets.length - 1]; var ieRules = ""; for (var r in rules) { var selector = "div#crDonateWidget_24IN24BMB2014_Hillseeker." + myProjCrowdriseVar + " " + r; if (!window.createPopup) { var rule = document.createTextNode(selector + rules[r]); ns.appendChild(rule); } else { ieRules += selector + rules[r]; } } if (window.createPopup) { s.cssText = ieRules; } }, // build chrome buildStructure : function() { $.d = { "title" : "24IN24 BMB 2014", "width" : "300px", "height" : "auto" }; // assign defaults if not present in user args for (var k in $.d) { if ($.a[k] === undefined) { $.a[k] = $.d[k]; } } $.w.className = myProjCrowdriseVar; $.w.id = "crDonateWidget_24IN24BMB2014_Hillseeker"; if ($.a.addClassName !== undefined) { try { $.w.className += " " + $.a.addClassName; } catch(eClassName) { } } if ($.a.id !== undefined) { try { $.w.id = $.a.id; } catch(eId) {} } if ($.a.width !== undefined) { try { if (/^\s*\d+\s*$/.test($.a.width)) { $.a.width += "px"; } $.w.style.width = $.a.width; } catch(eWidth) { } } if ($.a.height !== undefined && $.a.height != 'auto') { try { if (/^\s*\d+\s*$/.test($.a.height)) { $.a.height += "px"; } $.w.style.height = $.a.height; } catch (eHeight) { } }; var rules = { "" : "{zoom:1 !important; color:#ffffff !important; font-family: Helvetica, Arial, sans-serif !important; padding:0px 0 0px 0 !important;text-align:center !important; position: relative !important;}", "*" : "{font-weight:normal; font-size:100%; font-style: normal; line-height:1.0em; margin:0; padding:0; text-align:center; border:0; color:#666666; text-shadow: none; background: none;}", "a" : "{text-decoration:none; color: #fda63a; font-weight: bold;}", "a.crowdriseStaticLink" : "{display:none !important;}", "a.hover" : "{text-decoration:none;}", "strong" : "{font-weight: bold;}", "div.crDonateTriangle" : "{float: right; margin-top: -4px; right: 0px; position: absolute; }", "#crDonateWidget_24IN24BMB2014_Hillseeker" : "{width: 300px; margin: 10px;}", "div.crDonateWidgetOuter" : "{text-align: center; background-color: #ffffff; -webkit-box-shadow: 0px 0px 1px 2px rgba(0,0,0,0.05); box-shadow: 0px 0px 1px 2px rgba(0,0,0,0.05); border: 1px solid #e6e6e6; margin: 3px 4px;}", "div.crDonateWidget" : "{margin: 10px; background-color: #fbfcfe; webkit-box-shadow: inset 0px 0px 6px 1px #9f9f9f; box-shadow: inset 0px 0px 6px 1px #9f9f9f; padding: 10px; color: #666666}", "h4" : "{text-transform: uppercase; font-size: 18px; margin-top: 10px;}", "div.crDonated" : "{color: #333333; font-weight: bold; margin-top: 20px; font-size: 36px;}", "div.crDonatedLabel" : "{display: inline-block; font-size: 12px; color: #666666; font-weight: bold; width: 65px; margin-top: -4px; text-transform: uppercase; text-align:right;}", "div.crImageAndTitleOuter" : "{ width: 217px; margin: 15px 0px 0px 16px; background-color: transparent;}", "div.crImageAndTitle" : "{border: 1px solid #ccc; width: 195px; padding: 10px; text-align: left; background-color: #FFF;}", "div.crImageAndTitle div" : "{margin-top: 5px; margin-bottom: 5px; text-align: left; font-size: 13px; text-transform: uppercase; font-weight: bold; line-height: 16px;}", "div.startFundraiser" : "{font-size:14px; margin-bottom: 15px;}", "span.donateNow" : "{color: #ffffff; font-weight: bold; font-size: 18px; border-top: 1px solid #fedaac; display: block; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; padding-top: 12px; padding-bottom: 12px;}", ".gradientButton" : "{background: rgb(244,120,31); height:44px; width:248px; margin:0px auto 10px; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; text-transform: uppercase; color: #ffffff; font-weight: bold; border: 1px solid #e1680e; /* Old browsers *//* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmOTgwZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMzc5MjMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);background: -moz-linear-gradient(top, rgba(253,166,58,1) 0%, rgba(244,120,31,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(253,166,58,1)), color-stop(100%,rgba(244,120,31,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(253,166,58,1) 0%,rgba(244,120,31,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(253,166,58,1) 0%,rgba(244,120,31,1) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(253,166,58,1) 0%,rgba(244,120,31,1) 100%); /* IE10+ */ background: linear-gradient(top, rgba(253,166,58,1) 0%,rgba(244,120,31,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fda63a', endColorstr='#f4781f',GradientType=0);}", ".gradientButton:not([dummy])" : "{filter: none}", ".gradientButton:hover" : "{border-color: #e1680e; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiYjk3ZSIvPjxzdG9wIG9mZnNldD0iMTElIiBzdG9wLWNvbG9yPSIjZmQ4ZjJjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZjE1YzE4Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbb97e), color-stop(11%, #fd8f2c), color-stop(100%, #f15c18)); background-image: -webkit-linear-gradient(top, #fbb97e 0%, #fd8f2c 11%, #f15c18 100%); background-image: -moz-linear-gradient(top, #fbb97e 0%, #fd8f2c 11%, #f15c18 100%); background-image: -o-linear-gradient(top, #fbb97e 0%, #fd8f2c 11%, #f15c18 100%); background-image: linear-gradient(top, #fbb97e 0%, #fd8f2c 11%, #f15c18 100%); outline: none;}", ".gradientButton:hover:not([dummy])" : "{filter: none}", ".gradientButton span.donateNow:active":"{border-top: 1px solid #000;}", ".gradientButton:active":"{background-color: #555657; border: #000 solid 1px; border-color: #4e4d4d; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU1NTY1NyIvPjxzdG9wIG9mZnNldD0iNyUiIHN0b3AtY29sb3I9IiM3ZjgwODAiLz48c3RvcCBvZmZzZXQ9IjI0JSIgc3RvcC1jb2xvcj0iIzhhOGI4YiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzI3MzMzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #555657), color-stop(7%, #7f8080), color-stop(24%, #8a8b8b), color-stop(100%, #27333a)); background-image: -webkit-linear-gradient(top, #555657 0%, #7f8080 7%, #8a8b8b 24%, #27333a 100%); background-image: -moz-linear-gradient(top, #555657 0%, #7f8080 7%, #8a8b8b 24%, #27333a 100%); background-image: -o-linear-gradient(top, #555657 0%, #7f8080 7%, #8a8b8b 24%, #27333a 100%); background-image: linear-gradient(top, #555657 0%, #7f8080 7%, #8a8b8b 24%, #27333a 100%); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;}", ".gradientButton:active:not([dummy])" : "{filter: none}" }; this.insertCSS(rules); var start_fundraiser_link = "http://www.crowdrise.com/24IN24BMB2014/fundraiser/Hillseeker/join"; // give triangle $.w.triangle = document.createElement("DIV"); $.w.triangle.className = "crDonateTriangle"; $.w.triangle_a = document.createElement("A"); if (mobileBrowser === false){ $.w.triangle_a.href = "javascript:;"; $.w.triangle_a.onclick = function(){ adjustLightboxPosition(); if (CRDonatewidgetLoaded == 0){document.getElementById('crDonateWidgetLightboxIframe_24IN24BMB2014_Hillseeker').src = 'https://www.crowdrise.com/fundraise-and-volunteer/donate_widget/fundraiser/24IN24BMB2014/Hillseeker?stylesheet=&amounts=';}; CRDonatewidgetLoaded = 1; document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'block'; document.onkeydown = function(evt) { evt = evt || window.event; if (evt.keyCode == 27) { document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none'; }}; if (!window.createPopup) {document.getElementById('crDonateWidgetLightboxIframe_24IN24BMB2014_Hillseeker').focus()}}; }else{ $.w.triangle_a.href = 'https://www.crowdrise.com/fundraise-and-volunteer/donate-mobile/project/24IN24BMB2014/Hillseeker?widget=true&redirect_to='+encodeURIComponent(window.location.href)+'&stylesheet=&amounts='; } $.w.triangle_img = document.createElement("IMG"); $.w.triangle_img.src = "https://s3-us-west-1.amazonaws.com/cr-rackspace-cloud-files-backups/Prod_Static/cr_widget_give_v2.png"; $.w.triangle_a.appendChild($.w.triangle_img); $.w.triangle.appendChild($.w.triangle_a); $.w.appendChild($.w.triangle); // outer container $.w.c_outer = document.createElement("DIV"); $.w.c_outer.className = "crDonateWidgetOuter"; // inner container $.w.c = document.createElement("DIV"); $.w.c.className = "crDonateWidget"; $.w.t = document.createElement("H4"); $.w.t.innerHTML = "— Make an Impact —"; $.w.c.appendChild($.w.t); $.w.ds = document.createElement("DIV"); $.w.ds.className = "crDonated"; $.w.ds.innerHTML = "$8,067"; $.w.dl = document.createElement("DIV"); $.w.dl.className = "crDonatedLabel"; $.w.dl.innerHTML = "Amount Raised"; $.w.ds.appendChild($.w.dl); $.w.c.appendChild($.w.ds); // Image and title $.w.image_and_title = document.createElement("DIV"); $.w.image_and_title.className = "crImageAndTitle"; $.w.image_and_title_outer = document.createElement("DIV"); $.w.image_and_title_outer.className = "crImageAndTitleOuter"; $.w.i = document.createElement("IMG"); $.w.i.src = "https://www.crowdrise.com/media/medium/1381904_472971832810839_2125556274_n-53393c3e93cba.jpg"; $.w.i.width = 195; $.w.i.height = 195; $.w.image_and_title.appendChild($.w.i); //Title $.w.tt = document.createElement("div"); $.w.na = document.createElement("A"); $.w.na.href = 'http://www.crowdrise.com/24IN24BMB2014'; $.w.na.target = '_blank'; $.w.na.innerHTML = "24IN24 BMB 2014"; $.w.tt.appendChild($.w.na); $.w.image_and_title.appendChild($.w.tt); $.w.image_and_title_outer.appendChild($.w.image_and_title); $.w.shadowImage = document.createElement("IMG"); $.w.shadowImage.src = "https://s3-us-west-1.amazonaws.com/cr-rackspace-cloud-files-backups/Prod_Static/hp-profile-shadow.png"; $.w.shadowImage.className = "CRShadowImage"; $.w.image_and_title_outer.appendChild($.w.shadowImage); $.w.c.appendChild($.w.image_and_title_outer); // Gradient Button $.w.ba = document.createElement("A"); if (mobileBrowser === false){ $.w.ba.href = "javascript:;"; $.w.ba.onclick = function(){ adjustLightboxPosition(); if (CRDonatewidgetLoaded == 0){document.getElementById('crDonateWidgetLightboxIframe_24IN24BMB2014_Hillseeker').src = 'https://www.crowdrise.com/fundraise-and-volunteer/donate_widget/fundraiser/24IN24BMB2014/Hillseeker?stylesheet=&amounts=';}; CRDonatewidgetLoaded = 1; document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'block'; document.onkeydown = function(evt) { evt = evt || window.event; if (evt.keyCode == 27) { document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none'; }}; if (!window.createPopup) {document.getElementById('crDonateWidgetLightboxIframe_24IN24BMB2014_Hillseeker').focus()}}; }else{ $.w.ba.href = 'https://www.crowdrise.com/fundraise-and-volunteer/donate-mobile/project/24IN24BMB2014/Hillseeker?widget=true&redirect_to='+encodeURIComponent(window.location.href)+'&stylesheet=&amounts='; } $.w.b = document.createElement("DIV"); $.w.b.className = "gradientButton"; $.w.b.n = document.createElement("SPAN"); $.w.b.n.className = "donateNow"; $.w.b.n.innerHTML = "Donate Now"; $.w.ba.appendChild($.w.b.n); $.w.b.appendChild($.w.ba); $.w.c.appendChild($.w.b); // Start fundraiser $.w.ds = document.createElement("DIV"); $.w.ds.className = "startFundraiser"; $.w.ds.innerHTML = "or Click here to start a fundraiser"; $.w.c.appendChild($.w.ds); //CR Logo $.w.crlw = document.createElement("DIV"); $.w.crlw.className = "crLogo"; $.w.crl = document.createElement("A"); $.w.crl.href = "https://www.crowdrise.com"; $.w.crl.target = "_blank"; $.w.cri = document.createElement("IMG"); $.w.cri.src = "https://s3-us-west-1.amazonaws.com/cr-rackspace-cloud-files-backups/Prod_Static/cr_widget_logo_2013.png"; $.w.crl.appendChild($.w.cri); $.w.crlw.appendChild($.w.crl); $.w.c.appendChild($.w.crlw); $.w.appendChild($.w.c_outer); $.w.c_outer.appendChild($.w.c); // iFrame Lightbox $.w.lightbox_bg = document.createElement("DIV"); $.w.lightbox_bg.className = "cr_lightbox_bg"; $.w.lightbox_bg.style.display = "none"; $.w.lightbox_bg.id = "crDonateWidgetLightbox_24IN24BMB2014_Hillseeker"; $.w.overlay = document.createElement("DIV"); $.w.overlay.className = "overlay"; $.w.overlay.style.position = "fixed"; $.w.overlay.style.left = "0"; $.w.overlay.style.paddingTop = "20px"; $.w.overlay.style.bottom = "0"; $.w.overlay.style.right = "0"; $.w.overlay.style.paddingBottom = "0px"; $.w.overlay.style.textAlign = "center"; $.w.overlay.style.width = "100%"; $.w.overlay.style.height = "100%"; $.w.overlay.style.zIndex = "9999998"; $.w.overlay.style.backgroundColor = "#000000"; $.w.overlay.style.opacity = ".6"; $.w.overlay.style.filter = "Alpha(Opacity=60)"; $.w.lightbox = document.createElement("DIV"); $.w.lightbox.className = "cr_lightbox"; $.w.lightbox.id = "crDonateWidgetLightbox_24IN24BMB2014_Hillseeker_lb"; if (mobileBrowser === false) { $.w.lightbox.style.width = "587px"; $.w.lightbox.style.height = "700px"; } else { $.w.lightbox.style.width = "100%"; $.w.lightbox.style.height = "100%"; } $.w.lightbox.style.margin = "0 auto"; $.w.lightbox.style.position = "absolute"; $.w.lightbox.style.opacity = "1"; if (mobileBrowser === false) { $.w.lightbox.style.top = "1px"; $.w.lightbox.style.left = "100px"; } else { $.w.lightbox.style.top = "0px"; $.w.lightbox.style.left = "0px"; } $.w.lightbox.style.zIndex = "9999999"; $.w.lightbox.style.borderRadius = "5px"; if (mobileBrowser === false) { if (document.addEventListener) { $.w.lightbox.style.background = 'rgba(0,0,0,0.125)'; $.w.lightbox.style.border = 'rgba(0,0,0,0.125) 5px solid'; } else { $.w.lightbox.style.backgroundImage = "url('https://s3-us-west-1.amazonaws.com/cr-rackspace-cloud-files-backups/Prod_Static/cr_widget_lightbox_bg.png')"; $.w.lightbox.style.padding = "5px"; } } $.w.lightbox_close = document.createElement("DIV"); $.w.lightbox_close.className = "cr_close_lightbox"; $.w.lightbox_close.innerHTML = 'x'; $.w.lightbox_close.style.position = 'absolute'; if (mobileBrowser === false) { $.w.lightbox_close.style.marginLeft = '554px'; $.w.lightbox_close.style.fontSize = '20px'; $.w.lightbox_close.style.width = '28px'; $.w.lightbox_close.style.height = '24px'; } else { $.w.lightbox_close.style.right = "0px"; $.w.lightbox_close.style.fontSize = '30px'; $.w.lightbox_close.style.width = '60px'; $.w.lightbox_close.style.height = '60px'; } $.w.lightbox_close.style.textAlign = 'center'; $.w.lightbox_close.style.zIndex="1000001"; $.w.lightbox_close.style.fontFamily = 'Helvetica, Arial, sans-serif'; if (mobileBrowser === false) { $.w.lightbox_close.style.color = '#fff'; } else { $.w.lightbox_close.style.color = '#000'; } $.w.lightbox_close.style.cursor = 'pointer'; $.w.lightbox_close.style.paddingTop = '2px'; if (mobileBrowser === false) { $.w.lightbox_close.onclick = function(){document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none';}; } else { $.w.lightbox_close.onclick = function(){document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none';document.getElementById('crowdrise_widget_box').style.display='block';}; } $.w.lightbox_iframe = document.createElement("IFRAME"); $.w.lightbox_iframe.className = "cr_lightbox_iframe"; $.w.lightbox_iframe.style.background = "#fff"; if (mobileBrowser === false){ $.w.lightbox_iframe.style.width = "585px"; } else { $.w.lightbox_iframe.style.display= "none" } $.w.lightbox_iframe.style.overflow = "hidden"; $.w.lightbox_iframe.style.height = "100%"; $.w.lightbox_iframe.style.border = "0px none"; $.w.lightbox_iframe.frameBorder = "0"; $.w.lightbox_iframe.id = "crDonateWidgetLightboxIframe_24IN24BMB2014_Hillseeker"; $.w.lightbox.appendChild($.w.lightbox_close); $.w.lightbox.appendChild($.w.lightbox_iframe); if (mobileBrowser === false) { $.w.lightbox_bg.appendChild($.w.overlay); } $.w.lightbox_bg.appendChild($.w.lightbox); //$.w.parentNode.appendChild($.w.lightbox_bg); document.body.appendChild($.w.lightbox_bg); }, // create a new script node runScript : function(url, id) { var s = document.createElement("script"); s.id = id; s.type = "text/javascript"; s.src = url; document.getElementsByTagName("body")[0].appendChild(s); } }; }(); // module content var CRDonatewidgetLoaded = 0; var thisScript = /^https:\/\/www.crowdrise.com\/widgets\/donate\/fundraiser\/165926\//i; var thisScriptCDN = /^https:\/\/cdn.crowdrise.com\/widgets\/donate\/fundraiser\/165926\//i; var init = function() { $.f.init(thisScript); }; var initCDN = function() { $.f.init(thisScriptCDN); }; window.setTimeout(initCDN, 0); window.setTimeout(init, 0); var delagateMessage = function(e) { if ( e.data === "CRDonateiFrameClose" && e.origin === 'https://www.crowdrise.com') { document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none'; }else if(e.origin === 'https://www.crowdrise.com' && e.data.indexOf("CRDonateiFrameCloseReset") > -1){ CRDonatewidgetLoaded = 0; document.getElementById('crDonateWidgetLightbox_24IN24BMB2014_Hillseeker').style.display = 'none'; }else if(e.origin === 'https://www.crowdrise.com' && e.data.indexOf("CRDonateiFrameSuccess") > -1){ } }; var getPageSize = function () { var xScroll,yScroll; if(window.innerHeight&&(window.scrollMaxY||window.scrollMaxX)){ xScroll=document.body.scrollWidth+window.scrollMaxX; yScroll=window.innerHeight+window.scrollMaxY; }else if(document.body.scrollHeight>document.body.offsetHeight){ xScroll=document.body.scrollWidth; yScroll=document.body.scrollHeight; }else{ xScroll=document.body.offsetWidth; yScroll=document.body.offsetHeight; } var windowWidth,windowHeight; if(self.innerHeight){ windowWidth=self.innerWidth; windowHeight=self.innerHeight; }else if(document.documentElement&&document.documentElement.clientHeight){ windowWidth=document.documentElement.clientWidth; windowHeight=document.documentElement.clientHeight; }else if(document.body){ windowWidth=document.body.clientWidth; windowHeight=document.body.clientHeight; } if(yScroll0){objLightbox.style.top=newTopPosition+'px';}else{objLightbox.style.top='0px';} } objLightbox.style.left = newLeftPosition+'px'; } if (mobileBrowser === false) { window.onresize=function() { adjustLightboxPosition(); } } if(document.addEventListener) { if (window.addEventListener != undefined){ window.addEventListener("message", function(e) { delagateMessage(e); }); }} else { window.attachEvent('onmessage', function(e){ delagateMessage(e); }); } } )();