/* Formalize - version 1.2 Note: This file depends on the Dojo library. */ // Module pattern: // http://yuiblog.com/blog/2007/06/12/module-pattern var FORMALIZE = (function(window, document, undefined) { // Internet Explorer detection. function IE(version) { var b = document.createElement('b'); b.innerHTML = ''; return !!b.getElementsByTagName('br').length; } // Private constants. var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input'); var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input'); var IE6 = IE(6); var IE7 = IE(7); // Expose innards of FORMALIZE. return { // FORMALIZE.go go: function() { var i, j = FORMALIZE.init; for (i in j) { j.hasOwnProperty(i) && j[i](); } }, // FORMALIZE.init init: { // FORMALIZE.init.full_input_size full_input_size: function() { if (!IE7 || !dojo.query('textarea, input.input_full').length) { return; } // This fixes width: 100% on