// JavaScript Document
$(document).ready(function() {
		$('.addcartatt').click(function(){//
			xajax_add_cart_with_att('<xjxquery><q>'+$(this).parent().children('.checkbox_att').attr('name')+'='+$(this).parent().children('.checkbox_att').val()+'&att_qty='+$(this).parent().children('.checkbox_qty').val()+'</q></xjxquery>');
			$(this).parent().children('.addcartloading').show();
	    });
		
	$("#header_cart").hover(
	function(){
	xajax_show_header_cart();
	},
	function(){
	$("#header_cart_content").slideUp("100"); 
	});
		
		
})

var t = n = count = 0;   
var showautotime=3000;
$(function(){   
count = $(".loop_list a").size();   
$(".loop_list a:not(:first-child)").hide();   
$(".loop_text li:first-child").css({"background":"#fff",'color':'#000'});     
$(".loop_text li").click(function() {   
var i = $(this).text() - 1;   
n = i;   
if (i >= count) return;   
$(".loop_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);   
$(this).css({"background":"#fff",'color':'#000'}).siblings().css({"background":"#000",'color':'#fff'});   
});   
t = setInterval("showAuto()", showautotime);   
$(".loop_banner").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", showautotime);});   
})   
function showAuto()   
{   
n = n >= (count - 1) ? 0 : n + 1;   
$(".loop_text li").eq(n).trigger('click');   
} 