    $('#showmap').click(function () { 
      $('#googlemap').slideToggle('fast'); 
    });
	
	$(document).ready(function(){
	
$('#read_body').click(function(){
	$("#body_inf").slideDown();
		});






$(".info-select #sh_desc").click(function(){

    $(".info-select a").removeClass('actv');
    $(this).addClass('actv');
    $(".infoselh").hide();
    $(".item_info").show();
});

$(".info-select #sh_company").click(function(){
    $(".info-select a").removeClass('actv');
    $(this).addClass('actv');
    $(".infoselh").hide();
    $(".company_info_item").show();
});






$(".pseudoselect .label").click(function(){


    $(this).parent().find('.current').animate({
    height: 'toggle'
  }, 5000, function() {
    $(this).find('ul').fadeIn();
  });
;


});


	 
	});






function fixedRound(number, digits) {
            var multiple = Math.pow(10, digits);
            var rndedNum = Math.round(number * multiple) / multiple;
            return rndedNum;
        }


function parseXml(xml)
{
  $(xml).find("item").each(function()
  {
    if($(this).find('code').text() == '840'){
	rate = $(this).find('rate').text();
	size = $(this).find('size').text();
	change = $(this).find('change').text();
	$("#usd2").append(fixedRound(rate/size,2));
	}
    if($(this).find('code').text() == '978'){
	rate = $(this).find('rate').text();
	size = $(this).find('size').text();
	change = $(this).find('change').text();
	$("#eur2").append(fixedRound(rate/size,2));
	}
    if($(this).find('code').text() == '643'){
	rate = $(this).find('rate').text();
	size = $(this).find('size').text();
	change = $(this).find('change').text();
	$("#rub2").append(fixedRound(rate/size,2));
	}
  });
}



function parseXmlWeather(xml)
{
    var windd = new Array();
    windd[0]='северный';
    windd[1]='северо-восточный';
    windd[2]='восточный';
    windd[3]='юго-восточный';
    windd[4]='южный';
    windd[5]='юго-западный';
    windd[6]='западный';
    windd[7]='северо-западный';


    var today = new Date();
  $(xml).find("FORECAST[day="+today.getDate()+"][hour=15]").each(function()
  {
    tmin = $(this).find('TEMPERATURE').attr('min');
    tmax = $(this).find('TEMPERATURE').attr('max');
    wmin = $(this).find('WIND').attr('min');
    wmax = $(this).find('WIND').attr('max');
    winddirr = $(this).find('WIND').attr('direction');
    $("#tempday").html(tmin+'..'+tmax+' &deg;C');
    $("#windspeed").html(wmin+'-'+wmax);
    $("#winddir").html(windd[winddirr]);
  });

  $(xml).find("FORECAST[day="+today.getDate()+"][hour=21]").each(function()
  {
    tmin = $(this).find('TEMPERATURE').attr('min');
    tmax = $(this).find('TEMPERATURE').attr('max');

    $("#tempevening").html(tmin+'..'+tmax+' &deg;C');

  });

}


$(document).ready(function()
{
  $.ajax({
    type: "GET",
    url: "getxml/xbank",
    dataType: "xml",
    success: parseXml
  });
});

