$(document).ready(function ($) { //$('.berry-share-button').click(function () { // $('.berry-social-contacts').toggleClass('move-in'); //}); //var timer = false; //$('.berry-share-button, .berry-social-contacts').mouseenter(function () { // clearTimeout(timer); // $('.berry-social-contacts').addClass('move-in'); //}).mouseleave(function () { // timer = setTimeout(function () { // $('.berry-social-contacts').removeClass('move-in'); // }, 400); //}); $("#popImage").on('load', function () { var img = document.getElementById("popImage"); $("#popImage").css("width", ""); if (img.width > ($(window).width() * 0.8)) { $("#popImage").css("width", $(window).width() * 0.8); $("#popImageDiv").css("width", $(window).width() * 0.8); } else { $("#popImageDiv").css("width", img.width); $("#popImage").css("width", ""); } $("#popImage").css("height", ""); if (img.height > ($(window).height() * 0.8)) { $("#popImage").css("height", $(window).height() * 0.8); $("#popImageDiv").css("height", $(window).height() * 0.8); } else { $("#popImageDiv").css("height", img.height); $("#popImage").css("height", ""); } }); }); function openGalleryOverlay() { $('#myPhotoGalleryModal').modal('show'); } function openLocationOverlay() { $('#myLocationModal').modal('show'); } function openTheDockConfigOverlay() { $('#myTheDockConfigModal').modal('show'); }