/* * HTML5 Forms Fallback for older and unsupporting browsers * Using jQuery, jQuery UI, Modernizr, Webforms2, and other jQuery Plugins * * 2010 Cristian I. Colceriu * * www.ghinda.net * contact@ghinda.net * */ var initSlider=function(){$('input[type=range]').each(function(){var $input=$(this);var $slider=$('
');var step=$input.attr('step');$input.after($slider).hide();$slider.slider({min:$input.attr('min'),max:$input.attr('max'),step:$input.attr('step'),change:function(e,ui){$(this).val(ui.value)}})})};if(!Modernizr.inputtypes.range){$(document).ready(initSlider)};var initSpinner=function(){$('input[type=number]').each(function(){var $input=$(this);$input.spinner({min:$input.attr('min'),max:$input.attr('max'),step:$input.attr('step')})})};if(!Modernizr.inputtypes.number){$(document).ready(initSpinner)};var initDatepicker=function(){$('input[type=date]').each(function(){var $input=$(this);$input.datepicker({minDate:$input.attr('min'),maxDate:$input.attr('max'),dateFormat:'yy-mm-dd'})})};if(!Modernizr.inputtypes.date){$(document).ready(initDatepicker)};var initColorpicker=function(){$('input[type=color]').each(function(){var $input=$(this);$input.ColorPicker({onSubmit:function(hsb,hex,rgb,el){$(el).val(hex);$(el).ColorPickerHide()}})})};if(!Modernizr.inputtypes.color){$(document).ready(initColorpicker)};var initPlaceholder=function(){$('input[placeholder]').placehold({placeholderClassName:'placeholder'})};if(!Modernizr.input.placeholder){$(document).ready(initPlaceholder)};