function mainmenu(){
$(" #nav ul ").css({display: "none"});
$(" #nav li").hover(function(){
	$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).slideDown(500);
	if($(this).find('.link_mnu:first').html()=='cyshop'){
		$(this).find('.link_mnu:first').css('background-image','url(../miscelanea/images/back_mnu_on.jpg)');
		$("#content").css({'margin-top':'5px !important;','margin-top':'-30px;'});
	}else{
		$(this).find('.link_mnu:first').css('background-image','url(../miscelanea/images/back_mnu_on.jpg)');
	}
	},function(){
		$(this).find('ul:first').slideUp(500);
		$(this).find('.link_mnu:first').css('background-image','url(../miscelanea/images/back_mnu_off.jpg)');
	});
}
$(document).ready(function(){
	mainmenu();
	$(".btn_roll").each(function(index){
		$(this).css('cursor','pointer');
		
		$(".btn_roll:eq("+index+")").mouseover(function(){
			var img = $(".valroll:eq("+index+")").attr('value');
			$("#roll_img").html('<img src="http://cyzone.s3.amazonaws.com/temporal/C201203/'+img+'" alt="" title="" />');
		});
	});
	
	$(".links_videos").fadeTo("fast",0.6);
	
	$("#mycarousel li").hover(function(){
		$(this).find('.links_videos:first').fadeTo("fast",1);
		var text = $(this).find('.links_videos input:first').attr("value");
		$(".txtfooter").html(text);
		$(".txtfooter").fadeIn("slow");
	},function(){
		$(this).find('.links_videos:first').fadeTo("fast",0.6);
		$(".txtfooter").html("");
	});
});

$(function() {
	$(".newsticker-jcarousellite").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible: 2,
		auto:4000,
		speed:1000
	});
});

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();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 0,
		scroll:1,
		animation:'slow',
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

//LINKS FOR BANINFOS
 function infoban1(){
 	location.href="javascript:fn_RegistraClickRedirect('men_pcycozone_pcyco','/portal/pages/actualizate_test_muestra_preguntas.asp?opc=1');void(0);";
 }
 function infoban2(){
 	location.href='#';
 }
 function infoban3(){
 	location.href='#';
 }
 //END LINKS FOR BANINFOS
 
 //LINKS BOTONES ROLLOVER
 //END BOTONES ROLL OVER
