
       // gestão de idioma no site WIPS
       //
       // línguas contempladas:
       //  PT - português
       //  ES - castelhano
       //  IN - inglês
       //  FT - francês

       $(function() {

		if ($("#lang").val() == 'PT')
			$("#pt_lang").attr("src", "/_images/PT_cor.png");

		if ($("#lang").val() == 'IN')
			$("#in_lang").attr("src", "/_images/IN_cor.png");

		if ($("#lang").val() == 'ES')
			$("#es_lang").attr("src", "/_images/ES_cor.png");

		if ($("#lang").val() == 'FR')
			$("#fr_lang").attr("src", "/_images/FR_cor.png");


		$("#pt_lang").mouseenter(function() {
			if ($("#lang").val() == 'PT')
	                        $(this).attr("src", "/_images/PT_cinza.png");
                        else {
	                        $(this).attr("src", "/_images/PT_cor.png");
				$(this).css('cursor','pointer');
                        }
		}).mouseleave(function() {
			if ($("#lang").val() == 'PT')
	                        $(this).attr("src", "/_images/PT_cor.png");
                        else {
	                        $(this).attr("src", "/_images/PT_cinza.png");
				$(this).css('cursor','auto');
                        }
		});

		$("#in_lang").mouseenter(function() {
			if ($("#lang").val() == 'IN')
	                        $(this).attr("src", "/_images/IN_cinza.png");
                        else {
	                        $(this).attr("src", "/_images/IN_cor.png");
				$(this).css('cursor','pointer');
                        }
		}).mouseleave(function() {
			if ($("#lang").val() == 'IN')
	                        $(this).attr("src", "/_images/IN_cor.png");
                        else {
	                        $(this).attr("src", "/_images/IN_cinza.png");
				$(this).css('cursor','auto');
                        }
		});

		$("#es_lang").mouseenter(function() {
			if ($("#lang").val() == 'ES')
	                        $(this).attr("src", "/_images/ES_cinza.png");
                        else {
	                        $(this).attr("src", "/_images/ES_cor.png");
				$(this).css('cursor','pointer');
                        }
		}).mouseleave(function() {
			if ($("#lang").val() == 'ES')
	                        $(this).attr("src", "/_images/ES_cor.png");
                        else {
	                        $(this).attr("src", "/_images/ES_cinza.png");
				$(this).css('cursor','auto');
                        }
		});


		$("#fr_lang").mouseenter(function() {
			if ($("#lang").val() == 'FR')
	                        $(this).attr("src", "/_images/FR_cinza.png");
                        else {
	                        $(this).attr("src", "/_images/FR_cor.png");
				$(this).css('cursor','pointer');
                        }
		}).mouseleave(function() {
			if ($("#lang").val() == 'FR')
	                        $(this).attr("src", "/_images/FR_cor.png");
                        else {
	                        $(this).attr("src", "/_images/FR_cinza.png");
				$(this).css('cursor','auto');
                        }
		});



		$("#pt_lang").click(function() {
			if ($("#lang").val() == 'PT')
                        	null;
                        else {
				$("#lang").val('PT');
				$("#change_lang").submit();
                        }
                });

		$("#in_lang").click(function() {
			if ($("#lang").val() == 'IN')
                        	null;
                        else {
				$("#lang").val('IN');
				$("#change_lang").submit();
                        }
                });

		$("#es_lang").click(function() {
			if ($("#lang").val() == 'ES')
                        	null;
                        else {
				$("#lang").val('ES');
				$("#change_lang").submit();
                        }
                });

		$("#fr_lang").click(function() {
			if ($("#lang").val() == 'FR')
                        	null;
                        else {
				$("#lang").val('FR');
				$("#change_lang").submit();
                        }
                });

        });

