$(document).ready(function () {
	var LIs = $(".child");
	for (var i = 0; i < LIs.length; i++) {
		var li = LIs.eq(i);
		var h2 = li.children("h2");
		if (i==0)
			h2.parent().children('.content').jScrollPane({showArrows:true, scrollbarWidth: 18, arrowSize: 22});
		h2.click(function() {
			try {
				$(".child .content").jScrollPaneRemove();
			} catch (e) {}
			$(".child .content").hide();
			$(this).parent().children('.content').show();
			$(this).parent().children('.content').jScrollPane({showArrows:true, scrollbarWidth: 18, arrowSize: 22});
			var image = $(this).parent().children('.thumb');
			if (image!=null) {
				$('.attachment-full').attr('src',image.attr('src'));
			}
			/*var intro = $(this).parent().children(".introduction");
			var html = intro.html();
			$('#introduction').replaceWith('<div class="introduction active" id="introduction">'+html+'</div>');*/
			$(".h2").removeClass("active");
			$(this).toggleClass("active",true);
			$(this).context.blur();
		});
	}
});

