/*! * JavaScript Custom Forms * * Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf * Released under the MIT license (LICENSE.txt) * * Version: 1.2.0 */ ;(function(root, factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports === 'object') { module.exports = factory(require('jquery')); } else { root.jcf = factory(jQuery); } }(this, function($) { 'use strict'; // define version var version = '1.2.0'; // private variables var customInstances = []; // default global options var commonOptions = { optionsKey: 'jcf', dataKey: 'jcf-instance', rtlClass: 'jcf-rtl', focusClass: 'jcf-focus', pressedClass: 'jcf-pressed', disabledClass: 'jcf-disabled', hiddenClass: 'jcf-hidden', resetAppearanceClass: 'jcf-reset-appearance', unselectableClass: 'jcf-unselectable' }; // detect device type var isTouchDevice = ('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch, isWinPhoneDevice = /Windows Phone/.test(navigator.userAgent); commonOptions.isMobileDevice = !!(isTouchDevice || isWinPhoneDevice); // create global stylesheet if custom forms are used var createStyleSheet = function() { var styleTag = $('