/*
Author:The Wpbus Theme Team
Author URI: http://www.wpbus.com
*/
$(function(){		
			$("a").focus( 
                function () { 
                    $(this).blur(); 
                }
             )
        })

//switch
	$(document).ready(function() {

		$(".switch").click(function() {
				if ($('.user-form').css("display")=="none")
					$('.user-form').fadeIn('fast');
				else
					$('.user-form').fadeOut('slow');
		});
	});


//search
	$(function(){
		$("#nomatch-s")
		.attr({value:"请输入搜索关键词"})		
		.blur(function(){$(this).val($(this).val())})
		.focus(function(){$(this).val("")})

		$("#tops")
		.attr({value:"请输入搜索关键词"})		
		.blur(function(){$(this).val($(this).val())})
		.focus(function(){$(this).val("")})

		$(".btn").hover(
		function(){$(this).addClass("btnon")},
		function(){$(this).removeClass("btnon")}
		)
	});


//Resize Large Images
jQuery(document).ready(function(){
	var size = 550;
	var image = jQuery('.post-txt img');
	
	for (i=0; i<image.length; i++) {
		var bigWidth = image[i].width;
		var bigHeight = image[i].height;
	
		if (bigWidth > size) {	
			var newHeight = bigHeight*size/bigWidth;
			image[i].width = size;
			image[i].height = newHeight;
		}
	}
});
