// JavaScript Document

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

// common constants
var images="../media_lib/jpg/rooms";
//var cur_ex= new Array();
var cur_name= new Array();
var nomer_new= new Array();
var nomer_old= new Array();
var nomer_one= new Array();

//cur_ex["USD"]=4930,00;
//cur_ex["EUR"]=6914,82;
//cur_ex["RUR"]=173,95;
//cur_ex["BYR"]=1;

cur_name["USD"]='$';
cur_name["EUR"]='€';
cur_name["RUR"]='RUR';
cur_name["BYR"]='BYR';

function change_cur(currency_ex)
{

	for(name in nomer_new)
	{
			old_price='op'+name+'_old';
			one_price='op'+name+'_one';
			new_price='op'+name+'_new';
			new_name='op'+name+'_new_name'
			if(currency_ex!="BYR")
			{
				$('#'+new_price).text((nomer_new[name]/cur_ex[currency_ex]).toFixed(2));
				$('#'+old_price).text((nomer_old[name]/cur_ex[currency_ex]).toFixed(2)+" "+cur_name[currency_ex]);
				$('#'+one_price).text((nomer_one[name]/cur_ex[currency_ex]).toFixed(2)+" "+cur_name[currency_ex]);
			}
			else
			{
				$('#'+new_price).text((nomer_new[name]/cur_ex[currency_ex]).toFixed(0));
				$('#'+old_price).text((nomer_old[name]/cur_ex[currency_ex]).toFixed(0)+" "+cur_name[currency_ex]);
				$('#'+one_price).text((nomer_one[name]/cur_ex[currency_ex]).toFixed(0)+" "+cur_name[currency_ex]);
			}
			$('#'+new_name).text(cur_name[currency_ex]);
		}
	//alert(cur_ex[currency_ex]);
};


// jQuery loader
jQuery(document).ready(function($) {

 //////////////////////////////////
 $(function() {
		$("#in_date").datepicker({showOn: 'both', buttonImage: '/images/calendar.jpg', buttonImageOnly: true,regional:'ru'});
		$("#out_date").datepicker({showOn: 'both', buttonImage: '/images/calendar.jpg', buttonImageOnly: true,regional:'ru'});
		$("#in_date2").datepicker({regional:'ru'});
		$("#out_date2").datepicker({regional:'ru'});
		$('#bottom_images a').lightBox({fixedNavigation:true});		
		 $("#gallery_images").jCarouselLite({
        btnNext: "#arrow_right",
        btnPrev: "#arrow_left",
		visible: 4
    });

		//datepicker({showOn: 'button', buttonImage: 'images/calendar.gif', buttonImageOnly: true});
		
	});

 //////////////////////////////////
  
  
}) 


// hover effects
function mover(action, name,room)
{
      if (document.images)
      {
           if (action==1)
           {
                document.images['full_image'].src=images+'/'+room+'/'+name+'_big.jpg';
           }
           else 
           {
                document.images['full_image'].src=images+'/'+room+'/'+name+'_big.jpg';  
           }
      }
}


function show_big(image_name)
{
	$("#big_photo").html("<h1>Загрузка фотографии</h1>");
	$("#big_photo").html("<img src=\""+image_name+"\" id=\"show_big\" name=\"show_big\"  start=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\" />");
	//$("#big_photo").html("<img src=\"/media_lib/"+image_name+"\" id=\"show_big\" name=\"show_big\" width=\"705\" height=\"470\" start=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\" />");
	
	//document.images['show_big'].src='media_lib'+'/'+image_name;
}
