<commit_before>(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);
var app = (function(){



	var elecciones = {};

	var eleccion = {};

	//var preguntas = {};
	var categorias = {};
	var candidatos = {};

	var pregCount=0;
	var lastPreg;
	var resuFinal=false;

	var MaxPreg=8;
	var valorPuntos = [100,66,33,0];

	var id=0;

	var animando=false;

	var w=0;
	var h=0;
	var pregFS=0;
	var resuFS=0;
	var iniPadH=0.2;
	var gameTop=100;
	var tarjeH100=0;
	var tarjeFactor = 0.45; 
	var tarjePadF = 0.05;
	var punSize=0;
	var factorDot=1.5;

	var sobreFondoH=0;
	var sobreFreDiff=0.4;	
	var sobreF1HFact=0.592;	
	var sobreF_CHFact=0.975;	

	var urna1H=0;
	//var urna2Diff=11;

	var cantOp=4;
	var opScroll = false;

	var puntajes = [];
	var punParcial = [];
	var punPreg = [];
	var fotos = [];

	var userRes = [];

	//postuWFac = 0.925;
	postuWFac = 0.85;
	postuAlt=0.25;

	var barraH=20;

	var mobile=true;

	var correoUser = "";

	var esperando = false;
	var tar12FS = 4;
	var tar3FS = 2;

	var shareTxt = "";

	//reemplazar carateres por html ascii codes
	/*function getCleanText(some_text) {
		var clean_text = some_text;
		clean_text = clean_text.replace("", "&#191;"); 

		clean_text = clean_text.replace("", "&#193;"); 
		clean_text = clean_text.replace("", "&#201;"); 
		clean_text = clean_text.replace("", "&#205;"); 
		clean_text = clean_text.replace("", "&#211;"); 
		clean_text = clean_text.replace("", "&#218;"); 

		clean_text = clean_text.replace("", "&#225;"); 
		clean_text = clean_text.replace("", "&#233;"); 
		clean_text = clean_text.replace("", "&#237;"); 
		clean_text = clean_text.replace("", "&#243;"); 
		clean_text = clean_text.replace("", "&#250;"); 

		clean_text = clean_text.replace("", "&#209;"); 
		clean_text = clean_text.replace("", "&#241;"); 

		return clean_text;
	}*/

	function puntajeCalc(userR){
		var cant = candidatos.length;
		for(var i=0;i<cant;i++){
			//se guarda el indice del candidato segun el orden de puntajes
			var cInd = puntajes[i][1];
			//se define el mismo indice para el puntaje parcial de esta pregunta
			punPreg[i][1]=cInd;
			//Id de la respuesta del candidato
			var pregId = categorias[pregCount%categorias.length]["questions"][parseInt(pregCount/categorias.length)]["question_id"];
			//console.log("0: "+$.grep(candidatos[cInd]["positions"], function(e){ return e.question_id == pregId; }));
			var qresp = {};
			qresp = $.grep(candidatos[cInd]["positions"], function(e){ return e["question_id"] == pregId; })[0];
			if(qresp!=null){
				console.log(qresp);
				var ansId = qresp.answer_id;
				console.log("A: "+ansId);			
				qresp = $.grep(categorias[pregCount%categorias.length]["questions"][parseInt(pregCount/categorias.length)]["answers"], function(e){ return e.answer_id == ansId; })[0];
				var candR = qresp.answer_value;
				console.log("B: "+candR);
			
			//var candR = candidatos[cInd][categorias[pregCount%categorias.length]["Id"]]["Respuestas"][categorias[pregCount%categorias.length]["orden"][parseInt(pregCount/categorias.length)]];
			
			if(Math.abs(userR-candR)==0){// Si no hay diferencia, ergo es igual, entonces el mayor puntaje
				puntajes[i][0]+=valorPuntos[0];
				punPreg[i][0]=valorPuntos[0];		
				puntajes[i][2]++;
			}else if(Math.abs(userR-candR)==3){// Si la diferencia es la mayor posible, entonces el menor puntaje
				puntajes[i][0]+=valorPuntos[3];
				punPreg[i][0]=valorPuntos[3];
				puntajes[i][2]++;
			}else if(parseInt(userR*0.5)==parseInt(candR*0.5)){//Si no coincide exacto pero est en el mismo sentido, entonces el segundo mayor puntaje
				puntajes[i][0]+=valorPuntos[1];
				punPreg[i][0]=valorPuntos[1];
				puntajes[i][2]++;
			}else{//Finalmente, si no coincide el sentido, puede ser el tercer mejor puntaje o el cuarto y ltimo
				if(Math.abs(userR-candR)==1){
					puntajes[i][0]+=valorPuntos[2];
					punPreg[i][0]=valorPuntos[2];
					puntajes[i][2]++;
				}else{
					puntajes[i][0]+=valorPuntos[3];
					punPreg[i][0]=valorPuntos[3];
					puntajes[i][2]++;
				}			
			}
				punParcial[i][1]=cInd;
				punParcial[i][2]=puntajes[i][2];
				punParcial[i][0] = puntajes[i][0]/punParcial[i][2];
				console.log("PunPar "+candidatos[cInd]["candidate_name"]+": "+punParcial[i]);
			}else{
				punParcial[i][1]=cInd;
				punParcial[i][2]=puntajes[i][2];
				if(punParcial[i][2]>0){
					punParcial[i][0] = puntajes[i][0]/punParcial[i][2];
				}else{
					punParcial[i][0] = -1;
				}
				console.log("PunPar "+candidatos[cInd]["candidate_name"]+": "+punParcial[i]);
			}
			
		}	
	}

	function getDayCount(){
		var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds
		var firstDate = new Date();
		var secondDate = new Date(2015,07,09);

		var diffDays = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)));
		return diffDays;
	}

	function GetUrlValue(varsearch){
		var searchstring = window.location.search.substring(1);
		var variablearray = searchstring.split('&');
		for(var i = 0; i < variablearray.length; i++){
			var keyvaluepair = variablearray[i].split('=');
			if(keyvaluepair[0] == varsearch){
				return keyvaluepair[1];
			}
		}
	}
	
	
	function shuffle(array) {
		var currentIndex = array.length, temporaryValue, randomIndex ;

		// While there remain elements to shuffle...
		while (0 !== currentIndex) {

			// Pick a remaining element...
			randomIndex = Math.floor(Math.random() * currentIndex);
			currentIndex -= 1;

			// And swap it with the current element.
			temporaryValue = array[currentIndex];
			array[currentIndex] = array[randomIndex];
			array[randomIndex] = temporaryValue;
		}

		return array;
	}

	function resizeFont(element){
		var fS = parseFloat(element.css("font-size"));
		var par = element.get(0);
		var count = 0;
		while (count<1000 && (par.offsetHeight <par.scrollHeight)){
			fS*=0.95;
			element.css("font-size",fS+"em");
			count++;
		}	
	}

	function pregResize(){

		punSize = parseFloat($("#p7").css("height"));
		var dM = w<=480?w*0.001:w*0.02;
		$(".dots").css("margin-right",dM+"px");
		$("#p"+pregCount).css("width",punSize*factorDot+"px");
		$("#p"+pregCount).css("height",punSize*factorDot+"px");

		$(".tPreg").css("font-size",pregFS+"em");
		resizeFont($(".tPreg"));
		
		tarjeH100 = tarjeFactor*parseFloat($("#tarjeta1").css("height"))/h;
		//tarjeH100 = w<=480?tarjeH100*0.75:tarjeH100;

		//console.log(w);
		$( "#vSi" ).css("width",(tarjeH100*h)+"px");
		$( "#vSi" ).css("height",(tarjeH100*h*0.9)+"px");
		$( "#vNo" ).css("width",(tarjeH100*h)+"px");
		$( "#vNo" ).css("height",(tarjeH100*h*0.9)+"px");
		
		$( "#vOp" ).css("width",(tarjeH100*h)+"px");
		$( "#vOp" ).css("height",(tarjeH100*h*0.9)+"px");
		

		tar3FS = tarjeH100*h*0.02;
		tar12FS = tarjeH100*h*0.04;
		$( "#vNo" ).css("font-size",tar12FS+"em");
		$( "#vSi" ).css("font-size",tar12FS+"em");

		$( "#vOp" ).css("font-size",tar3FS+"em");

		var tOpW = parseFloat($(".sCerrImg").css("width"))*0.9;		
		/*$("#vOp").css("width",tOpW+"px");
		$("#vOp").css("height",(tOpW*0.75)+"px");*/

		//var sFonH = tarjeH100*h*0.9*0.65;
		var sFonH = parseFloat($(".sobreFondo2").children("img").css("height"));

		$(".sobreFondo2").children("img").css("height",sFonH+"px");
		$(".sobreFondo1").children("img").css("height",(sFonH*sobreF1HFact)+"px");
		$(".tapaCerrada").children("img").css("height",(sFonH*sobreF1HFact)+"px");
		$(".sobreFrente").children("img").css("height",(sFonH*sobreF_CHFact)+"px");
		$(".sobreCerrado").children("img").css("height",(sFonH*sobreF_CHFact)+"px");
		$(".sobreChicos").children("img").css("height",(sFonH*sobreF_CHFact)+"px");

		sobreFondoH = parseFloat($(".sobreFondo1").css("top"));
		//sobreFreDiff = h>600?50:50*2/3;
		var sFreT = sobreFreDiff*(sFonH+(sFonH*sobreF1HFact));
		$(".sobreFondo2").css("top",(sobreFondoH+(sFonH*sobreF1HFact))+"px");
		//$(".sobreFondo2").css("top",(sobreFondoH+sFreT)+"px");
		$(".tapaCerrada").css("top",(sobreFondoH+(sFonH*sobreF1HFact))+"px");
		//$(".sobreFondo2").css("top",(2+sobreFondoH+parseFloat($(".sobreFondo1").css("height")))+"px");
		$(".sobreFrente").css("top",(sobreFondoH+sFreT)+"px");
		$(".sobreChicos").css("top",(sobreFondoH+tOpW*0.1)+"px");
		$(".sobreCerrado").css("top",(sobreFondoH+sFreT)+"px");

		var sobW = parseFloat($(".urna1").children("img").css("width"))*0.9;
		
		$(".sobreFondo1").children("img").css("width",sobW+"px");
		$(".sobreFondo2").children("img").css("width",sobW+"px");
		$(".tapaCerrada").children("img").css("width",(sobW*0.95)+"px");
		$(".sobreFrente").children("img").css("width",sobW+"px");
		$(".sobreChicos").children("img").css("width",sobW+"px");
		$(".sobreCerrado").children("img").css("width",sobW+"px");

		$(".sobreFondo1").css("left","0px");
		$(".sobreFondo2").css("left","0px");
		$(".tapaCerrada").css("left","0px");
		$(".sobreFrente").css("left","0px");
		$(".sobreChicos").css("left","0px");
		$(".sobreCerrado").css("left","0px");
		

		urna1H = parseFloat($(".urna1").css("top"));
		var urna2Diff = parseFloat($(".urna1").css("height"));
		//$(".urna2").css("top",(urna1H+urna2Diff)+"px");

		var u2H = parseFloat($(".afinidad").css("top"))-urna1H+urna2Diff;
		$(".urna2").css("height",u2H+"px");

		var puT=(sobreFondoH+sFreT+(sFonH*sobreF_CHFact));
		$(".pre-urna").css("top",puT+"px");
		$(".pre-urna").css("height",(urna1H+urna2Diff-puT)+"px");

		//var oSet = w<480?100:75;
		var oSet = w*0.25;
		//var bMl = (w*0.5)-oSet-(parseFloat($( ".bBack#nav1" ).css("width")));			
		var bSl = (w*0.5)+oSet;
		//$( ".bBack#nav1" ).css("left",0+"px")*/
		$( ".bSaltear#nav1" ).css("left",bSl+"px");

		 
	}
<commit_msg>agregando texto personal de candidatos<commit_after>(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);
var app = (function(){



	var elecciones = {};

	var eleccion = {};

	//var preguntas = {};
	var categorias = {};
	var candidatos = {};

	var pregCount=0;
	var lastPreg;
	var resuFinal=false;

	var MaxPreg=8;
	var valorPuntos = [100,66,33,0];

	var id=0;

	var animando=false;

	var w=0;
	var h=0;
	var pregFS=0;
	var resuFS=0;
	var iniPadH=0.2;
	var gameTop=100;
	var tarjeH100=0;
	var tarjeFactor = 0.45; 
	var tarjePadF = 0.05;
	var punSize=0;
	var factorDot=1.5;

	var sobreFondoH=0;
	var sobreFreDiff=0.4;	
	var sobreF1HFact=0.592;	
	var sobreF_CHFact=0.975;	

	var urna1H=0;
	//var urna2Diff=11;

	var cantOp=4;
	var opScroll = false;

	var puntajes = [];
	var punParcial = [];
	var punPreg = [];
	var fotos = [];

	var userRes = [];

	//postuWFac = 0.925;
	postuWFac = 0.85;
	postuAlt=0.25;

	var barraH=20;

	var mobile=true;

	var correoUser = "";

	var esperando = false;
	var tar12FS = 4;
	var tar3FS = 2;

	var shareTxt = "";

	//reemplazar carateres por html ascii codes
	/*function getCleanText(some_text) {
		var clean_text = some_text;
		clean_text = clean_text.replace("", "&#191;"); 

		clean_text = clean_text.replace("", "&#193;"); 
		clean_text = clean_text.replace("", "&#201;"); 
		clean_text = clean_text.replace("", "&#205;"); 
		clean_text = clean_text.replace("", "&#211;"); 
		clean_text = clean_text.replace("", "&#218;"); 

		clean_text = clean_text.replace("", "&#225;"); 
		clean_text = clean_text.replace("", "&#233;"); 
		clean_text = clean_text.replace("", "&#237;"); 
		clean_text = clean_text.replace("", "&#243;"); 
		clean_text = clean_text.replace("", "&#250;"); 

		clean_text = clean_text.replace("", "&#209;"); 
		clean_text = clean_text.replace("", "&#241;"); 

		return clean_text;
	}*/

	function puntajeCalc(userR){
		var cant = candidatos.length;
		for(var i=0;i<cant;i++){
			//se guarda el indice del candidato segun el orden de puntajes
			var cInd = puntajes[i][1];
			//se define el mismo indice para el puntaje parcial de esta pregunta
			punPreg[i][1]=cInd;
			//Id de la respuesta del candidato
			var pregId = categorias[pregCount%categorias.length]["questions"][parseInt(pregCount/categorias.length)]["question_id"];
			//console.log("0: "+$.grep(candidatos[cInd]["positions"], function(e){ return e.question_id == pregId; }));
			var qresp = {};
			qresp = $.grep(candidatos[cInd]["positions"], function(e){ return e["question_id"] == pregId; })[0];
			if(qresp!=null){
				console.log(qresp);
				var ansId = qresp.answer_id;
				console.log("A: "+ansId);			
				qresp = $.grep(categorias[pregCount%categorias.length]["questions"][parseInt(pregCount/categorias.length)]["answers"], function(e){ return e.answer_id == ansId; })[0];
				var candR = qresp.answer_value;
				console.log("B: "+candR);
			
			//var candR = candidatos[cInd][categorias[pregCount%categorias.length]["Id"]]["Respuestas"][categorias[pregCount%categorias.length]["orden"][parseInt(pregCount/categorias.length)]];
			
			if(Math.abs(userR-candR)==0){// Si no hay diferencia, ergo es igual, entonces el mayor puntaje
				puntajes[i][0]+=valorPuntos[0];
				punPreg[i][0]=valorPuntos[0];		
				puntajes[i][2]++;
			}else if(Math.abs(userR-candR)==3){// Si la diferencia es la mayor posible, entonces el menor puntaje
				puntajes[i][0]+=valorPuntos[3];
				punPreg[i][0]=valorPuntos[3];
				puntajes[i][2]++;
			}else if(parseInt(userR*0.5)==parseInt(candR*0.5)){//Si no coincide exacto pero est en el mismo sentido, entonces el segundo mayor puntaje
				puntajes[i][0]+=valorPuntos[1];
				punPreg[i][0]=valorPuntos[1];
				puntajes[i][2]++;
			}else{//Finalmente, si no coincide el sentido, puede ser el tercer mejor puntaje o el cuarto y ltimo
				if(Math.abs(userR-candR)==1){
					puntajes[i][0]+=valorPuntos[2];
					punPreg[i][0]=valorPuntos[2];
					puntajes[i][2]++;
				}else{
					puntajes[i][0]+=valorPuntos[3];
					punPreg[i][0]=valorPuntos[3];
					puntajes[i][2]++;
				}			
			}
				punParcial[i][1]=cInd;
				punParcial[i][2]=puntajes[i][2];
				punParcial[i][0] = puntajes[i][0]/punParcial[i][2];
				console.log("PunPar "+candidatos[cInd]["candidate_name"]+": "+punParcial[i]);
			}else{
				punParcial[i][1]=cInd;
				punParcial[i][2]=puntajes[i][2];
				if(punParcial[i][2]>0){
					punParcial[i][0] = puntajes[i][0]/punParcial[i][2];
				}else{
					punParcial[i][0] = -1;
				}
				console.log("PunPar "+candidatos[cInd]["candidate_name"]+": "+punParcial[i]);
			}
			
		}	
	}

	function getDayCount(){
		var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds
		var firstDate = new Date();
		var secondDate = new Date(2015,07,09);

		var diffDays = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)));
		return diffDays;
	}

	function GetUrlValue(varsearch){
		var searchstring = window.location.search.substring(1);
		var variablearray = searchstring.split('&');
		for(var i = 0; i < variablearray.length; i++){
			var keyvaluepair = variablearray[i].split('=');
			if(keyvaluepair[0] == varsearch){
				return keyvaluepair[1];
			}
		}
	}
	
	
	function shuffle(array) {
		var currentIndex = array.length, temporaryValue, randomIndex ;

		// While there remain elements to shuffle...
		while (0 !== currentIndex) {

			// Pick a remaining element...
			randomIndex = Math.floor(Math.random() * currentIndex);
			currentIndex -= 1;

			// And swap it with the current element.
			temporaryValue = array[currentIndex];
			array[currentIndex] = array[randomIndex];
			array[randomIndex] = temporaryValue;
		}

		return array;
	}

	function resizeFont(element){
		var fS = parseFloat(element.css("font-size"));
		var par = element.get(0);
		var count = 0;
		while (count<1000 && (par.offsetHeight <par.scrollHeight)){
			fS*=0.95;
			element.css("font-size",fS+"em");
			count++;
		}	
	}

	function pregResize(){

		punSize = parseFloat($("#p7").css("height"));
		var dM = w<=480?w*0.001:w*0.02;
		$(".dots").css("margin-right",dM+"px");
		$("#p"+pregCount).css("width",punSize*factorDot+"px");
		$("#p"+pregCount).css("height",punSize*factorDot+"px");

		$(".tPreg").css("font-size",pregFS+"em");
		resizeFont($(".tPreg"));
		
		tarjeH100 = tarjeFactor*parseFloat($("#tarjeta1").css("height"))/h;
		//tarjeH100 = w<=480?tarjeH100*0.75:tarjeH100;

		//console.log(w);
		$( "#vSi" ).css("width",(tarjeH100*h)+"px");
		$( "#vSi" ).css("height",(tarjeH100*h*0.9)+"px");
		$( "#vNo" ).css("width",(tarjeH100*h)+"px");
		$( "#vNo" ).css("height",(tarjeH100*h*0.9)+"px");
		
		$( "#vOp" ).css("width",(tarjeH100*h)+"px");
		$( "#vOp" ).css("height",(tarjeH100*h*0.9)+"px");
		

		tar3FS = tarjeH100*h*0.02;
		tar12FS = tarjeH100*h*0.04;
		$( "#vNo" ).css("font-size",tar12FS+"em");
		$( "#vSi" ).css("font-size",tar12FS+"em");

		$( "#vOp" ).css("font-size",tar3FS+"em");

		var tOpW = parseFloat($(".sCerrImg").css("width"))*0.9;		
		/*$("#vOp").css("width",tOpW+"px");
		$("#vOp").css("height",(tOpW*0.75)+"px");*/

		//var sFonH = tarjeH100*h*0.9*0.65;
		var sFonH = parseFloat($(".sobreFondo2").children("img").css("height"));

		$(".sobreFondo2").children("img").css("height",sFonH+"px");
		$(".sobreFondo1").children("img").css("height",(sFonH*sobreF1HFact)+"px");
		$(".tapaCerrada").children("img").css("height",(sFonH*sobreF1HFact)+"px");
		$(".sobreFrente").children("img").css("height",(sFonH*sobreF_CHFact)+"px");
		$(".sobreCerrado").children("img").css("height",(sFonH*sobreF_CHFact)+"px");
		$(".sobreChicos").children("img").css("height",(sFonH*sobreF_CHFact)+"px");

		sobreFondoH = parseFloat($(".sobreFondo1").css("top"));
		//sobreFreDiff = h>600?50:50*2/3;
		var sFreT = sobreFreDiff*(sFonH+(sFonH*sobreF1HFact));
		$(".sobreFondo2").css("top",(sobreFondoH+(sFonH*sobreF1HFact))+"px");
		//$(".sobreFondo2").css("top",(sobreFondoH+sFreT)+"px");
		$(".tapaCerrada").css("top",(sobreFondoH+(sFonH*sobreF1HFact))+"px");
		//$(".sobreFondo2").css("top",(2+sobreFondoH+parseFloat($(".sobreFondo1").css("height")))+"px");
		$(".sobreFrente").css("top",(sobreFondoH+sFreT)+"px");
		$(".sobreChicos").css("top",(sobreFondoH+tOpW*0.1)+"px");
		$(".sobreCerrado").css("top",(sobreFondoH+sFreT)+"px");

		var sobW = parseFloat($(".urna1").children("img").css("width"))*0.9;
		
		$(".sobreFondo1").children("img").css("width",sobW+"px");
		$(".sobreFondo2").children("img").css("width",sobW+"px");
		$(".tapaCerrada").children("img").css("width",(sobW*0.95)+"px");
		$(".sobreFrente").children("img").css("width",sobW+"px");
		$(".sobreChicos").children("img").css("width",sobW+"px");
		$(".sobreCerrado").children("img").css("width",sobW+"px");

		$(".sobreFondo1").css("left","0px");
		$(".sobreFondo2").css("left","0px");
		$(".tapaCerrada").css("left","0px");
		$(".sobreFrente").css("left","0px");
		$(".sobreChicos").css("left","0px");
		$(".sobreCerrado").css("left","0px");
		

		urna1H = parseFloat($(".urna1").css("top"));
		var urna2Diff = parseFloat($(".urna1").css("height"));
		$(".urna2").css("top",(urna1H+urna2Diff)+"px");

		var u2H = parseFloat($(".afinidad").css("top"))-urna1H+urna2Diff;
		$(".urna2").css("height",u2H+"px");

		var puT=(sobreFondoH+sFreT+(sFonH*sobreF_CHFact));
		$(".pre-urna").css("top",puT+"px");
		$(".pre-urna").css("height",(urna1H+urna2Diff-puT)+"px");

		//var oSet = w<480?100:75;
		var oSet = w*0.25;
		//var bMl = (w*0.5)-oSet-(parseFloat($( ".bBack#nav1" ).css("width")));			
		var bSl = (w*0.5)+oSet;
		//$( ".bBack#nav1" ).css("left",0+"px")*/
		$( ".bSaltear#nav1" ).css("left",bSl+"px");

		 
	}

{'fraction_non_alphanumeric': 0.2590171032691059, 'fraction_numerical': 0.04797575232734358, 'mean_word_length': 5.478541374474053, 'pattern_counts': {'":': 4, '<': 17, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2994898', 'n_tokens_mistral': 11664, 'n_tokens_neox': 10425, 'n_words': 1130}