
$(document).ready(function(){

 //Seearch for link with REL set to ajax
$('a.ajax').click(function () {

		var data = $(this).attr('href');
		var _divreplace = "#"+$(this).attr("rel");
		
	
	

//if(_divreplace ==""){ _divreplace = 'ajax_content';}


		var _href_class = $(this);

		$.ajax({
        url:  data,
        type: "GET",
        cache: false,
		success: function (html) {
			
			$('a.ajax').removeClass('active'),
			_href_class.addClass('active');

			//add the content retrieved from ajax and put it in the #ajax_content div
			$(_divreplace).html(html);//.appendTo("body");

			//display the #videocontent with fadeIn transition
			$(_divreplace).fadeIn();
		}

    	});  // end ajax function

	return false;
	});  // end click function

}); // end ready function