if( window.jQuery )
{

	$(document).ready(function() {
		
		if( $("#sidebar .widgetized-sidebar") ) {
			
			var hist = [];
			//var hist = [$(".widgetized-sidebar li ul:first")];
			//$(".widgetized-sidebar li ul:not(:first)").slideToggle('normal');
			//$(".widgetized-sidebar li ul:first").attr("class", "opennav");
			//$('.widgetized-sidebar li h2').css({'cursor' : 'pointer' });
			$("#sidebar .widgetized-sidebar li ul").slideToggle('normal');
			//$("#sidebar .subscribe-sidebar li").css({"paddingTop" : "0.4em", "paddingBottom" : "0.5em" });
			
			$('#sidebar .widgetized-sidebar li h2').mouseover(function() {
				if(!$(this).next().hasClass("opennav")) {
					if(hist[0]) {
						hist[0].slideUp('normal');
						hist[0].removeClass("opennav");
						hist.pop();
					};
					$(this).next().slideToggle('normal');
					$(this).next().attr("class", "opennav");
					hist.push($(this).next());
				};
			});
		};
		
		if( $("#sidebar .subscribe-sidebar") ) {
			var elheight = $("#sidebar .subscribe-sidebar li").height();
			$("#sidebar .subscribe-sidebar li").mouseover(function(e) {
					e.stopPropagation();
					$(this).animate({'height' : '60px' }, {queue: false, duration: 150});
					
			  }).mouseout(function(e) {
					e.stopPropagation();
					$(this).animate({'height' : elheight }, {queue: false, duration: 150});
			  });
		};
		
		if( $("#content .socialshare") ) {
			$("#content .socialshare li a").mouseover(function(e) {
					e.stopPropagation();
					$(this).parent().css("position","relative");
					$(this).parent().animate({'top' : '-18px' }, {queue: false, duration: 150});
					
			  }).mouseout(function(e) {
					e.stopPropagation();
					$(this).parent().animate({'top' : '0px' }, {queue: false, duration: 150});
			  });
		};
		
	});

};
