Some jQuery usage notes for useful/common stuff:
To run script when the browser reaches ready state:
$(document).ready(function(){ //do stuff here });
Detecting browser type, eg:
if ($.browser.webkit){ alert( "this is webkit!" ); }
Valid values are webkit, opera, msie, mozila
See here.
Change attribute value of an element:
$('#elementId').attr('attributename', 'new attribute value');
More, see here.