search.common.js 1.85 KB
$(document).ready(function() {
    $("#brandopen").click(function() {
    	$("#brandArea").addClass('expand_brands');
        $("#brandclose").show();
    	$("#brandopen").hide();
        return false;
    });

    $("#brandclose").click(function() {
    	$("#brandArea").removeClass('expand_brands');
    	$("#brandclose").hide();
    	$("#brandopen").show();
        return false;
    });
    $("#searchopen").click(function(){
    	$("#parameterMini").hide();
    	$("#searchmore").slideDown("normal");
    	$("#searchopen").hide();
    	$("#searchclose").show();
    	return false;
    });

    $("#searchclose").click(function(){
    	$("#searchmore").slideUp("normal",function(){
    		$("#a1").show();
    		$("#parameterMini").show();
    	});
    	$("#searchopen").show();
    	$("#searchclose").hide();
    	return false;
    });

    if(typeof(search_price_from) == 'undefined'){
        search_price_from = 10;
    }
    if(typeof(search_price_to) == 'undefined'){
        search_price_to = 1000;
    }
    if(typeof(search_price_step) == 'undefined'){
        search_price_step = 10;
    }
    
    $("#tree").treeview({
        animated : "fast",
        collapsed : true,
        unique : true,
        //persist: "cookie",
        toggle : function() {
            window.console && console.log("%o was toggled", this);
        }
    });
});
var stockTimeout = null;
function stockSelectIn(flag) {
    if (stockTimeout != null) {
        window.clearTimeout(stockTimeout);
    }
	var libox="#box"+flag;
    $(libox).show();
}
function stockSelectOut(flag) {
    stockTimeout = window.setTimeout(function() {
		var libox="#box"+flag;
        $(libox).hide();
    }, 1);
}
QRecommend = {
	sort : 0,
	url:'',
	recommend: function(page, obj)
	{
		QGlobal.Page.QSend_Url = this.url;
		QGlobal.Page.QItem = 'recommendList';
		QGlobal.Page.getList(page + '&sort=' + this.sort, obj); 
	}
};