 jQuery(document).ready(function(){

//SCROOLTOP
jQuery("#lk_top").click(function(){
jQuery('html, body').animate({scrollTop:jQuery("body").offset().top}, 1500);
});


//JSCROLLPANE
if($.browser.msie && $.browser.version <= 7){
}else{
$("#men_pro_links_int").jScrollPane({ showArrows:false });
}



//MENU - ULTIMO LINK
jQuery("#menu_produtos_center a:last , .esp span:last , #box_novidades a:last").css('border-bottom','none');






//SLIDES HOME
jQuery("#slides_h").cycle({
fx:'fade',
timeout:8000,
cleartypeNoBg:true,
pager:'#slides_h_pags'
});


//SLIDES NOTICIAS
jQuery("#slides_not").cycle({
fx:'fade',
timeout:0,
cleartypeNoBg:true,
next:'#set_dir',
prev:'#set_esq'
});


//SLIDES PRODUTOS DIREITA
jQuery("#box_r_estampas").cycle({
fx:'fade',
timeout:0,
cleartypeNoBg:true,
next:'#set_r_dir',
prev:'#set_r_esq'
});


//SLIDES LEGENDAS
jQuery("#produto_home_infos_sld").cycle({
fx:'fade',
timeout:0,
cleartypeNoBg:true,
next:'.sd2',
prev:'.se2'
});



//SLIDES LEGENDAS
jQuery("#infos_d_sld_thumbs_sld").cycle({
fx:'scrollHorz',
timeout:0,
cleartypeNoBg:true,
next:'#btn_avancar',
prev:'#btn_voltar'
});


jQuery(".sel").click(function(){
jQuery(this).next(".menu_sub").slideToggle();
});


//LEGENDA
jQuery("#estampos_fts img , #box_r_estampas img").hover(function(){
var text = jQuery(this).attr('class');
jQuery("#bal p").html(text);
jQuery("#bal").show();
},function(){
jQuery("#bal p").html("");
jQuery("#bal").hide();
});


jQuery(document).mousemove(function(e){
var x = e.pageX;
var y = e.pageY;
jQuery("#bal").css('left',x);
jQuery("#bal").css('top',y);
});


jQuery(".info_d_open").click(function(){
jQuery(".info_d_content").hide();
jQuery(this).next("h1").next(".info_d_content").slideToggle();
jQuery(".info_d_open").css('background-position','top');
jQuery(this).css('background-position','bottom');
invert_set();
});


jQuery(".info_d h1").click(function(){
jQuery(".info_d_content").hide();
jQuery(this).next(".info_d_content").slideToggle();
jQuery(".info_d_open").css('background-position','top');
jQuery(this).prev(".info_d_open").css('background-position','bottom');
invert_set();
});












//DEFAULT - PRIMEIRO ABERTO
jQuery(".info_d_content:nth(0)").css('display','block');
invert_set();





});



function invert_set(){
jQuery(".info_d_content:visible").prev("h1").prev(".info_d_open").css('background-position','bottom');
jQuery(".tit_sel").removeClass();
jQuery(".info_d_content:visible").prev("h1").addClass("tit_sel");
}


