// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

	var css_browser_selector = function() {
		var 
			ua=navigator.userAgent.toLowerCase(),
			is=function(t){ return ua.indexOf(t) != -1; },
			h=document.getElementsByTagName('html')[0],
			b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
			os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
		var c=b+os+' js';
		h.className += h.className?' '+c:c;
	}();


  
	Event.observe(window,'load',function() {
	
		
		$$('div.fieldWithErrors').each( function(item) {
			item.up("tr").down("label").addClassName('labelFormError');
		} );
		
			
	});


	Event.addBehavior({
		
		'img.nav:mouseover' : function(e) {
			if(this.src.indexOf("_on")<0)
				this.src = this.src.replace(".jpg", "_hover.jpg")
		},
		'img.nav:mouseout' : function(e) {
			this.src = this.src.replace("_hover.jpg", ".jpg")
		}	
		
	  
	});
		
	
  
    