// =======================
// top nav
// =======================
$(function() {
init_menu();
});
function init_menu(){
$("ul#top-nav li.dropdown").hover(
function(){ 
$(this).find("div").slideDown(200);
},
function(){
$(this).find("div").hide();
}
);
$("#top").addClass("ui-widget-content ui-corner-all");
$("li.dropdown > div").addClass("ui-widget-content ui-corner-all");
$("li.dropdown > div").hide();
}

$(function() {
init_menu2();
});
function init_menu2(){
$("ul#head-sn li.dropdown").hover(
function(){ 
$(this).find("div").slideDown(200);
},
function(){
$(this).find("div").hide();
}
);
$("#head").addClass("ui-widget-content ui-corner-all");
$("li.dropdown > div").addClass("ui-widget-content ui-corner-all");
$("li.dropdown > div").hide();
}


$(document).ready(function() {


// =======================
// slider
// =======================
$('#slides-wrapper .slides').cycle({
//	speed:0,
//	timeout:0,
fx:'fade',
speed:2000,
timeout:5000,
//	pause:1, 
pager:'#slides-pager', 
pagerAnchorBuilder: function(idx, slide) { 
return '<li><a href="#">' + ++idx + '</a></li>'; 
} 
}).css('visibility','visible');


// =======================
// top nav
// =======================

$("#top-nav li a").hover(function(){
$(this).addClass("selected");
},function(){
$(this).removeClass("selected");
});




// =======================
// fadeout
// =======================
$(".fadeout").hover(function(){
$(this).show().fadeTo(200, 0.7);
},function(){
$(this).fadeTo(200, 1.0 , function(){$(this).show()});
});


// =======================
// goods img
// =======================
$(".goods-box a img").hover(function(){
$(this).show().fadeTo(200, 0.7);
},function(){
$(this).fadeTo(200, 1.0 , function(){$(this).show()});
});


// =======================
// recomend goods img
// =======================
$(".recomend-goods img").hover(function(){
$(this).show().fadeTo(200, 0.7);
},function(){
$(this).fadeTo(200, 1.0 , function(){$(this).show()});
});


// =======================
// right img
// =======================
$(".right_bnr li a img").hover(function(){
$(this).show().fadeTo(200, 0.7);
},function(){
$(this).fadeTo(200, 1.0 , function(){$(this).show()});
});



// =======================
// item img
// =======================
$(".itemIMG img").hover(function(){
$(this).show().fadeTo(200, 0.7);
},function(){
$(this).fadeTo(200, 1.0 , function(){$(this).show()});
});



// =======================
// item image
// =======================
$('.itemIMG-main').cycle({
fx:'fade',
speed:'fast',
timeout:0,
pager:'.itemIMG-sub',
pagerAnchorBuilder: function(idx, slide) {
// return sel string for existing anchor
return '.itemIMG-sub p:eq(' + (idx) + ') a';
}
});


	
});
