X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/032a2b1bdcecc42056de4a0171a55d173e4b765b..de25649c03f4d7d476bf8764ba8671681bfd6324:/src/wolnelektury/static/js/base.js

diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js
index 1cb62a485..2d0ebbf64 100644
--- a/src/wolnelektury/static/js/base.js
+++ b/src/wolnelektury/static/js/base.js
@@ -57,6 +57,22 @@
             })
         });
 
+        $('.more-expand').each(function () {
+            $(this).shorten({
+                showChars: 150,
+                moreText: "więcej",
+                lessText: "mniej"
+            });
+        });
+
+
+        $('.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() {