/*
 *  Fix for firefox 3.0.* - 3.5.*  text input's that doesnt respect line-height css attribute
 *
 *  @requires jquery
 *
 *  @author        przemek@technetium.pl
 *  @contribution  bartek@technetium.pl
 *
 */

$(function(){
   jQuery.each(jQuery.browser, function(i, val) {

      if(i=="mozilla" && jQuery.browser.version.match("1\.9\.[0|1]")) {

         $('input[type=text], input[type=password]').each(function(){
            wys = $(this).height();
            fontsize = $(this).css('font-size').replace('px', '');

            padding_top = ((wys - fontsize) / 2)
            //alert('wys:' + wys + " fontsize: " + fontsize + ' padding: ' + padding_top);

            if(padding_top - 1 > 0 && wys - padding_top + 1 > 0) {
               $(this).css('height', wys-padding_top+1 + 'px')
               $(this).css('padding-top', padding_top-1 + 'px')
            }
         })
      }
   });
})
