(function ($) {
/**
 * Hook for handling menu dropdowns
*/
Drupal.behaviors.lts_menu_toggle = {
  attach: function(context, settings) {
    var _aclass = 'a.a-class';
    var _pclass = 'div-parent-add-class';
    $(_aclass).click(function() {
      if($(this).parent().hasClass(_pclass)) {
        $(this).parent().removeClass(_pclass);
      }
      else {
        $(this).parent().addClass(_pclass);
      }
    });
  }
}
/**
 * Hook for footer menu
*/
Drupal.behaviors.lts_footer_menu = {
  attach: function(context, settings) {
    $('.footer-nav .btn a#secure_login').click(function() {
      $(this).next('ul').slideToggle();
      return false;
    });
  }
}

/**
 * Hook for playing video
*/
Drupal.behaviors.lts_video = {
  attach: function(context,settings) {
    if(typeof(Drupal.settings.flowplayer_swf_path) == 'undefined' || typeof(Drupal.settings.flowplayer_rtmp_path) == 'undefined' || typeof(Drupal.settings.rtmp_file) == 'undefined' || typeof(Drupal.settings.rtmp_path) == 'undefined') {
      return;
    }
    $f("a.rtmp", Drupal.settings.flowplayer_swf_path, {
      clip: {
        provider: 'rtmp'
      },
      plugins: {
        rtmp: {
          url: Drupal.settings.flowplayer_rtmp_path,
          netConnectionUrl: Drupal.settings.rtmp_path
        }
      }
    });
  }
}

})(jQuery);
;

