/*$(document).ready(function() {
	$('.nav ul li').mouseover(function(){
		$(this).addClass('hover');
	});
	$('.nav ul li').mouseout(function(){
		$(this).removeClass('hover');
	});
});
*/

$(function() {
	$(".edittext img").each(function(){  
		if($(this).width() > $(this).parent().width()) {  
			$(this).width("100%");  
		}
	});


	$('.tab tr').mouseover(function(){
		$(this).addClass('hover');
	}).mouseout(function(){
		$(this).removeClass('hover');
	});


	$(".home_nav li:last").addClass("last");

	$('.nav>ul>li').mouseover(function(){
		$(this).addClass('cur');
	}).mouseout(function(){
		$(this).removeClass('cur');
	})

	$('.topsearch .input').focus(function(){
		if($(this).val()==$(this).attr('devalue')){
			$(this).val('');
		}
	}).blur(function(){
		if($.trim($(this).val())==''){
			$(this).val($(this).attr('devalue'));
		}
	})

	$('.select').sSelect({ddMaxHeight: '300px'});
	
});


/*查询*/
/*$(function() {
	$(".topsearch .text").click(function(){
        if($(this).val() == '请输入产品名称')
        {            
            $(this).val('');
        }
		$(".topsearch .search-choose").fadeIn('500');
	});
	$(".close-btn").click(function(){
		$(".search-choose").fadeOut('500');
	});
});*/




function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
