function big(lyr) {
	$('#id_submenuu').css('display','block');
}

function small(lyr) {
	$('#id_submenuu').css('display','none');
}

function start() {
	$('#id_submenuu').css('display','none');
}

function loadVideo(id, tipo)
{
	var url = String(document.location.href).replace("#", "");
		url = "http://rollingstone.es/";
		
	mas_tipo = "";
	if (tipo!="" && tipo!=undefined)
	{
		mas_tipo = "/"+tipo;
	}
	$("#contenedor_video").load(url+"videos/loadConcrete/"+id+mas_tipo);
}


function loadVideoMini(id, tipo)
{
	var url = String(document.location.href).replace("#", "");
		url = "http://www.rollingstone.es/";
		
	mas_tipo = "";
	if (tipo!="" && tipo!=undefined)
	{
		mas_tipo = "/"+tipo;
	}
	$("#contenedor_video").load(url+"videos/loadminiConcrete/"+id+mas_tipo);
}


function loadImagen(id)
{
	var url = String(document.location.href).replace("#", "");
		url = "http://www.rollingstone.es/";
	
	$("#contenedor_imagen").load(url+"specials/loadImage/"+id);
}

function updateValues(valor, model, tipo)
{
	//document.getElementById('mesoculto').value = valor;
	var url = String(document.location.href).replace("#", "");
		url = "http://www.rollingstone.es/";
		
	if (valor!="")
	{
		//document.forms.busqueda_mes.action = url+"concerts/month/"+valor;
		window.location.href = url+model+"/"+tipo+"/"+valor;
	} else {
		//document.forms.busqueda_mes.action = url+"concerts";
		window.location.href = url+model;
	}
	//document.forms.busqueda_mes.submit();
}

function openWebsGrupo()
{
	var el_div = document.getElementById('contentWebsGrupo');
	if (el_div.style.display=="block")
	{
		el_div.style.display = "none";
	} else {
		el_div.style.display = "block";
	}
}

var posicion = 1;
function theRotator() {
	//Set the opacity of all images to 0
	//$('div#rotator div#').css({opacity: 0.0});
	//
	////Get the first image and display it (gets set to full opacity)
	//$('div#rotator img:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	setInterval('rotate()',5000);
	
}

function rotate() {
	//$('#img_'+posicion).css('display','none');
	if (posicion==1)
	{
		$('#img_1').attr('src', 'http://rollingstone.es/img/web/4.jpg');
		$('#enlace_1').attr('href', 'http://rollingstone.es/specials/view/los-100-mejores-cantantes-de-todos-los-tiempos');
		$('#img_2').attr('src', 'http://rollingstone.es/img/web/5.jpg');
		$('#enlace_2').attr('href', 'http://rollingstone.es/specials/view/las-100-mejores-guitarras-del-rock');
		$('#img_3').attr('src', 'http://rollingstone.es/img/web/6.jpg');
		$('#enlace_3').attr('href', 'http://rollingstone.es/specials/view/los-500-mejores-albumes-de-la-historia');
		posicion++;
	} else {
		$('#img_1').attr('src', 'http://rollingstone.es/img/web/1.jpg');
		$('#enlace_1').attr('href', 'http://rollingstone.es/specials/view/los-50-mejores-discos-del-rock-espanol-1');
		$('#img_2').attr('src', 'http://rollingstone.es/img/web/2.jpg');
		$('#enlace_2').attr('href', 'http://rollingstone.es/specials/view/las-200-mejores-canciones-del-pop-espanol');
		$('#img_3').attr('src', 'http://rollingstone.es/img/web/3.jpg');
		$('#enlace_3').attr('href', 'http://rollingstone.es/specials/view/las-500-mejores-canciones-de-la-historia');
		posicion = 1;
	}
};

$(document).ready(function() {		
	//Load the slideshow
	theRotator();
});
