$(document).ready(function(){


    //************************* Para los iconos en la cabecera y los banners de la derecha ********************/
	/*	NOTA: Para que funcionen hay que ponerles una ID con el nombre de la imagen	*/



    $('#footer_links_contents img').hover(
		function()
			{
            var id = $(this).attr('id');
            $(this).attr('src', base_url+'img/'+id+'_hover.png');
	        },
        function(){
            var id = $(this).attr('id');
            $(this).attr('src', base_url+'img/'+id+'.png');
    	    }
    );


/*
		function()
			{
			$(this).stop().animate({"opacity": "0"}, "slow");
			},
		function()
			{
			$(this).stop().animate({"opacity": "1"}, "slow");
			}
*/


    //************************* Para los productos del inicio ********************/

    $('.producto01_element, #producto01_footer').hover(function(){
            var rel = $(this).attr('rel');
            $(this).attr('style', 'background-color: '+rel);
        },
        function(){
            var id = $(this).attr('rel');
            $(this).attr('style', 'background-color: #cdcdcd');
        }
    );



    //************************* Para las pestañas del inicio ********************/

    $('.cambio_productos').click(function()
	{
		var rel = '#'+$(this).attr('rel');
		
		$('#productos_inicio_01').attr('style', 'visibility:hidden; height: 0; width:0;');
		$('#productos_inicio_02').attr('style', 'visibility:hidden; height: 0; width:0;');
		$('#productos_inicio_03').attr('style', 'visibility:hidden; height: 0; width:0;');
		
		$(rel).attr('style', 'visibility:visible; height: 401px; width:528px;');
        }
    );



    //************************* Para los botones con fondo ********************/
	/*	NOTA: Para que funcionen hay que ponerles una ID con el nombre de la imagen	*/

    $('.ejemplo').hover(function(){
            var id = $(this).attr('id');
            $(this).attr('style', 'background-image: url('.base_url+'img/'+id+'_hover.png);');
        },
        function(){
            var id = $(this).attr('id');
            $(this).attr('style', 'background-image: url('.base_url+'img/'+id+'.png);');
        }
    );




});

