cuts and optimizations
[wolnelektury.git] / wolnelektury / static / js / base.js
index 8225a1f..32cdd70 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;
+                       });
                })();
                })();
+               
 
 
 
 
 
 
@@ -87,7 +101,7 @@ $('.open-player').click(function(event) {
     event.preventDefault();
     window.open($(this).attr('href'),
         'player',
     event.preventDefault();
     window.open($(this).attr('href'),
         'player',
-        'width=420, height=500'
+        'width=422, height=500'
         );
 });
 
         );
 });
 
@@ -100,6 +114,10 @@ $('.open-player').click(function(event) {
             return false;
         });
 
             return false;
         });
 
+       $('.hoverclick').click(function() {$(this).closest('.hoverget').toggleClass('hover');});
+
+       $(function(){
+           $("#search").search();});
 
     });
 })(jQuery)
 
     });
 })(jQuery)