jQuery(document).ready( function(){
    
    jQuery('#SearchForm_SearchForm_Search').focus(function() {
    	jQuery(this).val('');
    });
    
    jQuery('#Sidebar #GalleryImages a').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic'
	});
	
    
	jQuery('#Content a, #SearchResults a, #Menu2 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(mysite/images/icons/icon_doc.gif) no-repeat scroll 5px 3px');
			}
			if (fileURL.match("\.pdf$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(mysite/images/icons/icon_pdf.gif) no-repeat scroll 5px 3px');
			}
			if (fileURL.match("\.xls$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(mysite/images/icons/icon_xls.gif) no-repeat scroll 5px 3px');
			}
			if (fileURL.match("\.ppt$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(mysite/images/icons/icon_ppt.gif) no-repeat scroll 5px 3px');
			}
			if (fileURL.match("\.pptx$")) {
				jQuery(this).addClass('file');
				jQuery(this).css('background','transparent url(mysite/images/icons/icon_ppt.gif) no-repeat scroll 5px 3px');
			}
		}
	});
    
});
