/* jQuery.NiceFileInput.js -------------------------------------- Nice File Input - jQuery plugin which makes file inputs CSS styling an easy task. By Jorge Moreno - @alterebro Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php Based on previous work of: - Shaun Inman (concept) http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom - Mika Tuupola (jQuery plugin implementation) http://www.appelsiini.net/projects/filestyle */ (function( $ ) { $(document).ready(function() { $( 'select' ).selectBox(); }) $(document).ready( function() { $( 'input[type=file]' ).nicefileinput(); }); })( jQuery ); (function( $ ) { $.fn.nicefileinput = function( options ) { var settings = { label : 'Choose file...', fullPath: false }; if( options ) { $.extend( settings, options ); }; return this.each( function() { var self = this; if ( $ ( self ).attr( 'data-styled' ) === undefined ) { var r = Math.round( Math.random() * 10000 ); var d = new Date(); var guid = d.getTime() + r.toString(); var filename = $( '' ) .css( { 'display': 'block', 'float': 'left', 'margin': 0, 'padding': '9px 0 8px 9px;', 'background-color': 'transparent', 'border':'none' }) .addClass( 'NFI-filename NFI' + guid ) ; var wrapper = $( "