window.Blogocalypse = window.Blogocalypse || {};


Blogocalypse.fullscreen = function(anchor){
    this.$anchor = jQuery(anchor);
    this.$target = jQuery(this.$anchor.attr("data-usb-fullscreen"));
    this.$close  = this.$target.find(".usb-fullscreen-close");

    this.bind();
};

jQuery.extend(Blogocalypse.fullscreen.prototype, {
    bind: function(){
        this.$anchor.click(this.toggle.bind(this));
        this.$close.click(this.toggle.bind(this));
    },

    toggle: function(){
        this.$target.toggleClass("open closed");
    }
});

jQuery(document).ready(function(){
    jQuery("a[data-usb-fullscreen]").each(function(){
        new Blogocalypse.fullscreen(this);
    });
});

@@ -277,16 +277,170 @@
 ();%0A%7D;%0A%0A
+Blogocalypse.fullscreen.attach = function()%7B%0A    jQuery(%22a%5Bdata-usb-fullscreen%5D%22).each(function()%7B%0A        new Blogocalypse.fullscreen(this);%0A    %7D);%0A%7D;%0A%0A
 jQuery.e
@@ -726,85 +726,73 @@
 ady(
-function()%7B%0A    jQuery(%22a%5Bdata-usb-fullscreen%5D%22).each(function()%7B%0A        new
+Blogocalypse.fullscreen.attach);%0AjQuery(document).on('page:load',
  Blo
@@ -811,28 +811,18 @@
 llscreen
-(this);%0A    %7D);%0A%7D
+.attach
 );%0A

fix fullscreen widget for turbolinks