Permalink
Browse files

autoboot

  • Loading branch information...
1 parent 61b035e commit 75eb8a780fa14388316cbbcc2da9c05d7595f737 @mudcube mudcube committed Mar 27, 2012
Showing with 20 additions and 1 deletion.
  1. +20 −1 hire-us/hire-us.js
View
@@ -24,6 +24,13 @@ var HireUs = {};
"<a href=\"mailto:connect@whatislucent.com\" class=\"hire-contact\"><span class=\"hire-inner\"></span></a>",
init: function(placement) {
+ var head = document.getElementsByTagName("head")[0];
+ var css = document.createElement("link");
+ css.rel = "stylesheet";
+ css.type = "text/css";
+ css.media = "screen";
+ css.href = "/media/hire-us/hire-us.css";
+ head.appendChild(css);
placement = (typeof placement !== 'undefined') ? placement : 'tl';
// insert link into page
var link = document.createElement('a');
@@ -58,7 +65,19 @@ var HireUs = {};
event.cancelBubble = true;
}
return root;
+ },
+
+ boot: function() {
+ HireUs.init('tr');
}
}
-})();
+})();
+
+if (typeof window.addEventListener != 'undefined') {
+ window.addEventListener('load', HireUs.boot, false);
+} else if(typeof document.addEventListener != 'undefined') {
+ document.addEventListener('load', HireUs.boot, false);
+} else if(typeof window.attachEvent != 'undefined') {
+ window.attachEvent('onload', HireUs.boot);
+}

0 comments on commit 75eb8a7

Please sign in to comment.