if(typeof jQuery != 'undefined') {
	//alert("jquery")
	$(document).ready(function(){
		if(location.href.match(/\/boards\/trading-journals/)){
			$('#blogs_a').addClass('selected')
		}else if(location.href.match(/\/boards\/(?!calendar|blog)/)){
			$('#forum_a').addClass('selected')
		}else if(location.href.match(/\/preferred-brokers/)){
			$('#brokers_a').addClass('selected')
		}else if(location.href.match(/\/knowledge\/articles/)){
			$('#articles_a').addClass('selected')
		}else if(location.href.match(/\/boards\/calendar/)){
			$('#calendar_a').addClass('selected')
		}else if(location.href.match(/\/store/)){
			$('#store_a').addClass('selected')
		}else if(location.href.match(/\/knowledge\/(?!articles)/)){
			$('#reviews_a').addClass('selected')
		}else if(location.href.match(/\/competition/)){
			$('#competition_a').addClass('selected')
		}else if(location.href.match(/\/traderpedia/)){
			$('#traderpedia_a').addClass('selected')
		}else if(location.href.match(/books.global-investor.com/)){
			$('#books_a').addClass('selected')	
		}else if(location.href.match(/\.com\/$/)){
			$('#home_a').addClass('selected')	
		}
	})
}else{
	//alert("prototype");
	Event.observe(window, 'load', function(){
			if(location.href.match(/\/boards\/trading-journals/)){
				Element.addClassName('blogs_a','selected')
			}else if(location.href.match(/\/boards\/(?!calendar|blog)/)){
				$('forum_a')?Element.addClassName('forum_a','selected'):false
			}else if(location.href.match(/\/preferred-brokers/)){
				Element.addClassName('brokers_a','selected')
			}else if(location.href.match(/\/knowledge\/articles/)){
				Element.addClassName('articles_a','selected')
			}else if(location.href.match(/\/boards\/calendar/)){
				Element.addClassName('calendar_a','selected')
			}else if(location.href.match(/\/store/)){
				Element.addClassName('store_a','selected')
			}else if(location.href.match(/\/knowledge\/(?!articles)/)){
				Element.addClassName('reviews_a','selected')
			}else if(location.href.match(/\/competition/)){
				Element.addClassName('competition_a','selected')
			}else if(location.href.match(/\/traderpedia/)){
				Element.addClassName('traderpedia_a','selected')
			}else if(location.href.match(/\.com\/$/)){
				Element.addClassName('home_a','selected')	
			}
	}, false);
}
