






/*
var doc = '';
var head = '';
*/

var h = f = '';

function resfunc(d, textStatus) {
	switch (d.elem) {
		case 'header':
			$('#main').prepend(d.content);
			$('#links1').remove().appendTo('#left');
			$('#links2').remove().appendTo('#right');
			//h = d.content;
			//doc = d.content+doc;
			//jQuery.get('/assets/site/seofak.php', { elem: "footer"}, resfunc, 'json');
			//$('#dbody').innerHTML = d.content +
			break;
		case 'footer':
			//$('#dbody').append(d.content.html());
			$('#main').append(d.content);



			//f = d.content;


			//$('#dbody').html($('#dbody').html()+d.content);
			//doc += d.content;
			//$('body').html(doc);
			//$('body').empty();
			//$('body').show();
			//alert(doc);
			//$('body').html('');
			//$('body').append(doc);
			//document.write('2');
			//$('#dbody').html(doc);
			//$('head').html(head);
			//document.close();
			//alert($('#footer').html());
			break;
	}
}

$(document).ready(function(){
	//return;
	/*head = $('head').html();
	doc = $('#dbody').html();*/
	//alert(doc);
	jQuery.get('/assets/site/seofak.php', { elem: "header"}, resfunc, 'json');
	jQuery.get('/assets/site/seofak.php', { elem: "footer"}, resfunc, 'json');


	$('.r').click(function () {
		document.location = $(this).attr('title');
	});
});
