function ajaxed_content( session_param ) {
		 /*$( "a[href][target!='_blank']" ).live( "click",
	    	       	       function( e ) {
	    	       	       		 var that = $( this ), src = that.attr("href");
	    	       	       		 if( src.search( /javascript/ ) != -1 ) {
	    	       	       		 	 return true;
   								 } else if( src.search( /\.html/ ) != -1 ) {
	    	       	       		 	 src = src.replace( /\.html/gim, "ajaxed_content.html" );
   								 } else {
   								   		src = src + "&ajaxed_content" + session_param + '&lang=' + g_language;
   								 }
								 $( "#img_loading" ).remove();
	    	       	       		 size = parseInt( that.css( "font-size" ) ) - 4;
	    	       	       		 that.append( ' <img id="img_loading" border="0" src="/pictures/spec/loading_3.gif" width="'+size+'" height="'+size+'">' );
	    	       	       		 //alert( src );
			       		 		 $.get( src, 
									    function( xml ) {
												  ajaxed_set_content( src, xml );
										}, 
										"xml" );
			       		 		 return false;
                               } );*/
	 $( "a[href*='office.php'][target!='_blank']" ).live( "click",
	    	       	       function( e ) {
	    	       	       		 var that = $( this ), src = that.attr("href");
	    	       	       		 //$( "#central" ).fadeTo(300, 0.2);
	    	       	       		 $( "#img_loading" ).remove();
	    	       	       		 size = parseInt( that.css( "font-size" ) ) - 4;
	    	       	       		 that.append( ' <img id="img_loading" border="0" src="/pictures/spec/loading_3.gif" width="'+size+'" height="'+size+'">' );
			       		 		 $.get( src + "&ajaxed_content" + session_param + '&lang=' + g_language, 
									    function( xml ) {
												  ajaxed_set_content( src, xml );
										}, 
										"xml" );
			       		 		 return false;
                               } );
      $( "a[href^='/search.php?'][target!='_blank']" ).live( "click",
	    	       	       function( e ) {
	    	       	       		 var that = $( this ), src = that.attr("href");
	    	       	       		 //$( "#central" ).fadeTo(300, 0.2);
	    	       	       		 $( "#img_loading" ).remove();
	    	       	       		 size = parseInt( that.css( "font-size" ) ) - 4;
	    	       	       		 that.append( ' <img id="img_loading" border="0" src="/pictures/spec/loading_3.gif" width="'+size+'" height="'+size+'">' );
			       		 		 $.get( src + "&ajaxed_content" + session_param + '&lang=' + g_language, 
									    function( xml ) {
												  ajaxed_set_content( src, xml );
										}, 
										"xml" );
			       		 		 return false;
                               } );
      /*$( "a.ajaxed_content[target!='_blank']" ).live( "click",
	    	       	       function( e ) {
	    	       	       		 var that = $( this ), src = that.attr("href");
	    	       	       		 src = src.replace( /\.html/gim, ".php?" );
	    	       	       		 //$( "#central" ).fadeTo(300, 0.2);
	    	       	       		 $( "#img_loading" ).remove();
	    	       	       		 size = parseInt( that.css( "font-size" ) ) - 4;
	    	       	       		 that.append( ' <img id="img_loading" border="0" src="/pictures/spec/loading_3.gif" width="'+size+'" height="'+size+'">' );
	    	       	       		 //alert( src + "&ajaxed_content" + session_param );
			       		 		 $.get( src + "&ajaxed_content" + session_param + '&lang=' + g_language, ajaxed_set_content, "xml" );
			       		 		 return false;
                               } );*/
      //$( "a.not_ajax" ).die( "click" );
}

function ajaxed_set_content( src, xml ) {
	 var content = $( "content", xml );
	 //alert(content.length);
	 var jump = false;
	 content.each( function() {
	 /*for ( var i = 0, count = content.length; i < count; i++  ) {*/
	 			   			  var that = /*content.eq(i);*/$( this, xml );
  							  //alert( that.attr("id") );
							  var elem = $( "#"+that.attr("id") ); 
	 			   			  /*elem.hide(   function() {*/
			   			 				   			  elem.html( that.text() );
			   			 				   			  if ( src.search( /template_id/ ) == -1 )
			   			 				   			  	 $( "html, body" ).scrollTop( elem.offset().top );
	 							 					  //elem.fadeTo(300, 1);
							 						  $( "#img_loading" ).remove();
							 						  
	 							 					  if ( src.search( /pro_order=year/ ) != -1 )
	 							 					  	 srok_pro_order = 12;
							 						  else if( src.search( /pro_order=month/ ) != -1 )
	 							 					  	   srok_pro_order = 1;
			  	                                      else if( src.search( /mysite&content/ ) != -1 ) {
			  	                                      	   //alert( parseInt( $( "template_id", xml ).eq( 0 ).text() ) + "#" + parseInt( $( "author_id", xml ).eq( 0 ).text() ) );
	 							 					  	   construct( parseInt( $( "template_id", xml ).eq( 0 ).text() ), parseInt( $( "author_id", xml ).eq( 0 ).text() ) );
				 					  	              } else if( src.search( /search\.php/ ) != -1 ) {
													  		 addthis.toolbox(".addthis_toolbox");
        													 addthis.counter(".addthis_counter");				 					  	   
				 					  	              }
                                           /*} );*/ 
							 } );
							 /*}*/
	 //createJHtmlArea();
}
