    $(document).ready(function(){ 

// Drop down menu (multi level)	
        $("ul.superfish").superfish(); 
// End of menu
// Control visible stories
		$('ul.more_stories').each(function(index) {
			$(this).children('li').slice(3).hide();
		});

		$('.minus').click(function() {
			$(this).parent().next('ul').children('li:visible:last').hide();
		});

		$('.plus').click(function() {
			$(this).parent().next('ul').children('li:hidden:first').show();
		});
		// End of stories section
		// Control minimize
			$('.minimizesidebar').click(function() {
			$(this).parent('h2').next().toggle();
		});
			$('.minimizedynwidget').click(function() {
			$(this).parent('h2').next().toggle();
		});
		// End of control minimize function
		
    }); 
	
	$(function() {
		$(".column").sortable({
		//	connectWith: '.column',
		//	handle: 'h3',
			opacity: 0.6,
			cursor: 'move',
			revert: true,
		//	appendTo: 'body',
		//	axis: 'x',
		//	grid: [50, 20],
		//	placeholder: 'ui-state-highlight',
		//	scroll: false,
		});

		$(".category_widget").addClass("ui-helper-clearfix")
			.find(".portlet-header")
				.addClass("move-widget-header")
				.prepend()
				.end()
			.find(".portlet-content");

		$(".portlet-header .minimizecat").click(function() {
			$(this).toggleClass("minimizecat").toggleClass("minimized");
			$(this).parents(".category_widget:first").find(".cat_container").toggle();
		});

		//$(".column").disableSelection();
		
		$(".blog_widget").addClass("ui-helper-clearfix")
			.find(".portlet-header")
				.addClass("move-widget-header")
				.prepend()
				.end()
			.find(".portlet-content");

		$(".portlet-header .minimizeblog").click(function() {
			$(this).toggleClass("minimizeblog").toggleClass("minimized");
			$(this).parents(".blog_widget:first").find(".blog_container").toggle();
		});
		
	});

