var __xijuan__ = {channel:xijuan.channel || 'index',
    top:{
        All:{
            js:['Inc/global/jquery-latest.pack.js',
                    'Inc/global/jquery-enlarge.js',
                    'Inc/global/global.js',
                    'Inc/pagetopinfo.js'],
            css:['Inc/global/base.css',
                    'Inc/global/block.css',
                    'Inc/global/common.css']
        },
        channel:{
            index:{
                js:['Inc/global/index.js'],
                css:['Inc/global/vdocom.css','Inc/global/v2.css'],
				script:["if(window.location.href.indexOf('admin/index')>1){__xijuan__._includeCss('Inc/global/admin.css');__xijuan__._includeScript('"]
            },video:{
                js:['Inc/global/video.js'],
                css:['Inc/global/audio.css','Inc/global/videolist.css']
            },audio:{
                css:['Inc/global/vdocom.css','Inc/global/block.css'],
                js:['Inc/global/audio.js']
            },space:{
                js:[''],
                css:['Inc/global/my.css']
            },videoplay:{
                js:[''],
                css:

['Inc/global/vdocom.css','Inc/global/dialog.css']
            },audioplay:{
                js:[''],
                css:['Inc/global/dialog.css','Inc/global/display.css','Inc/global/vdocom.css']
            },group:{
                css:["Inc/global/grpcom.css"]
			},group_fensi:{
				js:[""],
				css:["Inc/global/grpcom.css"]
            },group_group:{
				js:[""],
				css:["Inc/global/grpcom.css"]
			},top:{
				css:["css/top.css"],
				js:['']
			},zt:{
				js:[''],
                css:['Inc/global/vdocom.css']
			},pk:{
				js:[''],
                css:['Inc/global//vdocom.css']
			}

        }
    },
    foot:{
        All:{
            //js:['Inc/global/557952.js'],//全局流量统计
            script:["globalinitiallize()"]
        },
        channel:{
            index:
			{
				js:['Inc/global/557952.js'],//流量统计
                script:["initiallize();"]
            },
            video:
			{
				//js:['Inc/global/557952.js'],//流量统计
                script:["initiallize();"]
            },
			audio:
			{
				//js:['Inc/global/557952.js'],//流量统计
				script:["initiallize();"]
			},
			space:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			videoplay:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			audioplay:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			group:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			group_fensi:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			group_group:
			{
				//js:['Inc/global/557952.js'],//流量统计
			},
			top:
			{
				//js:['Inc/global/557952.js'],//流量统计
				script:["initiallize();"]
			},
			zt:
			{
				//js:['Inc/global/557952.js']//流量统计
			},
			pk:
			{
				//js:['Inc/global/557952.js']//流量统计
			}
        }
    },
    include:function(station, channel) {
        station = station ? 'foot' : 'top';
        channel = channel || this.channel || 'index';
        var vars = this[station];
        this._include(vars.All);
        this._include(vars.channel[channel]);
    },
    _includeScript:function(url, id, defer) {
        url = url ? ' src="' + url + '" ' : '';
        id = id ? ' id="' + id + '" ' : '';
        defer = defer || '';
        document.write('<script type="text/javascript" ' + id + ' ' + url + ' ' + defer + '><\/script>');
    },
    _includeCss:function(url, id) {
        url = url ? ' href="' + url + '" ' : '';
        id = id ? ' id="' + id + '" ' : '';
        document.write('<link rel="stylesheet" type="text/css" ' + id + ' ' + url + ' />');
    },
    _include:function(o) {
        var k,a;
        for (k in o) {
            a = o[k];
            if (k == 'js') {
                for (i = 0; i < a.length; i++) {
                    this._includeScript(a[i]);
                }
            }
            else if (k == 'css') {
                for (i = 0; i < a.length; i++) {
                    this._includeCss(a[i]);
                }
            }
            else if (k == 'js_id') {
                for (i = 0; i < a.length; i++) {
                    this._includeScript('', a[i]);
                }
            }
            else if (k == 'css_id') {
                for (i = 0; i < a.length; i++) {
                    this._includeCss('', a[i]);
                }
            }
            else if (k == 'script') {
                for (i = 0; i < a.length; i++) {
                   
                }
            }
        }
    }
};
__xijuan__.include();