$ (function() {

	// animate logo
	$('#logo a img').css('max-width','none');
	
	
		
		$('#logo a img').hover(function() {
		var windowwidth = $(window).width(); 
		 if ((windowwidth) > '768'){  
			$(this).stop().animate({
			"width" : '170px',
			"height" : '170px',
			"top" : '-5px',
			"left" : '-10px'
			}, 100);
		}  
		}, function() {
		var windowwidth = $(window).width(); 
		 if ((windowwidth) > '768'){  
			$(this).stop().animate({
			"width" : '155px',
			"height" : '156px',
			"top" : '0',
			"left" : '0'
			}, 100);
		}
		});
	



	// animate social icons
	$('#nav-social a img').hover(function() {
		$(this).stop().animate({
		"width" : '55px',
		"height" : '55px',
		"top" : '-2px',
		"left" : '2px'
		}, 100);
		//}, 50).attr('src', 'img/fight4change-logo-big.png');
	}, function() {
		$(this).stop().animate({
		"width" : '52px',
		"height" : '50px',
		"top" : '0',
		"left" : '0'
		}, 100);
	});

	// footer logos
/* 	$('#logos img').css('opacity','0.7'); */
	$('#logos img').animate({
		"opacity" : 0.7
	});
	$('#logos img').hover(function() {
		$(this).stop().animate({
		"opacity" : '1.0'
		}, 200);
		//}, 50).attr('src', 'img/fight4change-logo-big.png');
	}, function() {
		$(this).stop().animate({
		"opacity" : '0.7'
		}, 200);
	});


// Form styling


$.fn.cleardefault = function() {
	return this.focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
};
$("#searchform input").cleardefault();




// Add P tags to Ordered lists for styling
$('#content-wrap ol li').wrapInner("<p></p>");

// Add span to blockquote for styling
$('blockquote').append("<span class='quote-close'></span>");

//<![CDATA[
$('body').bind('afterPreWpautop', function(e, o){
	o.data = o.unfiltered
		.replace(/caption\]\[caption/g, 'caption] [caption')
		.replace(/<object[\s\S]+?<\/object>/g, function(a) {
			return a.replace(/[\r\n]+/g, ' ');
        });

}).bind('afterWpautop', function(e, o){
	o.data = o.unfiltered;
});
//]]>


});
