c80dc54284f6210dab86b301ceb66d5bfce0ec4c
[lhc/web/www.git] / www / plugins-dist / mediabox / javascript / splash.mediabox.js
1 jQuery(function($){
2 // poser le cookie au callback de la box chargee
3 var set_cookie = function() {
4 Cookies.set("modalsplash", box_settings.splash_url, { expires: 7 });
5 }
6
7 $.modalboxsplash = function(href, options) {
8 if (box_settings_iframe) {
9 $.fn.mediabox($.extend({
10 href:href,
11 onComplete:set_cookie,
12 overlayClose:true,
13 iframe: true,
14 width: box_settings_splash_width,
15 height: box_settings_splash_height
16 },options));
17 } else {
18 $.fn.mediabox($.extend({
19 href:href,
20 onComplete:set_cookie,
21 overlayClose:true
22 },options));
23 }
24 };
25 // ouvrir la splash page si pas deja vue
26 if (Cookies.get("modalsplash") != box_settings.splash_url) {
27 $.modalboxsplash(box_settings.splash_url);
28 }
29 });