<script type="text/javascript"> 
            $(document).ready(function(){	
	            try {
				$('#archive-list li:even').addClass("odd");
	            $('.field-group, .field-group input, .field-group select').live('click',function(event){		 			
					if (event.type == 'click') {
    		 			if ($(this).hasClass('field-group')){
    		 			    var fg = $(this);
    		 			    if($(this).children('.datefield').length == 1){
    		 			        // Do not select 1st input so date picker will work.
    		 			    } else {
    		 			        $(this).find('input, select').slice(0,1).focus();
		 			        }
    		 			} else {
    		 			    var fg = $(this).parents('.field-group');
						    $(this).focus();
    		 			}
		            	fg.not('.focused-field').addClass('focused-field').children('.field-help').slideDown('fast');
		            	$('.focused-field').not(fg).removeClass('focused-field').children('.field-help').slideUp('fast');
					}
	            });
	            // Allow select inputs to be width:auto up to 500px (because max-width doesn't work in IE7)
                $("select").each(function(){
                    $(this).css("width", "auto");
                    if($(this).width() > 500){
                        $(this).css("width", "500px");
                    }
                });
 
                } catch(e){ console.log(e); }
            });		
		</script> 
