// F5 redirect
//if (window.history.length+1 >= $.cookie('history_length')) {
	// remember history position
	//	$.cookie('history_length', window.history.length, {path:'/'});

	if ($.cookie('layout_url') && $.cookie('content_url')) {
		if ($.cookie('layout_url') == window.location.pathname) {
			// Same layout as previous, looks like F5
			if ($.cookie('layout_url') != $.cookie('content_url')) {
				// F5 - Redirect to last page requested by ajax
				document.location = $.cookie('content_url');
				//window.open($.cookie('content_url'), "_top")
			}
		} else {
			// non-ajax follow 
			$.cookie('content_url', window.location.pathname);
		}
	}
//}
// Save current url in cookies
$.cookie('layout_url', window.location.pathname);
//alert($.cookie('layout_url'));

