diff --git a/README.textile b/README.textile
index 8ef2bf4..27fd41c 100644
--- a/README.textile
+++ b/README.textile
@@ -1,25 +1,25 @@
-h1. accessifyhtml5.js
-
-This should probably go into modernizr or something, so see it just as a prototype. It depends on jQuery and was quickly hacked together. Please suggest improvements to @yatil.
-
-It adds ARIA to new elements in browsers which don’t do it by themselves.
-
-Just drop into the bottom of your web page:
-
-
-Souce: http://www.html5accessibility.com/index-aria.html
-
-Todo: Extend Script for other elements, probably even play with fallback JS for inaccessible audio/video.
-
-h2. Acknowledgements:
-
-* @stevefaulkner for his work exploring html5 a11y,
-* @paddya91 for object notation
-* @ginader for reporting typo
-* @webaxe for reporting an error
-
-h2. Known Issues:
-
-According to @jkiss, Window-Eyes 7.11 struggles with aria-roles and HTML5, this is nothing I can solve with this script but is a screen reader issue. See: http://ya.tl/aNH1YQ
-
+h1. accessifyhtml5.js
+
+This should probably go into modernizr or something, so see it just as a prototype. It depends on jQuery and was quickly hacked together. Please suggest improvements to @yatil.
+
+It adds ARIA to new elements in browsers which don’t do it by themselves.
+
+Just drop into the bottom of your web page:
+
+
+Souce: http://www.html5accessibility.com/index-aria.html
+
+Todo: Extend Script for other elements, probably even play with fallback JS for inaccessible audio/video.
+
+h2. Acknowledgements:
+
+* @stevefaulkner for his work exploring html5 a11y,
+* @paddya91 for object notation
+* @ginader for reporting typo
+* @webaxe for reporting an error
+
+h2. Known Issues:
+
+According to @jkiss, Window-Eyes 7.11 struggles with aria-roles and HTML5, this is nothing I can solve with this script but is a screen reader issue. See: http://ya.tl/aNH1YQ
+
This is Open Source and free to use. Attribution is nice to see, but no must. Just use it.
\ No newline at end of file
diff --git a/accessifyhtml5.js b/accessifyhtml5.js
index 5feab2c..86668fd 100644
--- a/accessifyhtml5.js
+++ b/accessifyhtml5.js
@@ -1,39 +1,73 @@
-/*
- * Accessifyhtml5.js
- * Adds ARIA to new elements in browsers which don’t do it by themselves.
- * Just drop into the bottom of your web page:
- *
- *
- * Yes, it depends on jQuery.
- *
- * Souce: http://www.html5accessibility.com/index-aria.html
- *
- * Todo: Extend Script for other elements, probably even play with fallback JS for inaccessible audio/video.
- *
- * Acknowledgements:
- * - @stevefaulkner for his work exploring html5 a11y,
- * - @paddya91 for object notation & document ready
- * - @ginader for reporting typo
- * - @webaxe for reporting an error
- */
-
-$(document).ready(function() {
-
- var fixes = {
- 'header.site' : { 'role': 'banner' },
- 'footer.site' : { 'role': 'contentinfo' },
- 'article' : { 'role': 'article' },
- 'aside' : { 'role': 'complementary' },
- 'nav' : { 'role': 'navigation' },
- 'output' : { 'aria-live': 'polite' },
- 'section' : { 'role': 'region' },
- '[required]' : { 'aria-required': 'true' }
- };
-
- $.each(fixes,
- function(index, item) {
- $(index).attr(item);
- }
- );
-
-});
\ No newline at end of file
+/*
+* Accessifyhtml5.js
+* Adds ARIA to new elements in browsers which don’t do it by themselves.
+* Just drop into the bottom of your web page:
+*
+*
+* Souce: http://www.html5accessibility.com/index-aria.html
+*
+* Todo: Extend Script for other elements, probably even play with fallback JS for inaccessible audio/video.
+*
+* Acknowledgements:
+* - @stevefaulkner for his work exploring html5 a11y,
+* - @paddya91 for object notation & document ready
+* - @ginader for reporting typo
+* - @webaxe for reporting an error
+*/
+
+/*
+* JS only version by adickson
+*
+* You can specify an object containing default header and footer CSS selector properties when you call AccessifyHTML5
+* i.e.
+* AccessifyHTML5({header:"#header", footer:"#footer"});
+*
+*/
+
+
+var AccessifyHTML5 = function (defaults) {
+
+ var fixes = {
+ 'header' : {'role': 'banner' },
+ 'footer' : {'role': 'contentinfo' },
+ 'article' : {'role': 'article' },
+ 'aside' : {'role': 'complementary' },
+ 'nav' : {'role': 'navigation' },
+ 'output' : {'aria-live': 'polite' },
+ 'section' : {'role': 'region' },
+ '[required]': {'aria-required': 'true' }
+ };
+
+ if (defaults) {
+ if (defaults.header) {
+ delete fixes['header'];
+ fixes[defaults.header] = {
+ 'role': 'banner'
+ };
+ }
+ if (defaults.footer) {
+ delete fixes['footer'];
+ fixes[defaults.footer] = {
+ 'role': 'contentinfo'
+ }
+ }
+ }
+
+ for (fix in fixes) {
+
+ var elems = document.querySelectorAll(fix),
+ obj = fixes[fix],
+ attr, value, i = 0;
+
+ for (key in obj) {
+ attr = key;
+ value = obj[key];
+ }
+
+ for (i; i < elems.length; i++) {
+ elems[i].setAttribute(attr, value);
+ }
+
+ }
+
+ };
\ No newline at end of file