var config = {
	table: {
		left: 0,
		top: 0,
		width: 308,
		height: 96
	},
	cavasPos: {
		l: 168,
		t: 270,
		r: 400,
		b: 384
	},
	share: {
		items: {
			tsina: 'tsina',
	        douban: 'douban',
	        qzone: 'qzone',
	        weixin: 'weixin',
	        tqq: "tqq"
		},
		url: 'http://s.share.baidu.com/',
		weixinSign: 'http://ime.baidu.com/index.html#10006-weixin-1-6358-0629b82e8bd20c82f766611c23eca2f9',		//分享到朋友圈回流码
		opts: {
			click: 1,
			to: 'sina',		// 分享媒体id(tsina, douban, qzone, weixin)
			type: 'text',
			searchPic: 1,		// 是否自动抓取页面图片(0:抓取;1:不抓取)，默认为0，目前只针对新浪微博
			key: '', 			// appkey
			sign: 'on',			// 回流统计
	        url: encodeURIComponent('http://shurufa.baidu.com/index.html?from=pc'),			// 要分享的地址
	        pic: '',			// 要分享的图片地址	
	        title: encodeURIComponent('百度输入法快乐打字，轻松换大奖！你也快来试试吧：')				// 分享的内容
		}
	},
	awardRule: 'http://shurufa.baidu.com/user-scorerule.html?from=client',
	getAward: 'http://shurufa.baidu.com/user-award-store.html?from=client',
	userSettingUrl: 'http://passport.baidu.com/center',
	unloginHead: 'images/icon_logo-panel_avatar.png',
	brushImg: 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L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300000],
	levelTree: {
		levelParentH: 456,
		levelH: 2338,
		levelBgH: 1169,
		levelStep: 200,
		speed: 50,
		step: 30,
		bgStep: 10
	},
	medalInfoOf: {
		left: 44,
		top: 57
	},
	medalBgH: 43,
	medalW: 38,
	medalL: 15,
	medalScrollW: 530,
	orderMap: {	 // 命令映射
		'echoPicCnt': ['emo', 'advEmo'],		// 表情相关
		'inputTotal': ['gold', 'silver', 'bronze']		// 输入相关
	},
	medals: {
		'love': { 
			title: '真爱粉',
			desc: '成功<a>设置</a>为默认输入法',
			fireOrder: 'setDefault',					// 完成任务,点亮勋章命令
			bgIndex: 9, 
			statu: 0
		},
		'login': { 
			title: '有身份',
			desc: '保持登录百度输入法，否则该勋章将熄灭',
			bgIndex: 12, 
			statu: 0
		},
		'jianDaoShou': { 
			title: '剪刀手', 		// 名称
			desc: '<a>安装并使用</a><b>截图工具</b>',		// 标准
			fireOrder: '--open=screenshot',					// 完成任务,点亮勋章命令
			bgIndex: 16, 			// 在背景图中的位置
			statu: 0 				// 勋章状态(0 未点亮|1 点亮)
		},
		'yiHuBaiYing': { 
			title: '一呼百应', 
			desc: '<a>安装并使用</a><b>语音输入</b>',
			fireOrder: '--open=SpeechInput',					// 完成任务,点亮勋章命令	
			bgIndex: 15, 
			statu: 0	
		},
		'shenMa': { 
			title: '神码达人',
			desc: '<a>安装并使用</a><b>神码传文</b>',
			fireOrder: '--open=QRMaker',					// 完成任务,点亮勋章命令	
			bgIndex: 14, 
			statu: 0
		},
		'artist': { 
			title: '艺术家',
			desc: '<a>安装并使用</a><b>云手写板</b>',
			fireOrder: '--open=HandInput',					// 完成任务,点亮勋章命令
			bgIndex: 13, 
			statu: 0
		},
		'emo': { 
			title: '表情帝', 
			desc: '成功上屏5个图片表情',		
			plan: {total: 0, minVal: 5, unit: '个'},				//  勋章进度(特定勋章才有) total: 当前;minVal: 满足条件
			bgIndex: 10, 
			statu: 0
		},
		// 'share': { 
		// 	title: '分享达人', 
		// 	desc: '成功分享信息1次',		
		// 	bgIndex: 8, 
		// 	statu: 0
		// },
		'manYou': { 
			title: '慢慢悠悠', 
			desc: '最高打字速度达到10字/分钟',		
			bgIndex: 4, 
			statu: 0
		},
		'kuaiShou': { 
			title: '快手达人', 
			desc: '最高打字速度达到60字/分钟',		
			bgIndex: 0, 
			statu: 0
		},
		// 曾经，有个pm修改了title文案，给下面3个勋章改了名字，因此id与中文名变得不对应了……
		// 而且，这位pm已经离职，她的名字叫——胡素如。
		// comment by liangweibin
		'shengShou': {
			title: '高速达人',
			desc: '最高打字速度达到200字/分钟',		
			bgIndex: 1, 
			statu: 0
		},
		'wuKePiDi': { 
			title: '敲字圣手',
			desc: '最高打字速度达到500字/分钟',		
			bgIndex: 2, 
			statu: 0
		},
		'gaoQiaoMingRen': { 
			title: '无可匹敌',
			desc: '最高打字速度达到16字/秒=960字/分钟',		
			bgIndex: 3, 
			statu: 0
		},
		
		
		'bronze': { 
			title: '铜牌文豪', 
			desc: '累计输入10000字',	
			plan: {total: 0, minVal: 10000, unit: '字'},			//  勋章进度(特定勋章才有)total: 当前;minVal: 满足条件	
			bgIndex: 7, 
			statu: 0
		},
		'silver': { 
			title: '银牌文豪', 
			desc: '累计输入100000字',	
			plan: {total: 0, minVal: 100000, unit: '字'},			//  勋章进度(特定勋章才有)total: 当前;minVal: 满足条件
			bgIndex: 6, 
			statu: 0
		},
		'gold': { 
			title: '金牌文豪', 
			desc: '累计输入500000字',	
			plan: {total: 0, minVal: 500000, unit: '字'},			//  勋章进度(特定勋章才有)total: 当前;minVal: 满足条件
			bgIndex: 5, 
			statu: 0
		},
        'advEmo': {
            title: '表情达人',
            desc: '成功上屏99个图片表情',
            plan: {total: 0, minVal: 99, unit: '个'},				//  勋章进度(特定勋章才有)total: 当前;minVal: 满足条件
            bgIndex: 11,
            statu: 0
        }
	},
	coinLink: "http://anquan.baidu.com/bbs/forum.php?mod=viewthread&tid=374091&page=1&extra=#pid2019342",
	skinLink: "http://shurufa.baidu.com/skin",
	dictLink: "http://shurufa.baidu.com/dict",
	giftLen: 202,
};
// 用户信息
var userInfo = {
    "passport": {
      "login": false,
      "uid": "121444",        // 可选，用户id
      "uname": "张三"       // 可选，用户名
    },
    "medals": [
      "login",
      "emo",
      "kuaiShou"
    ],
    "exp": 81000000,             // 经验值
    "coin": 9600,            // 金币数
    "seqLogin": 10          // 连续登录天数
};



// 输入信息
var inputData = {
	maxDailySum: 3400,	// 可选, 最近28天输入最高记录
	maxSpeed: 4996,	// 历史最快输入速度
	inputTotal: 45552,	// 用户输入总数
	dailyRecords: [	// 最近28天输入记录
		{
			date: '04-01',
			total: 1456
		},
		{
			date: '03-31',
			total: 0
		},
		{
			date: '03-30',
			total: 2117
		},
		{
			date: '03-29',
			total: 0
		},
		{
			date: '03-28',
			total: 0
		},
		{
			date: '03-27',
			total: 2875
		},
		{
			date: '03-26',
			total: 1966
		},
		{
			date: '03-25',
			total: 0
		},
		{
			date: '03-24',
			total: 0
		},
		{
			date: '03-23',
			total: 0
		},
		{
			date: '03-22',
			total: 0
		},
		{
			date: '03-21',
			total: 0
		},
		{
			date: '03-20',
			total: 0
		},
		{
			date: '03-19',
			total: 0
		},
		{
			date: '03-18',
			total: 100
		}
	]
};