=0 && hashURL1.indexOf('?')==-1)
{
window.location.replace(links.replace("#!", "?"));
}
else if(hashURL1.indexOf('!')>=0)
{
window.location.replace(links.replace("#!", "?"));
}
else if(hashURL2.indexOf('#')>=0 && hashURL1.indexOf('?')==-1)
{
window.location.replace(links.replace("#", "?"));
}
else if(hashURL2.indexOf('!')>=0)
{
window.location.replace(links.replace("#", "?"));
}
$(".pagination .links a").click(function(){
$.cookie('pagetop',1);
});
});
// This will trigger the function on page load. Need for direct type in of url and initial load.
$(window).hashchange();
function paging(page,sorts,order,limit,saleonly,patch_size,filter_refine,filter_keyword_search,filter_patchstyle,under_5,ref,view_status){
$("link[rel='canonical']").attr('href',window.location.href);
var lim=$('select[name=\'limits\'] option:selected').attr('lim');
if(limit=='' && lim!=40)
limit=lim;
if(limit==undefined)
{
limit=40;
}
if(limit=='undefined')
{
limit=40;
}
if(limit>216)
limit=216;
$(".uploading_focus").html(" Loading...");
var loader="

";
$(".uploading_focus").fadeIn("slow");
$("body").css("cursor", "progress");
$("body").css("scroll", "no");
if(filter_keyword_search=="")
{
filter_keyword_search=$.trim($("#filter_keyword_search").val());
}
var url="&filtercategory_ids="+$("#filter_category_ids").val()+"&filterpatch_sizes="+$("#filter_patch_sizes").val()+"&filterpatch_style="+$("#filter_patchstyle").val()+"&filteron_sale="+$("#filter_on_sale").val()+"&filter_group_status="+$("#filter_group_status").val()+"&filter_purchased_status="+$("#filter_purchased_status").val();
var pagecheck='';
$.ajax({
type:'POST',
cache: false,
url: 'index.php?route=product/category/seemore&show_image='+$('#p-list').attr('rel')+pagecheck,
data: "path=164_1038&category_id=1038&page="+page+"&sort="+sorts+"&order="+order+"&limit="+limit+"&display="+$.cookie('display_view')+'&saleonly='+saleonly+'&patch_size='+patch_size+'&filter_refine='+filter_refine+'&filter_keyword_search='+filter_keyword_search+'&filter_patchstyle='+filter_patchstyle+'&under_5='+under_5+'&view_status='+view_status+'&products_on_special=0'+'&category_setting=0&content=&sale_title=&filter_rp=&filter_wp=&filter_sort=&filter_price_range='+url+'&show_image='+$('#p-list').attr('rel'),
success:function(data){
//alert(data);
var value=data.split('___');
$("#p-list").html(value[0]);
$.getScript("catalog/view/javascript/category_page.js?v=1.4");
$("body").css("cursor", "auto");
$(".page_count").html(value[1]);
$(".pagination .limit").remove();
if(value[5]==1)
{
$(".cat_inner_desc .category-info").attr("style","display:block");
//$(".desc_tab").show();
}
else
{
$(".cat_inner_desc .category-info").attr("style","display:none");
//$(".desc_tab").hide();
}
//if(value[4]!=1)
//$(".page_count").after("
");
$(".limit").html(value[3]);
if(value[2]!="" && page==1 && value[9]==1)
{
$('#peoplewho_viewed').remove();
$(".people_who_viewed").attr("style","display:none");
$("#desc_box_main").after(value[2]);
}
else if(value[2]!="" && page!=1)
{
$('#peoplewho_viewed').remove();
$(".people_who_viewed").attr("style","display:none");
$(".refine_cat_list").after(value[2]);
$(".recently_view_pro_main").attr("style","display:block");
}
else
{
$(".people_who_viewed").attr("style","display:none");
}
var sss=0;
var licount = (value[8].match(/is/g) || []).length;
$('.refin_ul').addClass("refin_ul_col"+licount);
$('.refin_ul').html(value[8]);
var sss=0;
// alert(data[10]);
var proids=value[10].split('P');
if (proids && proids.length > 0) {
$.each(proids, function( i, val ) {
$.ajax({
url: 'index.php?route=module_common/load_products_image/image_load&product_id='+val,
type: 'post',
data: '',
dataType: 'html',
success: function(data33) {
var value33=data33.split(':::');
$("#cat_pro_image"+val).html(value33[0]);
$("#cat_pro_ass"+val).html(value33[1]);
}
});
});
}
$.cookie('pagetop',0);
$(".uploading_focus").fadeOut("slow");
}
});
}