text: /* 
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  
  function bs_input_file() {
  	$(".input-file").before(
  		function() {
  			if ( ! $(this).prev().hasClass('input-ghost') ) {
  				var element = $("<input type='file' class='input-ghost' accept='application/pdf' style='visibility:hidden; height:0'>");
  				element.attr("name",$(this).attr("name"));
  				element.change(function(){
  					element.next(element).find('input').val((element.val()).split('\\').pop());
  				});
  				$(this).find("button.btn-choose").click(function(){
  					element.click();
  				});
  				$(this).find("button.btn-reset").click(function(){
  					element.val(null);
  					$(this).parents(".input-file").find('input').val('');
  				});
  				$(this).find('input').css("cursor","pointer");
  				$(this).find('input').mousedown(function() {
  					$(this).parents('.input-file').prev().click();
  					return false;
  				});
  				return element;
  			}
  		}
  	);
  }
  $(function() {
  	bs_input_file();
  });