/**
*	Some js
*/





$(document).ready(function(){
	
	
	
	/* top menu rollover */
	
	$("div.topMenu ul li img").hover(
			function(){
				if($(this).attr("src").indexOf("0") != -1) {
						var newSrc = $(this).attr("src").replace("0","1");
						$(this).attr("src" ,newSrc);
				}
			},
			function(){
				if($(this).attr("src").indexOf("1") != -1 && this.className != "active") {
					var newSrc = $(this).attr("src").replace("1","0");
					$(this).attr("src",newSrc);
				}
			}
		);	
	
	
	
	$("div.left img.blogs").hover(
			function(){
				if($(this).attr("src").indexOf("0") != -1) {
						var newSrc = $(this).attr("src").replace("0","1");
						$(this).attr("src" ,newSrc);
				}
			},
			function(){
				if($(this).attr("src").indexOf("1") != -1 && this.className != "active") {
					var newSrc = $(this).attr("src").replace("1","0");
					$(this).attr("src",newSrc);
				}
			}
		);	
	
	
	
	// bind toggle for cat button images

	$("div#topButtons img").hover(
		function(){
			if($(this).attr("src").indexOf("0") != -1) {
					var newSrc = $(this).attr("src").replace("0","1");
					$(this).attr("src" ,newSrc);
			}
		},
		function(){
			if($(this).attr("src").indexOf("1") != -1 && this.className != "active") {
				var newSrc = $(this).attr("src").replace("1","0");
				$(this).attr("src",newSrc);
			}
		}
	);

	
	

	rollOver();
	

});









function openCatalog(el) {
	
	
	var a = $("a", el);
	
	window.open(a.attr("href"), a.attr("target"));
}







function rollOver() {
	
	$("ul.side > li").hover(function() {
		
		if(!$(this).hasClass("active")) {
			$(this).addClass("roll");
			$("a", this).addClass("roll");
		}
	}, 
	function (){
		if(!$(this).hasClass("active")) {
			$(this).removeClass("roll");
			$("a", this).removeClass("roll");
		}
	}
	
);	
	
}









