var ocultar = new Array();
ocultar[0]="United";
ocultar[1];
var i= 0;
var j= 0;
var k=1;
var p= false;
$(document).ready(function(){
	$("#lugares").change(onSelectChange);
	$("#laimg").html("<img src=\"http://127.0.0.1/payxpert/img/3.png\" />");
	$("#United").show("slow");
	$("#noti_port").css({height:"52px", fontSize:"", borderWidth:""});
	$("#e").oneclick(function() {
		$("#acceder").slideDown("slow");
	});
	$("#actualizar").click(function(){
		img_seg();
	});
	$("#noti").click(function(){
		motion_news();
	});
		$("#noti1").click(function(){
		motion_news();
	});
		$("#noti2").click(function(){
		motion_news();
	});
		$("#noti3").click(function(){
		motion_news();
	});
	ofusca_mail();
});

function img_seg()
{
	k++;
	$(".incial").css({display:"none"});
	$.ajax({
		type: "GET",
        url: "http://www.payxpert.de/p.php",
		data: "n=" + k,
        success: function(){
            $("#laimg").html("<img src=\"http://www.payxpert.de/img/pre.gif\" />");
        },
		complete: function(){
     	$("#laimg").html("<img src=\"http://www.payxpert.de/img/pass/3."+ k +".png\" />");
		
   } 
});
}


function motion_news()
{
	if(p==false){
			$("#noti_port").animate({
				height: 148
			}, {
				queue: true,
				duration: 3000
			});
			p=true;}else{
			$("#noti_port").animate({
				height: 52
			}, {
				queue: true,
				duration: 3000
		});p=false;	
	}
}
	
function ofusca_mail()
{
	$('.ous1').each(function(){
		$('.ous1').attr('href', 'mailto:' + $('.ous1').attr('href').replace('#nospam#', '@').replace('#yuT7z#', '').replace('#p6trz#', '.'));
	});
	
	$('.ous2').each(function(){
		$('.ous2').attr('href', 'mailto:' + $('.ous2').attr('href').replace('#nospam#', '@').replace('#yuT7z#', '').replace('#p6trz#', '.'));
	});
}
function ofus(){
	$('.United').each(function(){
		$('.United').attr('href', 'mailto:' + $('.United').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	$('.Belgium').each(function(){
		$('.Belgium').attr('href', 'mailto:' + $('.Belgium').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	$('.Spain').each(function(){
		$('.Spain').attr('href', 'mailto:' + $('.Spain').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	$('.Italy').each(function(){
		$('.Italy').attr('href', 'mailto:' + $('.Italy').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	$('.Germany').each(function(){
		$('.Germany').attr('href', 'mailto:' + $('.Germany').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	$('.Others').each(function(){
		$('.Others').attr('href', 'mailto:' + $('.Others').attr('href').replace('#nospam#', '@').replace('#supeAASas1#', '').replace('#sdsdaWE54#', '.'));
	});
	
}

function onSelectChange(){
	if(i>0){ i--;}else{i++;}
	if (i==1){j=0;}else{j=1;}
		
	var selected = $("#lugares option:selected");
	var lvar = selected.text();
		
	if (lvar == "United Kingdom"){lvar="United";}
	if (lvar == "Select option..."){lvar="Select1";}
	ocultar[i] = lvar;

	$("#" + ocultar[j]).hide("slow");
	$("#" + ocultar[i]).show("slow");
}