jQuery = jQuery.noConflict(true);

(function($){
	$(function(){
	  
	  $('#top-sidebar').prependTo($('#right-col')).show(); 
	  $('#bottom-sidebar').appendTo($('#right-col')).show(); 	  
		
		$('.form_label').click(function() {
			$($(this).parent().children('.form_field')[0]).slideToggle();
			return false;
		})		
		
		$('#edit_page_link').click(function() {
			$(this).html($(this).html() == 'Edit Page' ? 'Close' : 'Edit Page');
			$('#page_editor_content').slideToggle();
			$('#page_editor_tag').css('position', 'relative')
			return false;
		})
		
		$('input.blow_away').each(function(i, element){
		  
			if ($(element).val() == "") {				
        $(element).val($(element).attr('title'));
			}
      $(element).focus(function(){
				$(this).removeClass('blow_away');
				return $(this).val()===$(this).attr('title') ? $(this).val('') : false;        
      });
      
      $(element).blur(function(){
				if($(this).val()==='') $(this).addClass('blow_away');
				return $(this).val()===''? $(this).val($(this).attr('title')) : false;        
      });
      
    });
    
	});
})(jQuery);

