﻿
(function($){
    
    var cTab = function(options){
        var temp = options;
        this.options = options || {};
        this.init(options);
    };
    
    cTab.init = cTab.prototype.init = function() {
        var oThis = this;
        $("#tab-nav1>li[id='0']", this.options.c).click(function(){
           //设置连接
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav1>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        $("#tab-nav1>li[id='1']", this.options.c).click(function(){
            $("#li3").attr("usemap","#Map2");
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav1>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        var f =  $("#tab-nav1").children("li:first");
        $("#li3").attr("usemap","#Map1");   //
        f.addClass('hover');
        var src = f.children('img:first').attr('src');
        f.children('img:first').attr('src', src.replace('.', '_hover.'));
         oThis.show(0);
    };
    
   
    cTab.show = cTab.prototype.show = function(index) {
        $('.tab-ctx > div', this.options.c).css("display", 'none');
        $('.tab-ctx > div', this.options.c).eq(index).css('display', 'block');
        $('.tab-more > a').css('display', 'none');
        $('.tab-more > a').eq(index).css('display', 'inline');
    };
    
    $.fn.extend({
        Tab: function(options) {
           $.extend(options, options||{'c': this}) 
           return new cTab(options);
        }
    });
    
   
    

    
})(jQuery);

//
(function($){
      // cTab2
     var cTab2 = function(options){
        var temp = options;
        this.options = options || {};
        this.init(options);
    };
    
    cTab2.init = cTab2.prototype.init = function() {
        // li
        var oThis2 = this;
        $("#tab-nav2>li[id='3']", this.options.c).click(function(){
           //var h = $("li.hover > img");
            var h = $("li.hover > img", $(this).parent());
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav2>li", oThis2.options.c).index(this);
            oThis2.show(index);
        });
        $("#tab-nav2>li[id='6']", this.options.c).click(function(){
           //var h = $("li.hover > img");
            var h = $("li.hover > img", $(this).parent());
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav2>li", oThis2.options.c).index(this);
            oThis2.show(index);
        });
         $("#tab-nav2>li[id='9']", this.options.c).click(function(){
           //var h = $("li.hover > img");
            var h = $("li.hover > img", $(this).parent());
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav2>li", oThis2.options.c).index(this);
            oThis2.show(index);
        });
         $("#tab-nav2>li[id='12']", this.options.c).click(function(){
           //var h = $("li.hover > img");
            var h = $("li.hover > img", $(this).parent());
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav2>li", oThis2.options.c).index(this);
            oThis2.show(index);
        });
        
         var f2 =  $("#tab-nav2").children("li:first");
        f2.addClass('hover');
        var src2 = f2.children('img:first').attr('src');
        f2.children('img:first').attr('src', src2.replace('.', '_hover.'));
         oThis2.show(0);
    };
    
    cTab2.show = cTab2.prototype.show = function(index) {
        $('.tab-ctx2 > div', this.options.c).css("display", 'none');
        $('.tab-ctx2 > div', this.options.c).eq(index).css('display', 'block');
        $('.tab-more2 > a').css('display', 'none');
        $('.tab-more2 > a').eq(index).css('display', 'inline');
    };   

     $.fn.extend({
        Tab2: function(options) {
           $.extend(options, options||{'c': this}) 
           return new cTab2(options);
        }
    });
})(jQuery);


// 土地协议出让公告

(function($){
    
    var cTab3 = function(options){
        var temp = options;
        this.options = options || {};
        this.init(options);
    };
    
    cTab3.init = cTab3.prototype.init = function() {
        // li
        var oThis = this;
        $("#tab-nav3>li[id='2']", this.options.c).click(function(){
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav3>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        $("#tab-nav3>li[id='4']", this.options.c).click(function(){
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav3>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        
         var f =  $("#tab-nav3").children("li:first");
        f.addClass('hover');
        var src = f.children('img:first').attr('src');
        f.children('img:first').attr('src', src.replace('.', '_hover.'));
         oThis.show(0);
    };
    
    cTab3.show = cTab3.prototype.show = function(index) {
        $('.tab-ctx3 > div', this.options.c).css("display", 'none');
        $('.tab-ctx3 > div', this.options.c).eq(index).css('display', 'block');
        $('.tab-more3 > a').css('display', 'none');
        $('.tab-more3 > a').eq(index).css('display', 'inline');
    };
    
    $.fn.extend({
        Tab3: function(options) {
           $.extend(options, options||{'c': this}) 
           return new cTab3(options);
        }
    });
    
   
    

    
})(jQuery);


//在线调查
(function($){
    
    var cTab4 = function(options){
        var temp = options;
        this.options = options || {};
        this.init(options);
    };
    
    cTab4.init = cTab4.prototype.init = function() {
        // li
        var oThis = this;
        $("#tab-nav4>li[id='14']", this.options.c).click(function(){
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav4>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        $("#tab-nav4>li[id='15']", this.options.c).click(function(){
           var h = $("li.hover > img", $(this).parent());
           
            var src = h.attr('src');
            
            h.attr('src', src.replace('_hover', ''));
            $('li.hover', $(this).parent()).removeClass('hover');
            
            h = $(this).children("img:first");
            src = h.attr('src');
            h.attr('src', src.replace('.', '_hover.'));
            $(this).addClass('hover');
            
            var index = $("#tab-nav4>li", oThis.options.c).index(this);
            oThis.show(index);
        });
        
         var f =  $("#tab-nav4").children("li:first");
        f.addClass('hover');
        var src = f.children('img:first').attr('src');
        f.children('img:first').attr('src', src.replace('.', '_hover.'));
         oThis.show(0);
    };
    
    cTab4.show = cTab4.prototype.show = function(index) {
        $('.tab-ctx4 > div', this.options.c).css("display", 'none');
        $('.tab-ctx4 > div', this.options.c).eq(index).css('display', 'block');
        $('.tab-more4 > a').css('display', 'none');
        $('.tab-more4 > a').eq(index).css('display', 'inline');
    };
    
    $.fn.extend({
        Tab4: function(options) {
           $.extend(options, options||{'c': this}) 
           return new cTab4(options);
        }
    });
    
    
})(jQuery);
