	var months = new Array();
	months[1] = 'Ianuarie'; months[2] = 'Februarie'; months[3] = 'Martie'; months[4] = 'Aprilie'; months[5] = 'Mai';
	months[6] = 'Iunie'; months[7] = 'Iulie'; months[8] = 'August'; months[9] = 'Septembrie'; months[10] = 'Octombrie';
	months[11] = 'Noiembrie'; months[12] = 'Decembrie';
	var select_mode = '1';
	
	
	function show_case() {
		$('#cursuri_de_schimb').hide();
		//$('#exchange_tables').hide();
		$('#case_de_schimb').show();
	    select_mode='1';
	}

	function show_cursuri() {
		$('#case_de_schimb').hide();
		$('#cursuri_de_schimb').show();
		//$('#exchange_tables').show();
	    select_mode='2';
	}
	
jQuery(document).ready(function()
{
	jQuery("#currency_day").selectbox({className: 'day-month-big-selectbox'}).bind('change', function () {
  	getCurrency();
  });
  
  jQuery("#currency_month").selectbox({className: 'day-month-big-selectbox'}).bind('change', function () {
  	getCurrency();
  });
  
  jQuery("#currency_year").selectbox({className: 'year-big-selectbox'}).bind('change', function () {
  	getCurrency();
  });
  
  jQuery("#currency_valute").selectbox({className: 'valuta-selectbox'}).bind('change', function () {
  	getCurrency();
  });
	
  function getCurrency()
  {
  	var date_currency = jQuery("#currency_year").val() + '-' + jQuery("#currency_month").val() + '-' + jQuery("#currency_day").val();
  	var selected_valute = jQuery("#currency_valute").val();
  	
  	jQuery('#currency_list_custom').load('content/currencyCustom', {currency_date: date_currency, currency_valute: selected_valute});
  	jQuery('#currency_list').hide();
		jQuery('#currency_list_custom').show();
		
		jQuery('#titlu_curs_valutar').html('Cursul valutar din ' + Math.round(jQuery("#currency_day").val()) + ' ' + months[Math.round(jQuery("#currency_month").val())] + ' ' + jQuery("#currency_year").val());
  }
  
  $(":radio[@name='radio_cc']").click(function(evet){
	  
	    if (evet.currentTarget.value == 'curs') {
			show_cursuri();
		} else {

		if (evet.currentTarget.value == 'case'){
	    	show_case();
		}}				
	});
  
});
