$(document).ready(function() {

	$('.accordion').accordion();
	var aside = $('aside').height();
	var prplh = $('.purpleheart').height();
	var posts = $('.postarea').height();
	$('.contentarea').css({
		'min-height':aside+prplh-posts,
		'padding-bottom':posts+24
	});
	
	if ($('body').hasClass('page-template-tmpl-landing-php')) {
		$('.accordion').accordion({ active: 1 });
	}
	
    $('header nav ul li').hover(
    	function() { 
    		$(this).addClass('hover');
    	}, function() {
    		$(this).removeClass('hover');
    	}
    );
	
	$('.recentpostsdated li:last').css('border-bottom','none');
	$('.widget').each(function(){ $(this).addClass('clearfix'); });
	
	$('input[type="text"],input[type="password"],input[type="email"]').each(function(){ 
		var pwd = $(this).parent().width();
		$(this).removeAttr('size');
		$(this).css('width',pwd-24);
	});
	
	$('img.floatleft').each(function(){ $(this).wrap('<div class="float left photo"></div>'); });
	$('img.floatright').each(function(){ $(this).wrap('<div class="float right photo"></div>'); });
		
	$('.features').cycle({
		slideExpr:	'.feature',
		pager:  	'.nav .menu',
		pause: 		true
	});
	var features = $('.features .feature').length;
	
	
});
