angular.module("mediaModal")
    .factory("gallery", function($q, $uibModal){
        function open(animate){
            return $uibModal.open({
                animation: animate,
                templateUrl: 'galleryWindow.html',
                controller: 'GalleryController',
                size: "lg"
            }).result;
        }
        return {
            open: open
        }
    }
);