var Ellington = window.Ellington || {};


/*
 * Load
 */

Ellington.Load = (function($) {
  return function() {
    
    if($.fn.wmd && Ellington.OembedProcessor) {
      $('#id_comment, body.blog_entry_form #id_body').wmd({
        preview_preprocess: Ellington.OembedProcessor()
      });
    }

    $('#business_profile, #comment_form .tabbed_content').tabs();
    $('.search_form .select select').uniform();
    $('.accordion').accordion({'autoHeight': false});

    Ellington.Carousel('#mast .carousel', {'width': 990, 'height': 400});
    Ellington.Carousel('.content > .carousel', {'width': 670, 'height': 400});
    Ellington.Carousel('.section_wide .carousel', {'width': 440, 'height': 300});

    if(Ellington.Flagging) {    
      var flagging = new Ellington.Flagging('a.content-flag-link');
      flagging.bind_listeners();
    }
  };
})(jQuery);


jQuery(document).ready(function($) {
  Ellington.Load();
});

