function loadMatchMakerAccordion(productId,filterAttribute)
{jQuery('#accordion').load('/mytaste/ajax/matchmaker',{product_id:productId,filter_attribute:filterAttribute},function(responseText,textStatus){jQuery('#matchmaker').removeClass('waiting');if((textStatus!='success')||(jQuery.trim(responseText)=='')){jQuery('#matchmaker .no-results-msg span.attr-name').text(jQuery('#matchmaker-filter').find(':selected').text());jQuery('#matchmaker').addClass('no-results');}else{jQuery('#accordion').accordion({autoHeight:false});}});}
jQuery(document).ready(function(){loadMatchMakerAccordion(jQuery('#current_product_id').val(),'all');jQuery('#matchmaker-filter').change(function(){jQuery('#matchmaker').removeClass('no-results');jQuery('#matchmaker').addClass('waiting');jQuery('#accordion').accordion('destroy');loadMatchMakerAccordion(jQuery('#current_product_id').val(),jQuery('#matchmaker-filter').val());});});