/**
 * 3.5版本4sonline在线模块配置文件
 * menuControl : menu中导航菜单的配置。
 * 
 * $('#main_index').find('#contentCenter')　：　内容装载区域
 * 
 * 系统模块说明　： 
 * 		1 : carFriend_module 车友生活
 * 		2 : dee_module 嘀嘀
 * 		3 : global_module 车行天下
 * 		4 : home_module 首页
 *      5 : icar_module 爱车管家
 *      6 : setting_module 设置
 *      7 : findFriend_module 找人
 *      8 : carFriendMatey_module 车友
 *      9 : messageBox_module 消息盒子
 */
var module_config = {
	version : "3.5" ,
	
	downCount : 25,
	
	
	menuControl : {
	               '首页' : {'id' : 'home_module' , 'href' : 'javascript:;' , 'html' : '首页' , 'destPath' : web4s.context_path + '/module/index.action?destn=index'},
	               '爱车管家' : {'id' : 'icar_module' , 'href' : 'javascript:;' , 'html' : '爱车管家' , 'destPath' : web4s.context_path + '/module/index.action?destn=icar'},
	               '嘀嘀' : {'id' : 'dee_module' , 'href' : 'javascript:;' , 'html' : '嘀嘀' , 'destPath' : web4s.context_path + '/module/index.action?destn=dee'},
	               '车友生活' : {'id' : 'carFriend_module' , 'href' : 'javascript:;' , 'html' : '车友生活' , 'destPath' : web4s.context_path + '/module/index.action?destn=carFriendLife'},
	               '车行天下' : {'id' : 'global_module' , 'href' : 'javascript:;' , 'html' : '车行天下' , 'destPath' : web4s.context_path + '/module/index.action?destn=global'},
	               '车友商城' : {'id' : 'icarStore_module' , 'href' : 'javascript:;' , 'html' : '车友商城' , 'destPath' : web4s.context_path + '/module/icarStore/index.jsp'},
	               '车友' : {'id' : 'carFriendMatey_module' , 'href' : 'javascript:;' , 'html' : '车友' , 'destPath' : web4s.context_path + '/module/index.action?destn=find'},
	               '消息盒子' : {'id' : 'messageBox_module' , 'href' : 'javascript:;' , 'html' : '消息盒子' , 'destPath' : web4s.context_path + '/module/index.action?destn=msgBox'},
	               '通知' : {'id' : 'messageBox_module' , 'href' : 'javascript:;' , 'html' : '通知' , 'destPath' : web4s.context_path + '/module/index.action?destn=msgBox&type=notice'},
	               '设置' : {'id' : 'setting_module' , 'href' : 'javascript:;' , 'html' : '设置' , 'destPath' : web4s.context_path + '/module/index.action?destn=setting'},
	               '找人' : {'id' : 'serach_module' , 'href' : 'javascript:;' , 'html' : '找人 ' , 'destPath' : web4s.context_path + '/module/index.action?destn=search'},
	               '活动' : {'id' : 'activity_module' , 'href' : 'javascript:;' , 'html' : '活动 ' , 'destPath' : web4s.context_path + '/module/index.action?destn=global&type=activity'},
	               '路书' : {'id' : 'travel_module' , 'href' : 'javascript:;' , 'html' : '路书' , 'destPath' : web4s.context_path + '/module/index.action?destn=global&type=travel'}
	               },
    //默认信息
    defaultInfo : {
    	           'errorImg' : web4s.context_path + '/images/travel/travelMinNoImg.gif',      //默认错误图片
    	           'errorBlogImg' : web4s.context_path + '/images/travel/travelMinNoImg.gif',    //嘀嘀默认错误图片
    	           'errorUserPhoto' : web4s.context_path + '/photo/userPhoto/large/user_photo.gif',     //默认用户头像
    	           'errorUserMiniPhoto' : web4s.context_path + '/photo/userPhoto/mini/user_photo.gif',  //默认用户头像小图
                   'carLogoPath' : web4s.context_path + '/images/carLogo/',    //车型logo路径
                   'defCarLogo' : web4s.context_path + '/images/carLogo/BMW.png',      //默认车型logo
                   'blogPhotoLargePath' : web4s.context_path + '/photo/blogPhoto/500x400/',     //嘀嘀图片路径500x400
                   'blogPhotoSmallPath' : web4s.context_path + '/photo/blogPhoto/120x100/',      //嘀嘀图片路径120x100
                   'phoneWeixinPhoto' : web4s.fileWebSite + '/weixin/pic/normal/',		//手机微信图片路径原图
                   'phoneWeixinPhotoSmall' : web4s.fileWebSite + '/weixin/pic/120-100/',		//手机微信图片路径500x400
                   'phoneWeixinPhotoLarge' : web4s.fileWebSite + '/weixin/pic/500-400/'			//手机微信图片路径120x100
    },
    
 
    
    userPhoto : {
    	'L' : web4s.fileWebSite + '/web4s/photo/userPhoto/large/',
    	'M' : web4s.fileWebSite + '/web4s/photo/userPhoto/mini/',
    	'M24' : web4s.fileWebSite + '/web4s/photo/userPhoto/mini24/'
    },
    
    /**
     * 获取游记脚印图片路径
     */
    getTrackFootPhotoUrl : function(userId, photo, type){
    	var src = "";
    	if(userId && photo && $.trim(userId).length > 0 && $.trim(photo).length > 0){
    		if(type && type == "m"){
    			src = web4s.fileWebSite + '/web4s/photo/trackPhotoData/U'+userId+'/minphoto/'+$.trim(photo);
    		}else{
    			src = web4s.fileWebSite + '/web4s/photo/trackPhotoData/U'+userId+'/largephoto/'+$.trim(photo);
    		}
    	}
    	return src;
    },
    
    /**
     * 获取活动图片路径
     */
    getActivityPhotoUrl : function(photo){
        var src = "";
        
        if(photo && $.trim(photo).length > 0 && photo!="getUrl"){
                src = web4s.fileWebSite + '/web4s/photo/activity/content/'+$.trim(photo);
        }else if(photo=="getUrl"){
            src = web4s.fileWebSite + '/web4s/photo/activity/content/';
        }
        return src;
    },
    
    
    //定位到其他网站
    redirectURL : function(type,id){
    	if(type == 0){
    		window.open("http://www.dianping.com/shop/"+id);
    	}else if(type == 4){
    		window.open("http://out.tuan800.com/deal/"+id);
    	}else if(type == 5){
    		window.open("http://www.tuan800.com");
    	}
    },
    
	/**
	 * 生活信息 评分
	 */
	lifeRating : function(rating){
		if(rating > 0){
			var html = "";
			for(var i = 0; i < rating; i++){
				if(i < parseInt(rating)){
					html += '<span class="gradeStar"></span>';
				}else{
					html += '<span class="gradeHalfStar"></span>';
				}
			}
			return html;
		}else{
			return "暂无评分";
		}
	},
	
	activityPhoto : function(images){
		var url = (images && $.trim(images).length > 0)?(images.indexOf("http://") != -1 ? $.trim(images):(web4s.context_path + '/photo/activity/content/')+images):"";
		return url;
	},
    
    /**
     * 用户标识
     */
    userLogo : function(){
    	return "../images/img/userIco.png";
    },
    
    /***
     * 用户主页
     */
    userHomeUrl : function(userid){
    	return module_navigation.userHomePage.userHome(userid);
    },
    
    
    
    /**
     * 路书详情页面
     */
    openTravelDetail : function(id){
    	window.open(web4s.context_path + '/module/global/travel/page/travelDetail.jsp?id=' + id);	
    },
    
	deploy : true, //是否为部署环境
	
	fileServicePath : '',
	
	msgboxIntervalTime : 60*1000,     //消息定时器间隔时间
	
	deeInteervalTime : 3*100000,    //嘀嘀定时器间隔时间
	
    gSearchTime : 3*1000, //请求GOOGLE超时
	
    cookieValidTime : 30*60000     //cookie有效时间(毫秒)
	
};
