// // Note: This file depends on the jQuery library. // // Module pattern: // http://yuiblog.com/blog/2007/06/12/module-pattern/ var FORMALIZE = (function($, window, document, undefined) { // Private constants. var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input'); var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input'); var WEBKIT = 'webkitAppearance' in document.createElement('select').style; var IE6 = !!($.browser.msie && parseInt($.browser.version, 10) === 6); var IE7 = !!($.browser.msie && parseInt($.browser.version, 10) === 7); // Expose innards of FORMALIZE. return { // FORMALIZE.go go: function() { for (var i in FORMALIZE.init) { FORMALIZE.init[i](); } }, // FORMALIZE.init init: { // FORMALIZE.init.detect_webkit detect_webkit: function() { if (!WEBKIT) { return; } // Tweaks for Safari + Chrome. $('html').addClass('is_webkit'); }, // FORMALIZE.init.full_input_size full_input_size: function() { if (!IE7 || !$('textarea, input.input_full').length) { return; } // This fixes width: 100% on