how to check if browser is firefox in javascript

JavaScript
if ($.browser.mozilla) { ... 
Source

Also in JavaScript: