$(document).ready(function(){

	$('#tecnologia-y-equipos ul.equipos li div.info').hide();

	$('#tecnologia-y-equipos ul.equipos li h2 a').each(function() {
	  $(this).click(function(event) {
	  	event.preventDefault();
		var full_url = this.href;
	    $('#tecnologia-y-equipos ul.equipos li div.info').hide();
		$(this).parents("li.equipo").children("div.info").slideDown("fast",function(){
			var parts = full_url.split("#");
			var trgt = parts[1];
			var target_offset = $("#"+trgt).offset();
			var target_top = target_offset.top;			
			$('html, body').animate({scrollTop:target_top}, 500);
			$(this).click();
		});
	  });
	}); 
	
	var myFile = document.location.toString();
	if (myFile.match('#')) { // the URL contains an anchor
	  // click the navigation item corresponding to the anchor
	  var myAnchor = '#' + myFile.split('#')[1];
	  $('#tecnologia-y-equipos ul.equipos li h2 a[href="' + myAnchor + '"]').click();
	}

});



