(function(){
	if(typeof jQuery == 'function'){
		$.ajax({
			url:'https://plugin-bioz.mnbaq.org/api',
			type:'post',
			// type:'get',
			data:{
				action:'get',
				key:'initial',
				language_detected:document.documentElement.lang,
				// process:$('#bioz-load').attr('process'),
				// href:window.location.href,
				location:JSON.parse(JSON.stringify(window.location))
			},
			// contentType: "application/json",
			// contentType: "text/plain",
			dataType:'json',
			xhrFields:{withCredentials:true}
		}).done(function(response,status,response_object){
			if(response.success){
				if(response.data.execute){
					if(response.data.plugin_deny){
						console.log("%c bioz load message: leave setup (plugin denied)","color:white;background-color:green");
						return false;
					}
					eval(response.data.js.bioz_setup);
					delete response.data.js.bioz_setup;
					bioz.setup(response);
				}else{
					console.log("%c bioz load message: leave setup ","color:white;background-color:green");
				}
			}else{
				console.log("%c bioz load message: response error ","color:white;background-color:red");
			}
		}).fail(function(err,status){
			console.log("%c bioz load message: ajax failed ","color:white;background-color:red");
			console.log("%c status ","color:white;background-color:orange");console.log(status);
		}).always(function(){});
	}else{
		console.log("%c bioz load message: jQuery is not loaded ","color:white;background-color:red");
	}
}());