window.addEvent('load', function(){
	
	String.implement({

        parseQueryString: function() {
        
            var vars = this.split(/[&;]/);
            var rs = {};
            
            if (vars.length) vars.each(function(val) {

                var keys = val.split('=');
                if (keys.length && keys.length == 2) rs[decodeURIComponent(keys[0])] = decodeURIComponent(keys[1]);
            });

            return rs;
        }
    });
		  
	//for each 'group' div
	$$('.table').each(function(group){
		//set variable to contain maximum height
		var maxHeight=0;
		//check each direct descendant of the group
		group.getElements('.column').each(function(childEl){
			//get the height of this div
			var testSize=childEl.getSize().y;
			//if it's the largest height so far, set the maxHeight variable
			if(testSize>maxHeight){
				maxHeight=testSize;
			}
		});
		//set the divs height to the max height
		group.getElements('.column').each(function(childEl){
			childEl.setStyle('min-height',maxHeight+'px');
		});
	});
	var gallery = new Gallery();
});