/* $(document).ready(function(){ $('.popup-button').click(function(){ $('.dimmed, .popup').show(); }); $('.close').click(function(){ $('.dimmed, .popup').hide(); }); popupCenter(); $(window).resize(function(){ popupCenter(); }); }); $('.popup-button2').click(function(){ $('.dimmed, .popup2').show(); }); $('.close2').click(function(){ $('.dimmed, .popup2').hide(); }); popupCenter(); $(window).resize(function(){ popupCenter(); }); function popupCenter(){ var width = $('.popup').width(); var height = $('.popup').height(); var width = $('.popup2').width(); var height = $('.popup2').height(); $('.popup').css({'left' : ($(window).width() - width) / 2, 'top' : ($(window).height() - height) / 2}); $('.popup2').css({'left' : ($(window).width() - width) / 2, 'top' : ($(window).height() - height) / 2}); } */