﻿$(document).ready(function(){
	
	
	$('img.boton_titulo1').click(function () {
		$('div#desplegable_menu1').slideToggle();
	});
	
	$('.button1_close').click(function () {
		$('div#desplegable_menu1').slideToggle();
	});
	
	$('img.boton_titulo2').click(function () {
		$('div#desplegable_menu2').slideToggle();
	});
	
	$('.button2_close').click(function () {
		$('div#desplegable_menu2').slideToggle();
	});
	
	/*$('img.boton_titulo3').click(function () {
		$('div#desplegable_menu3').slideToggle();
	});
	
	$('.button3_close').click(function () {
		$('div#desplegable_menu3').slideToggle();
	});*/
	
	/*$('img.boton_titulo4').click(function () {
		$('div#desplegable_menu4').slideToggle();
	});
	
	$('.button4_close').click(function () {
		$('div#desplegable_menu4').slideToggle();
	});*/
	
	/*$('img.boton_titulo5').click(function () {
		$('div#desplegable_menu5').slideToggle();
	});
	
	$('.button5_close').click(function () {
		$('div#desplegable_menu5').slideToggle();
	});*/
});



function mouseOver_small(optionName, idioma) {
	var objRef = myGetElementById(optionName);
	var imageRef = myGetElementsByTagName("img", objRef)[0];
	if(imageRef != null) {
		imageRef.src = './images/menu/' + optionName + '_' + idioma + '_on.png';
	}
}

function mouseOut_small(optionName, idioma) {
	var objRef = myGetElementById(optionName);
	var imageRef = myGetElementsByTagName("img", objRef)[0];
	if(imageRef != null) {
		imageRef.src = './images/menu/'+ optionName + '_' + idioma + '_off.png';
	}
}

function mouseOver_menu(optionName) {
	var objRef = myGetElementById(optionName);
	var imageRef = myGetElementsByTagName("img", objRef)[0];
	if(imageRef != null) {
		imageRef.src = './images/' + optionName + '_on.png';
	}
}

function mouseOut_menu(optionName) {
	var objRef = myGetElementById(optionName);
	var imageRef = myGetElementsByTagName("img", objRef)[0];
	if(imageRef != null) {
		imageRef.src = './images/'+ optionName + '.png';
	}
}

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();
    });
};
