jQuery(document).ready( function(){
    
    jQuery('#SearchForm_SearchForm_Search').focus(function() {
    	jQuery(this).val('');
    });
    
	jQuery('#Content a, #SearchResults a, #MainHotLinks a, #SideBarContent a').each(function() {
		var fileURL = jQuery(this).attr('href');
		if (fileURL) {
			if (fileURL.match("\.doc$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_doc.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.docx$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_doc.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.pdf$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_pdf.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.xls$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_xls.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.xlsx$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_xls.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.ppt$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_ppt.gif) no-repeat scroll 0 1px');
			}
			if (fileURL.match("\.pptx$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(themes/sustainablepathways/images/icons/icon_ppt.gif) no-repeat scroll 0 1px');
			}
		}
	});
	  
});
