Generalize magnific popup