$(document).ready(function() {
	$(document).pngFix();
	$('.share-it, .widget_tag_cloud div, .widget ul, .widget #calendar_wrap tbody').children().hover(function() {
		$(this).siblings().stop().fadeTo(500,0.3);
	}, function() {
		$(this).siblings().stop().fadeTo(500,1);
	});
	$('.wp-pagenavi').children().hover(function() {
		$(this).siblings("a:not(span)").stop().fadeTo(500,0.3);
	}, function() {
		$(this).siblings("a:not(span)").stop().fadeTo(500,1);
	});
	$('.fadeout, #author-links a').hover(function(){
		$(this).stop().fadeTo('slow',0.4);
	},function(){
		$(this).stop().fadeTo('slow',1);
	});
	$('.fadein').stop().fadeTo('slow',0.4)
	$('.fadein').hover(function(){
		$(this).stop().fadeTo('slow',1);
	},function(){
		$(this).stop().fadeTo('slow',0.4);
	});
	$('.widget ul li:last-child').stop().css('border','0');
	$('div.widget p:first-child').stop().css('paddingTop','10px');
	$('.social-info div:last-child').stop().css('paddingBottom','30px');
	$("a.comment-reply-link").hover(function(){
		$(this).animate(
			{paddingRight:"30", marginRight:"10"}, {duration: 'slow', easing: 'easeOutBounce'});
			 return false;
	}, function(){
		$(this).animate({paddingRight:"20", marginRight:"0"}, {duration: 'slow', easing: 'easeOutBounce'});
	});
	$("h2.name, h2.name a, .post-author h2 a, .social-info a").hover(function(){
		$(this).animate(
			{paddingLeft:"20"}, {duration: 'slow', easing: 'easeOutBounce'});
			 return false;
	}, function(){
		$(this).animate({paddingLeft:"0"}, {duration: 'slow', easing: 'easeOutBounce'});
	});
	$(".catnav li a:not(.catnav li.current-cat a)").hover(function(){
		$(this).stop().animate(
			{paddingLeft:"20", paddingRight:"20"}, {duration:'1000', easing: 'easeInSine'});
			 return true;
	}, function(){
		$(this).stop().animate({paddingLeft:"10", paddingRight:"10"}, {duration:'1000', easing: 'easeOutSine'});
	});
	$(".catnav ul li a").hover(function(){
		$(this).animate(
			{paddingLeft:"20", paddingRight:"20"}, {duration:'fast', easing: 'easeInSine'});
			 return true;
	}, function(){
		$(this).animate({paddingLeft:"10", paddingRight:"10"}, {duration:'fast',easing: 'easeOutSine'});
	});
	$("div.widget_tag_cloud a:even").stop().addClass("cloud_color");
	$("div.widget_tag_cloud a:even").hover(function(){
		$(this).removeClass("cloud_color").addClass("cloud_hover");
	}, function(){
		$(this).removeClass("cloud_hover").addClass("cloud_color");
	});
	$('.widget #s').attr('value', 'Search');
	$('img.thumb').attr('title', '');
	$("#cancel-comment-reply-link").text("Cancel");
});

// Drop down menu
$(document).ready(function() {
	$('ul.catnav, .pagenav').superfish({
		delay:       500,                            // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
        autoArrows:  false,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
    }); 
});

$(function() {
	$('input[type="text"]').addClass("idle");
    $('input[type="text"]').focus(function() {
    	$(this).removeClass("idle").addClass("focus");
    	if (this.value == this.defaultValue){ 
    		this.value = '';
		}
		if(this.value != this.defaultValue){
	    	this.select();
	    }
    });
    $('input[type="text"]').blur(function() {
    	$(this).removeClass("focus").addClass("idle");
    	if ($.trim(this.value) == ''){
			this.value = (this.defaultValue ? this.defaultValue : '');
		}
    });
    Cufon.replace('h2.title, h1, h2, h3, h4, h5, a.comment-reply-link, .social-info a, #submit, #cancel-comment-reply-link');
});

$(document).ready(function() { 
	$("a.nextPage").hover(function(){
	$(this).animate(
		{right:"-10"}, {duration: 'slow', easing: 'easeOutBounce'});
		return;
	}, function(){
		$(this).animate({right:"-5"}, {duration: 'slow', easing: 'easeOutBounce'});
	});
	$("a.prevPage").hover(function(){
		$(this).animate(
			{left:"-10"}, {duration: 'slow', easing: 'easeOutBounce'});
			 return;
	}, function(){
		$(this).animate({left:"-5"}, {duration: 'slow', easing: 'easeOutBounce'});
	});
	$("div.item").hover(function () {
      $(".featured-info p", this).show("fast");
	}, function() {
      $(".featured-info p", this).hide("fast");
	});
});