$(document).ready(function()
{
	$(".ssidebar ul li").click(function(event){
		
		$href = $(this).children("a").attr('href');
		alert($href);
		if ($(this).children("ul").hasClass("closed")) {
			$(this).children("ul").slideDown(300).toggleClass("closed");
			$(this).addClass("opened");
		} else {
			$(this).children("ul").slideUp(300).toggleClass("closed");
			$(this).removeClass("opened");
		}
		if ($href == "#"){
		//event.isPropagationStopped();
		return false;}
		else {
		//event.isPropagationStopped();
		return true;}
		
		//event.stopImmediatePropagation();
		//event.stopPropagation();
	});
	
	
	$(".sidebar ul li a.slide-menu").click(function(event){
		if ($(this).next().hasClass("closed")) {
			$(this).next().slideDown(300).toggleClass("closed");
			$(this).parent().addClass("opened");
		} else {
			$(this).next().slideUp(300).toggleClass("closed");
			$(this).parent().removeClass("opened");
		}
		return false;		
	});
});