$(document).ready(function(){ 
	$('ul.menu').supersubs({ 
		minWidth:    12,
		maxWidth:    27, 
		extraWidth:  1     
	}).superfish({ speed: 'normal', delay: 0, animation: {opacity:'show',height:'show'}});  
	
	$('#featured').coinslider();
	
	Cufon.replace('ul#menu-navigation>li>a, .readmorediv, .posttitle h3, #right h2, #commentsarea h3, #relatedposts h3, #footer h2, .posttext h1, .posttext h2, .posttext h3, .posttext h4, .posttext h5, .posttext h6', {
	hover: true
	});
		
	$('#right ul li>ul>li, #footer ul li>ul>li').hover(function() { //mouse in
		$(this).stop().animate({ paddingLeft: '10px' }, 300);
	}, function() { //mouse out
	$(this).stop().animate({ paddingLeft: 0 }, 300);
	});
	
	$('.share img', $('.post')).hover(function() { //mouse in
		$(this).stop().animate({ paddingTop: '0px' }, 200);
	}, function() { //mouse out
		$(this).stop().animate({ paddingTop: '3px' }, 200);
	});
	
	$('a[href$="top"]').click( function() {
		$.scrollTo( $('#toppages'), {speed:1500} );
	});
	
	var tabContainers = $('div.tabs > div', $('#right'));
	tabContainers.hide().filter(':first').show();	
	$('div.tabs ul.tabNavigation a').click(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).fadeIn(500).show();
		$('div.tabs ul.tabNavigation a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	// Twitter widget
	$('#twitter_update_list').cycle({
        fx:     'scrollVert',
        speed:  'normal',
        timeout: 0,
        prev:    '#prev',
        next:    '#next'
    	});
	$('#pagewrapper a[rel^="prettyPhoto"]').prettyPhoto();
	
	jQuery(".toggle_body").hide(); 

	jQuery("h4.toggle").toggle(function(){
		jQuery(this).addClass("toggle_active");
		}, function () {
		jQuery(this).removeClass("toggle_active");
	});
	
	jQuery("h4.toggle").click(function(){
		jQuery(this).next(".toggle_body").slideToggle();

	});
}); 
