$(document).ready(function(){

    //equalise heights call
    $('#double_panels > article').equalise();

    //chosen select form call
    $('select').chosen();

	/*$('#primary a').hover(function(){
        var o = $(this).position();
        var w = $(this).outerWidth();

        $(this).siblings('span').animate({
            left: o.left,
            width: w
        }, 500);

        //$(this).animate({ backgroundColor: "#f6f6f6" }, 'fast');
    });*/
	/*$('#primary a').mouseout(function(){
		$(this).animate(
			{backgroundPosition: '0px -29px'},
			{duration:500}
            )
		})*/

});
//generic $ functions
(function($){
    $.fn.equalise = function()   {
        var tallest = 0;

        //loop over each element and workout which is the tallest
        $(this).each(function(){
            if ($(this).height() > tallest) {
                tallest = $(this).height();
            }
        })

        //if using IE6 then do this
        if ($.browser.msie && $.browser.version == 6.0) {
            $(this).height(tallest);
        //otherwise for everyone else
        } else  {
            $(this).css('min-height', tallest + 'px');
        }
    return this;
    }
}) (jQuery);
