//*************************************[ buttons ]*************************************
var preload_images = {};

function onoffhandler()
	{
	jQuery('.onoff').unbind('mouseenter').unbind('mouseleave');
	jQuery('.onoff').each(function(){
		var src = jQuery(this).attr('src').replace('_off','_on');
		if(preload_images[src] != true)
			{
			var img = document.createElement('img');
			img.setAttribute('src',src);
			preload_images[src] = true;
			}
	});
	jQuery('.onoff').hover(
	function() {
		jQuery(this).attr('src',jQuery(this).attr('src').replace('_off','_on'));
	},
	function() {
		jQuery(this).attr('src',jQuery(this).attr('src').replace('_on','_off'));
	});
	}
	
//*************************************[ cufon ]***************************************
function convert_font() 
	{
	Cufon.replace('.ARubricaCnBold', {
			hover: true
		});	
	Cufon.replace('.ARubricaCnBold a', {
			hover: true
		});
	}
	
function print_r(selects)
	{
	var txt = '';
	for(item in selects)
		{
		txt = txt + item + " => " + selects[item] + "\n";
		
		for(item2 in selects[item])
			{
			txt = txt + "\t" + item2 + " => " + selects[item][item2] + "\n";
			}
		
		
		}
	alert(txt);	
	}	
	
jQuery(document).ready(function(){
	
	//*************************************[ buttons ]************************************
	
	onoffhandler();	
	
	jQuery('#rs_phone h1').hide();
	//*************************************[ fonts ]**************************************
	
	//convert_font();	
	
	//*************************************[ wrap height ]********************************
	//alert(jQuery('#rs_main').height());
	//jQuery('#rs_main_in').css('height',jQuery('#rs_main').height()*1 - 202 + 'px');

	//*************************************[ menu ]************************************
	jQuery('.rs_menu_subitem').hide();
	jQuery('.rs_menu_item a').hover(function(){
		jQuery(this).parent().next().show();
		var position = jQuery(this).parent().position();
		jQuery(this).parent().next().css( {"left": position.left+"px", "top": position.top+"px" });
		//jQuery(this).parent().next().show();
		jQuery('.rs_menu_subitem').unbind('mouseenter','mouseleave');
		jQuery('.rs_menu_subitem').hover(function(){},function(){
			jQuery(this).hide();
			});
		},
	function(){
		//jQuery(this).parent().next().hide();
		});

	});
