var Mapa = ( function () {
function Mapa( objeto ) {
var mapOptions = {
center: new google.maps.LatLng( 12.142906, -86.265631 ),
zoom: 11,
mapTypeControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP,
panControl: false,
zoomControl: true,
scaleControl: false,
streetViewControl: false
};
this.referencia = new google.maps.Map( objeto, mapOptions );
}
Mapa.prototype.dibujarPuntos = function () {
var ll_metropolitano = new google.maps.LatLng( 12.148066, -86.284219 ); //12.086566, -86.233987 ),
ll_saludintegral = new google.maps.LatLng( 12.148433, -86.289170 ),
ll_cruzazul = new google.maps.LatLng( 12.142906, -86.265631 );
var mk_metropolitano = new google.maps.Marker( {
position: ll_metropolitano,
map: this.referencia,
title: "Hospital Metropolitano"
} );
};
return Mapa;
} )();
(function ($) {
function ajustarFooter() {
var contentHeight = $(document.body).height(),
viewportHeight = $(window).height();
if (contentHeight < viewportHeight) {
$("div.footer-container").css({
"position": "fixed",
"bottom": "0",
"width": "100%"
});
}
}
function cargarTablaContenidos() {
var htmlString = "
" + $( element ).html() + "";
isChild = false;
}
else if ( tagName === "H3" && isChild === false ) {
htmlString += "";
//console.log( htmlString );
$( "#content-side" ).prepend( htmlString );
}
function resaltarTexto(elemento, colorInicial, colorFinal) { //#FFFB93
$(elemento).animate(
{
"backgroundColor": colorInicial
},
300,
function () {
$(elemento).animate(
{
"backgroundColor": colorFinal
},
600
);
}
);
}
// Si existe el elemento, llenar el indice de contenido de la izquierda
if ( document.getElementById( "content-side" ) ) {
cargarTablaContenidos();
}
if ( document.getElementById( "WelcomeContainer" ) ) {
window.onload = function () {
$( "#WelcomeContainer" ).fadeIn( 800 );
};
}
// Asignar el smoothScroll al indice de contenido
$("ul.content-menu a").smoothScroll({
afterScroll: function () {
var targetId = $(this).attr("href");
resaltarTexto($(targetId), "#FFFFB5", "transparent");
}
});
var page = window.location.pathname;
// Eventos para animar el menu principal
$( "#main-navigation a.parent" ).mouseover( function () {
$( this ).parent().find( "ul.sub-menu" ).removeClass( "hide" );
} );
$( "#main-navigation ul.sub-menu" ).mouseleave( function () {
$( this ).addClass( "hide" );
});
ajustarFooter();
window.onresize = function () {
ajustarFooter();
};
} )( jQuery );