jQuery.noConflict();
function pageload(hash) {
	var on = 0;
	if(hash) {
		closeall();
		if (GetCookie('clicked') == 0){
			if (getLocationHash('req',GetCookie('history')) != getLocationHash('req',hash)) {
				var id = getLocationHash('req',GetCookie('history'));
				if (id) $(id).className = '';
				ShopTabs();
				on = 1;
			}else if (getLocationHash('req',hash) == 'cart' && getLocationHash('basket',hash)){
				if (GetCookie('history') != hash && !getLocationHash('step',hash) && !getLocationHash('pid',hash) && $('tabsContent')) CartTabs();
			}else if (getLocationHash('type') > -1 && GetCookie('history') != hash){
				if (getLocationHash('req',hash) == 'orders') OrderTabs();
				else if (getLocationHash('req',hash) == 'account' && !getLocationHash('id')) AccountTabs();
			}
		}
		if (getLocationHash('change',hash)) {
			var change = getLocationHash('change',hash);
			if (change == 'pc_data') Send('shop.ajax.php','shop_content','change_cdata=1'); else Send('shop.ajax.php','shop_content','change_data=1');
		}
		if ((getLocationHash('req',hash) == 'products' && on == 0) || (getLocationHash('req',hash) == 'rma' && getLocationHash('act',hash) == 'add') && !getLocationHash('rcart',hash)){
			if (GetCookie('history') != hash){
				if (getLocationHash('GRID',hash) || getLocationHash('PRID',hash) || getLocationHash('pid',hash) || getLocationHash('adv',hash)) ShowProducts(getLocationHash('req',hash));
				else if (getLocationHash('search')) ShowProducts(getLocationHash('req',hash));
			}
		}
		SetCookie('history', hash);
		SetCookie('clicked', 0);
	}
}
jQuery(document).ready(function(){
	jQuery.historyInit(pageload);
});