///////////////////////// default empty vars /////////////////////////
var remline_load = 0;
var storyto_load = 0;
var response_do = 0;
var thisisusr_author = false;
var thediv = '';
//////////////////////////////////////////////////////////////////////

$(document).ready(function () { 
	
//$("#adbrite").load(adbriteloadfile);



////////////// remarks load document ready function ///////////////
if ( remline_load && (!response_do) ) {
	$("#response-" + remline_load ).load("/ajaxer/remliner/" + remline_load);
}

if ( response_do ) {
	window.location = window.location + "#comments";
        $( "#response-" + response_do  ).html( "<img src='/img/loading.gif' height=28 width=28 alt='loading...' /> ");
	loadremsdiv ( response_do , "#response-" + response_do );
}

if ( thisisusr_author ) {
	rems_author();
}
////////////////////////////////////////////////////////////////////////////

$(".togi").click ( function() {
	dodiv = $(this).attr("rel");
	$("#" + dodiv).toggle();
    return true;
});

$(".togi").css("background","url(/img/updown.gif) no-repeat right 0");

return true;
}); // end of ready function


//////////// remarks count display and remarks div load /////////////////////////////////////


function loadrems( storyto_load ) {
	$("#remline").html( "<img src='/img/loading.gif' height=28 width=28 alt='loading...' /> ");
	$("#remtable").css( "border","1px dotted #F69C13");
	$("#remline").load("/ajaxer/response/" + storyto_load );
	return false;
}



function loadremsdiv ( storyto_load , thediv ) {
        $(thediv).html( "<img src='/img/loading.gif' height=28 width=28 alt='loading...' /> ");
	$("#remtable").css( "border","1px dotted #F69C13");
        $(thediv).load("/ajaxer/response/" + storyto_load );
        return false;
}

	
function rems_author() {

	$(".responseajax").each( function() {
		$(this).load("/ajaxer/remliner/" + $(this).attr("rel") );
	});

}

////////////////////////////////////////////////////////////////////////////////////////////////


