/*
 */
 
$(function () {
			
	// smooth scroller
	//$("a[href^=#]").click(function() {
	$(".pageTop a[href*=#]").click(function() {
		var hash = this.hash;
		if(!hash || hash == "#")
			return false;
		$($.browser.safari ? 'body' : 'html')
			.animate({scrollTop: $(hash).offset().top}, 500, "swing");
		return false;
	});

	var id = "";
	id = $("body").attr("id");
	var ar = new Array("home", "news", "service", "contact", "about");
	
	$("nav ul li").each(function(i){
		if(id == ar[i]){
			$(this).css("background","url(http://www.car-kb.com/common/images/navio.gif) left top repeat-x");
		}
		
		$(this).mouseover(function(){
				//$("a:not(:animated)", this).animate({"opacity":0.5},{easing: 'easeOutQuad', duration: 100});
				$(this).css("background","url(http://www.car-kb.com/common/images/navio.gif) left top repeat-x");
			}).mouseout(function(){
				//$("a:not(:animated)",this).animate({"opacity":1},{easing: 'easeOutQuad', duration: 100});
				if(id != ar[i]){
					$(this).css("background","none");
				}
			}
		);
	});
});

