Cufon.replace('h1', {fontFamily:'HeliosThin'});
/**
** http://zachwaugh.com/2008/07/swapping-input-field-placeholder-text-with-jquery/
**/
$(document).ready(function(){//alert('h');
  $('input[type=text]').focus(function(){ 
    if($(this).val() == $(this).attr('defaultValue'))
    {
      $(this).val('');
	  $(this).css('color', '#6a6969');
    }
  });
  
  $('input[type=text]').blur(function(){
    if($(this).val() == '')
    {
      $(this).val($(this).attr('defaultValue'));
	  $(this).css('color', '#6a6969');
    } 
  });

  $('textarea').focus(function(){ 
    if($(this).val() == $(this).attr('defaultValue'))
    {
      $(this).val('');
	  $(this).css('color', '#6a6969');
    }
  });
  
  $('textarea').blur(function(){
    if($(this).val() == '')
    {
      $(this).val($(this).attr('defaultValue'));
	  $(this).css('color', '#6a6969');
    } 
  });

/** MENU **/
	var ie6 = /MSIE (5\.5|6\.)/.test(navigator.userAgent) && navigator.platform == "Win32";
	var viewBlock = '.r-star-shape';
	$('#main_menu li:has('+viewBlock+')').hover(
		function(){
			$(this).find(viewBlock).stop(true, true);
			$(this).addClass('rnd_menu_item');
			if (!ie6) {
				$(this).find(viewBlock).slideDown();
			} else {
				$(this).find(viewBlock).css('display', 'block');
				$(this).find('.rnd_li_ie').css('display', 'block');
			}
		},
		
		function(){
			$(this).removeClass('rnd_menu_item');
			if (!ie6) {
				$(this).find(viewBlock).slideUp('fast');
			} else {
				$(this).find(viewBlock).css('display', 'none');
				$(this).find('.rnd_li_ie').css('display', 'none');
			}
		}
	);
	
	$('#view_link').click(function(){
		if ($(this).hasClass('ol_vis')) {
			$(this).removeClass('ol_vis');
			$('#view_content').hide('slow');
		} else {
			$(this).addClass('ol_vis');
			$('#view_content').show('slow');
		}
		
		return false;
	});
	
	
	
	$('#collapse_list .cl_item').removeClass('opened_li');
	$('#collapse_list .cl_content').hide();
	
	$('#collapse_list .list_title').click(function(){
		$('#collapse_list .cl_content').slideUp();
		var li = $(this).parent('.cl_item');
		
    	if (li.hasClass('opened_li')) {
    		$('#collapse_list .cl_item').removeClass('opened_li');
        	li.find('.cl_content').slideUp();		        		
    	} else {
    		li.addClass('opened_li');
        	li.find('.cl_content').slideDown();
        }
		
		return false;
	});
	

	$('.view_text').hide();
	$('.view_link').click(function(){
		if ($(this).hasClass('arrow_up')) {
			$(this).removeClass('arrow_up');
			$(this).addClass('arrow_down');
			$(this).parent('td').find('.view_text').hide();
		} else {
			$(this).addClass('arrow_up');
			$(this).removeClass('arrow_down');
			$(this).parent('td').find('.view_text').show();
		}

		return false;
	});
});
