$(function(){
	/*Img Max-width*/
	/*$(".edittext img").each(function(){  
		if($(this).width() > $(this).parent().width()) {  
			$(this).width("100%");  
		}
	});

	$('.hoverlist li, .hovertable tbody tr').mouseover(function(){
		$(this).addClass('cur');
	}).mouseout(function(){
		$(this).removeClass('cur');
	});*/

	/*Img Loading*/
	//$('.productsort .img, .productlist .img img').attr("src", function() { return this.name });


	$('.select_style').sSelect({ddMaxHeight: '200px'});

	$('.lanbox').hover(function(){
		$('.lanbox ul').show();
	},function(){
		$('.lanbox ul').hide();
	});


	$('.cpmc .input').focus(function(){
		if($(this).val()==$(this).attr('defaultValue')){
			$(this).val('');
		}
	}).blur(function(){
		if($.trim($(this).val())==''){
			$(this).val($(this).attr('defaultValue'));
		}
	});

	/*$('.list_d>ul>li>ul').each(function(i){
		$(this).prev('a').click(function(){
			$(this).parent().addClass("cur").siblings().removeClass('cur list_1');
			$(this).next('ul').slideDown();
			$(this).parent().siblings().find('ul').slideUp();
			return false;
		})
	})*/
	
	$('.list_d>ul>li>ul').hide();
	$('.list_d .list_1 ul').show();
	$('.list_d>ul>li>ul').each(function(){
		$(this).prev().click(function(){
			$(this).parent().toggleClass('list_1').siblings().removeClass('list_1').find('ul').slideUp();
			$(this).next().slideToggle();
			return false;
		}).focus(function(){this.blur();});
	})
})


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();
    });
};

