/**
 * 大厅父页面
 */
$.registerNameSpace("cga.apps.major.main");
$.cga.apps.major.main = {

    changeIframeSrc : function(index,url) {
        var obj_li = $("#ul_link li");
        var obj = obj_li.eq(index);
        obj_li.siblings().removeClass('active');
        obj.addClass('active');
        var url = url || obj.find('a').attr('url');
        $("#mainIframe").attr('src' , url);
    }

};

$("#ul_link li").click(function() {
    var index = $(this).attr('index') || 0;
    var need_login = $(this).attr('need_login') || 0;
    if(need_login) {
    	var type = $.cga.client.client.checkClientLogin();
        if(!type) {
            $.cga.client.client.openLoginWindow();
            return;
        }
    }
    $.cga.apps.major.main.changeIframeSrc(index);
});

