Experiments with new reader.
[wolnelektury.git] / apps / wolnelektury_core / static / js / book_text / other.js
diff --git a/apps/wolnelektury_core/static/js/book_text/other.js b/apps/wolnelektury_core/static/js/book_text/other.js
new file mode 100644 (file)
index 0000000..1956aa8
--- /dev/null
@@ -0,0 +1,36 @@
+(function($){$(function(){
+
+
+$("#menu-other").show();
+
+
+$(".display-other").click(function(e) {
+    e.preventDefault();
+
+    if ($('#big-pane').length == 0)
+        $("#other-text").show();
+    $("#other-versions").slideUp('fast');
+    $(".menu").removeClass('selected');
+
+    $("#other").hide();
+    $("nav .active").removeClass('active');
+    $("body").addClass('with-other-text');
+
+    $.ajax($(this).attr('data-other'), {
+        success: function(text) {
+            $("#other-text-body").html(text);
+            $("#other-text-waiter").hide();
+            $("#other-text-body").show();
+        }
+    });
+});
+
+
+$("#other-text-close").click(function(e) {
+    e.preventDefault();
+    if ($('#big-pane').length == 0)
+        $("#other-text").hide();
+    $("body").removeClass('with-other-text');
+});
+
+})})(jQuery);