// Resize stores so it is centered.. sort of a hack
$(document).ready(function() {
	resizeStoreContainer();
	window.onresize = function() { resizeStoreContainer() };
	
	if ($.browser.msie && $.browser.version < 7) {
		$('#stores_container div.store').mouseover(function() {
			$(this).addClass('storehover');
		}).mouseout(function() {
			$(this).removeClass('storehover');
		}).click(function() {
			location.href = $(this).find('a').attr('href');
		});
	}
	else {
		$('#stores_container div.store').click(function() {
			location.href = $(this).find('a').attr('href');
		});

	}
	
	$('#stores_container div.store-empty').each(function() {
		var self = $(this);
		self.html(self.find('a').html());
	});
});
function resizeStoreContainer() {
	var width = $('#master_stores_container').width();
	var newWidth = parseInt(width / 92) * 92

	$('#stores_container').css('width', newWidth + 'px');
}