$(document).ready(function() {
		$('.warning').remove();
		if (currentPage == 'home_page') {
			ResetMenu();
			$('#home_page > img').attr('src','imagenes/sitio/homepage_w.png');
			if ($.browser.mozilla) {
				$('.text_caption').css({
					'padding': '0px 50px 0px 0px',
					'line-height': '22px'
				});
			}
			else if ($.browser.msie) {
				$('.text_caption').css({
					'padding': '15px 50px 0px 0px',
					'line-height': '20px'
				});
			}
			else {
				$('.text_caption').css({
					'padding': '15px 50px 0px 0px',
					'line-height': '25px'
				});
			}
			$('#galeria').galleryView({
				show_filmstrip: false
			});
		}
		if (currentPage == 'ambience') {
			ResetMenu();
			$('#ambience > img').attr('src','imagenes/sitio/ambience_w.png');
			$('#galeria').galleryView({});
		}
		if (currentPage == 'catalogue') {
			ResetMenu();
			$('#catalogue > img').attr('src','imagenes/sitio/catalogue_w.png');
			$('#galeria').galleryView({ });
		}
		if (currentPage == 'items') {
			ResetMenu();
			$('#catalogue > img').attr('src','imagenes/sitio/catalogue_w.png');
			$("#carousel").CloudCarousel({	
					reflHeight: 56,
					reflGap:2,		
					xPos: 350,
					yPos: 100,
					minScale: 0.10,
					reflOpacity: 0.5,
					buttonLeft: $("#left"),
					buttonRight: $("#right"),
					altBox: $("#carousel_alt"),
					titleBox: $("#carousel_title"),
					mouseWheel:true
				});
		}
		if (currentPage == 'location') {
			ResetMenu();
			$('#location > img').attr('src','imagenes/sitio/location_w.png');
		}
		if (currentPage == 'collaborators') {
			ResetMenu();
			$('#collaborators > img').attr('src','imagenes/sitio/collaborators_w.png');
		}
		if (currentPage == 'contact') {
			ResetMenu();
			$('#contact > img').attr('src','imagenes/sitio/contact_w.png');
		}
		
//$('#header').append('<div id="music"><object id="music" type="application/x-shockwave-flash" data="music/player_mp3_mini.swf" width="200" height="20"><param name="movie" value="music/player_mp3_mini.swf" /><param name="bgcolor" value="000000" /><param name="FlashVars" value="mp3=music/song.mp3&autoplay=1&loop=1"/></object></div>');
});
//'<div id="music"><object id="music" type="application/x-shockwave-flash" data="music/player_mp3_mini.swf" width="200" height="20"><param name="movie" value="music/player_mp3_mini.swf" /><param name="bgcolor" value="000000" /><param name="FlashVars" value="mp3=music/song.mp3&autoplay=1&loop=1"/></object></div>'

function ResetMenu() {
	$('#home_page > img').attr('src','imagenes/sitio/homepage.png');
	$('#ambience > img').attr('src','imagenes/sitio/ambience.png');
	$('#catalogue > img').attr('src','imagenes/sitio/catalogue.png');
	$('#location > img').attr('src','imagenes/sitio/location.png');
	$('#collaborators > img').attr('src','imagenes/sitio/collaborators.png');
	$('#contact > img').attr('src','imagenes/sitio/contact.png');
}

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

function checkVersion()
{
  var msg = "You're not using Internet Explorer.";
  var ver = getInternetExplorerVersion();
  return ver;
}

