/**
 * 与首页的分开
 */
$(function(){
	console.log(window.sessionStorage.getItem("status"));
	if(window.sessionStorage.getItem("status")==='1'){}else{
		var type;
		if(document.referrer===''){type=1;}else{type=0;}
		console.log(document.referrer,type,window.location.search);
		function getQueryVariable(variable)
		{
		       var query = window.location.search.substring(1);
		       var vars = query.split("&");
		       for (var i=0;i<vars.length;i++) {
		               var pair = vars[i].split("=");
		               if(pair[0] == variable){return pair[1];}
		       }
		       return(false);
		}
		var status=getQueryVariable("status");
		window.sessionStorage.setItem("status",status);
		if(/AppleWebKit.*mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
		    if(window.location.href.indexOf("?mobile")<0){
		    	console.log(document.referrer);
		        try{
		            if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) && type===0){
		            	   window.location.href="";  
		            }else if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) && type===1){
		            	return false;
//		            	window.location.href="http://www.renrenxiaoka.com";
		            }else{
		            	console.log('电脑端');

		                window.location.href="";

		            }

		        }catch(e){}

		    }

		}
	}
});