Trivial updates.
[wolnelektury.git] / src / wolnelektury / static / js / base.js
index bdb5fbe..2d0ebbf 100644 (file)
@@ -57,7 +57,7 @@
             })
         });
 
-        $('.more').each(function () {
+        $('.more-expand').each(function () {
             $(this).shorten({
                 showChars: 150,
                 moreText: "wiÄ™cej",
         });
 
 
+        $('.carousel').on('cycle-before', function(event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) {
+            $("iframe", outgoingSlideEl).attr("src", '');
+            $("iframe", incomingSlideEl).attr("src", $("iframe", incomingSlideEl).attr('data-src'));
+        });
+        $('.carousel section').first().each(function() {
+            $("iframe", this).attr("src", $("iframe", this).attr('data-src'));
+        });
+
 
         (function() {
             var $current = null;