$(document).ready(function() {
	/* Add 'scrollVert' functionality for scroll boxe */
	(function($) {
		$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
			$cont.css('overflow','hidden');
			opts.before.push(function(curr, next, opts, fwd) {
				$(this).show();
				var currH = curr.offsetHeight, nextH = next.offsetHeight;
				opts.cssBefore = fwd ? { top: -nextH } : { top: nextH };
				opts.animIn.top = 0;
				opts.animOut.top = fwd ? currH : -currH;
				$slides.not(curr).css(opts.cssBefore);
			});
			opts.cssFirst = { top: 0 };
			opts.cssAfter = { display: 'none' }
		};
	})(jQuery);
	/* Tag cloud */
	$('#tags').tagSphere({
		height: 120,
		width: 275,
		slower: 0.65,
		speed: 3,
		timer: 50,
		radius: 60
	});
	/* Cycle of last-com sidebar */
	$('#last-com ul').cycle({ 
		fx: 'scrollVert',
		speed: 650,
		rev: true,
		timeout: 3000,
		next: '#last-com ol li.next', 
	    prev: '#last-com ol li.previous'
	});
	/* Cycle of last-news sidebar */
	$('#last-news ul').cycle({ 
		fx: 'scrollVert',
		speed: 650,
		rev: true,
		timeout: 3000,
		next: '#last-news ol li.next', 
	    prev: '#last-news ol li.previous'
	});	
});

