jQuery(function($){
    //imposta le colonne      
    $(".product-details").columnize({
        buildOnce: true,
        lastNeverTallest: false,
        columns: 2
    });
    
    //crea i tab
    $("ul.tabs").tabs("div.tabs-content-panes > div.tabs-pane", {
        onBeforeClick: function(event, i) {
    
            // get the pane to be opened
            var pane = this.getPanes().eq(i);
    
            // only load once. remove the if ( ... ){ } clause if you want the page to be loaded every time
            if (pane.is(":empty")) {
                var cTab = this.getTabs().eq(i);
                if (cTab.attr("href") == '#gobosfilters') {
                    pane.load(cTab.attr("rel"));
                }
                if (cTab.attr("href") == '#paintworks') {
                    pane.load(cTab.attr("rel"));
                }
            }
        }
    }).history();
});

