WCAG 2.0 1.4.3: contrast
[wolnelektury.git] / wolnelektury / static / js / base.js
index 34f8500..7c02f03 100755 (executable)
                                        } 
                                });
                        });
                                        } 
                                });
                        });
+                       $('body').click(function(e) {
+                               if ($current == null) return;
+                               var p = $(e.target);
+                               while (p.length) {
+                                       if (p == $current)
+                                               return;
+                                       if (p.hasClass('hidden-box-trigger'))
+                                               return;
+                                       p = p.parent();
+                               }
+                               $current.hide('fast');
+                               $current = null;
+                       });
                })();
                })();
+