$(function () {

	$(".accordion div.mi").click(function(){
		$(this).next("div.ma").slideToggle("slow", function(){}).siblings("div.ma:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("div.mi").removeClass("active");
	});
	
	
	if($(".search").length){		
		$(".search .search-blocks").hide();		
		$(".search #show-search").click(function(){
			$(this).next(".search-blocks").slideToggle("slow")
			.siblings(".search-blocks:visible").slideUp("slow");
			$(this).toggleClass("active");
			$(this).siblings("#show-search").removeClass("active");
		});
	}
	
});
function activatemenu(id){
	$(".accordion div#l1_"+id).addClass("active");
 	$(".accordion div.ma:not(#l2_"+id+")").hide();
} 
// =fixing png for IE. now you should only add class "png" to show the transparent *.png image in IE6
function PNG(element){
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){
	var src;
	if (element.tagName=='IMG'){
			if (/\.png$/.test(element.src)){
				src = element.src;
				element.src = "images/t.gif"; // = 1*1px  transparent image and path for it
			}
		}
		else {
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)
			if(src){
				src = src[1];
				element.runtimeStyle.backgroundImage="none";
			}
		}
	if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
	}
}