jQuery.fn.searchclick=function() {

	$(this).find("input:text").each(function(){

        if(this.value == '')

      this.value = this.title;

    })

	.focus(

			function(){

			if(this.value == this.title) 

			this.value = '';

				})

	.blur(

			function(){

		

		    if(this.value == '')

            this.value = this.title;

		   });

}



jQuery.fn.formclick=function() {

	$(this).find("input:submit,input:reset,input:button").css({"border":"1px solid #68BEE3","background-color":"#EEF5F7","padding":"3px 5px 1px 5px","margin-right":"10px"});

	$(this).find("input:text,input:password,textarea").css({"border":"1px solid #8AAEC1","background-color":"#fff","color":"#999","padding":"2px"})

	.each(function(){

        if(this.value == '')

      this.value = this.title;

    })

	.focus(

			function(){$(this).css({"border":"1px solid #68BEE3","background-color":"#EEF5F7"})

			if(this.value == this.title) 

			this.value = '';

				})

	.blur(

			function(){

		   $(this).css({"border":"1px solid #8AAEC1","background-color":"#fff"});

		    if(this.value == '')

            this.value = this.title;

		   });

}

//限制图片最大宽度和最大高度，自适应

jQuery.fn.ImageAutoSize = function(width,height)

{

    $("img",this).each(function()

    {

        var image = $(this);

        if(image.width()>width)

        {

            image.width(width);

            image.height(width/image.width()*image.height());

        }

        if(image.height()>height)

        {

            image.height(height);

            image.width(height/image.height()*image.width());

        }

    });

} 



$(document).ready(function() {

$('a').focus(function(){$(this).blur()})

$(".nav li:first").css("border-top","none");

$('.nav li , .prolist li').hover(

				   function(){$(this).addClass("lion");},

				   function(){$(this).removeClass("lion");

					   })



$(".search").searchclick();

$(".feedback,.order").formclick();

$(".pro:nth-child(3n)").css("margin-right","0");
$('.pro').hover(
function(){$(this).css({'border':'1px solid #BE8A78','background':'#FFFAF4'})},
function(){$(this).css({'border':'1px solid #ccc','background':'transparent'})})

$('.ipro:odd').css("border-right","none");

$('.ipro:gt(1)').css("border-bottom","none");

$('.inqiry tr:odd').css('background','#F6FAFB')

//if($('#rightside').height()>=$('#leftside').height()){
//$('#leftside').height($('#rightside').height()+80)
//}



});