Almost all JavaScript works best when attached just before the </body> tag as then the page appears to load a lot faster.
Suck a trivial task as this is best done directly with JavaScript rather than dragging in the entire JQuery library. It does require perhaps three times the amount of code to be written that calling JQuery would but you get rid of the thousands of lines of unneeded code from JQuery that you are not even using.
Possibly the following (untested) code will do it without the need for JQuery at all:
Code:
closest = function(nd,tg) {
while (nd.nodeName !== tg) nd = nd.parentNode;
return nd;
}
inp = document.getElementsByTagName('input);
txt = document.getElementsByTagName('textarea');
for (i = inp.length-1; i>=0,i--) {
inp[i].onfocus = function() {closest(this,'li').style.backgroundColor = 'blue';};
inp[i].onblur = function() {closest(this,'li').style.background = 'none';};
}
for (i = txt.length-1; i>=0,i--) {
txt[i].onfocus = function() {closest(this,'li').style.backgroundColor = 'blue';};
txt[i].onblur = function() {closest(this,'li').style.background = 'none';};
}