 /* 页面交互公共效果 */

 // 加载头尾代码片段
 (function(win, $) {

    $(".tab-view").each(function(index, el) {
        new TabView({
            dom: el,
            activeCls: 'current',
            triggerEvent: 'mouseover'
        });
    });
    
     var Include = function(cfg) {
         this.cfg = cfg;

         this._init();
     };

     Include.prototype = {
         constructor: Include,

         _init: function() {
             var c = this.cfg;

             if (c.async !== false) c.async = true;

             this.$container = $('#' + c.id);
         },

         fetch: function() {
             var c = this.cfg,
                 self = this;

             return $.ajax({
                 url: c.src,
                 type: 'GET',
                 dataType: 'html',
                 async: c.async,
                 success: function(html) {
                     self.$container.html(html);

                     c.onload && c.onload(html);
                 }
             });
         }
     };

     // 需要引入的代码片段
     var includes = [{
         id: 'header',
         src: '/header.inc.html',
         onload: function() {
             // 给具有placeholder属性的元素增加此支持
             $('[placeholder]').placeholder();
             // console.log('...header loaded...');
         }
     }, {
         id: 'footer',
         src: '/footer.inc.html',
         onload: function() {
             // console.log('...footer loaded...');
         }
     }];

     $.each(includes, function(i, cfg) {
         if ($('#' + cfg.id).length) {
             new Include(cfg).fetch();
         }
     });
	var delxmxxsb = $("[href='/fzgg/076025/subpage.html']");
	$(delxmxxsb[0]).parent().parent().remove();
 }(this, jQuery));
