﻿/// <reference path="jquery-1.4.1-vsdoc.js"/>

/* Facets - Apply the Facets Jquery Plugin to all ul with .facet class */
$(document).ready(function() {

    $(".facet>ul").sortlist(
        {
            sortFunction: function(a, b) {
                var compA = $(a).children('a').children('span').attr('class');
                var compB = $(b).children('a').children('span').attr('class');
                // Bug in Chrome. Doesn't like the default to be 0
                return (compA > compB) ? -1 : (compA < compB) ? 1 : -1;
            }
        }).hideextra();

});

