window.addEvent('domready',function() {
		$$('a').each(function(item) {
			var href = item.getProperty('href');
			if(href != null && href.search(/.pdf/) != -1) {
				item.addClass("pdf");	
			}
			if(href != null && (href.search(/.rtf/) != -1 ) ) {
				item.addClass("rtf");	
			}
		});
		if($$('.target-blank')) {

         $$('.target-blank').each(function(item) {
					item.addEvent('click',function(e) {
							e.preventDefault();
							window.open(item.getProperty('href'));
					});
			});
		}
		if($('query')) {
			var search = $('query');
			search.addEvent('focus',function() {
				if(this.value == 'Search') { this.set('value',''); }
				this.setStyle('color','#000000');
			});
			search.addEvent('blur',function() {
				if(!this.value) { this.set('value','Search'); }
				this.setStyle('color','#ccc');
			});
		}
});

/*  DO MOUSEOVERS */
function mo(state,image)
{
	var src = image.src, ext = src.substring(src.lastIndexOf('.'),src.length);
	image.src = state ? src.replace(ext,'-mo' + ext) : src.replace('-mo' + ext,ext); return;
}
 
/*  GET AN ELEMENT  
if(typeof $ != 'function') { function $(element) { return document.getElementById(element); } }
*/
