$(document).ready(function() {
	//alert("weszło");
	$("div.shop_detiles").slideUp(0);
	
	if($("div.shop_detiles").length == 1){
		$("div.shop_detiles").slideDown(0);
		$first = false;
	}else{
		$first = true;
	}

	

    $("div.shop_name").click(function () {

		if ($(this).next("div.bulletin").next("div.shop_detiles").is(":hidden")) {
			if($first){
				$(this).next("div.bulletin").next("div.shop_detiles").slideDown(500);
				$first = false;	
			}else{
				$selected = $(this);
				$("div.shop_detiles").slideUp(500, function(){$selected.next("div.bulletin").next("div.shop_detiles").slideDown(500);});
				//$selected.parent("div.faq_q").next("div.faq_a").slideDown(200);

			}

		}else{
			$first = true;
			$("div.shop_detiles").slideUp(500);
		}

    });

});

//$(document).ready(function() {
	//przymierze_slider();
	//menu_slider();
//});

//function przymierze_slider(){
//	$("div.shop_detiles").slideUp(0);
	
	/*$("div.przymierze_points").click(function () {
		
		if($(this).next("div.przymierze_content").is(":hidden")){
			$(this).next("div.przymierze_content").slideDown(200);
		}else{
			$(this).next("div.przymierze_content").slideUp(200);
		}
	});
	
	$("div.par_up img").click(function () {
		$(this).parent("div.par_up").parent("div.przymierze_content").slideUp(200);
	});*/
//}

/*function menu_slider(){
	$("div.subtree").slideUp(0);
	$("div.tree").slideUp(0);
	
	$("div.menu_btn").click(function () {
		
		if($(this).parent("div.sm_pg").next("div.tree").is(":hidden")){
			$(this).parent("div.sm_pg").next("div.tree").slideDown(200);
			$(this).css("background-image","url('/content/img/zwin_png.png')");
		}else{
			$(this).parent("div.sm_pg").next("div.tree").slideUp(200);
			$(this).css("background-image","url('/content/img/rozwin_png.png')");
		}
	});
	
	$("div.submenu_btn").click(function () {
		
		if($(this).parent("div.sm_chpt").next("div.subtree").is(":hidden")){
			$(this).parent("div.sm_chpt").next("div.subtree").slideDown(200);
			$(this).css("background-image","url('/content/img/zwin_png.png')");
		}else{
			$(this).parent("div.sm_chpt").next("div.subtree").slideUp(200);
			$(this).css("background-image","url('/content/img/rozwin_png.png')");
		}
	});
}*/
