function redirect(url, new_window){
	if(new_window){
		window.open(url, new_window);
	}else{
		window.location.href=url;
	}
}

function openColorbox(url, width, height){
	
	if(width == undefined){
		width = 930;
	}

	if(height == undefined){
		height = 591;
	}
	
	$.colorbox({ 
			href: url,
			width: width+'px',
			height: height+'px',
			scrolling: false
		} 
	);
}

function load_store(id, floor){
	load_store_description(id);
	$('#current-map').attr('src', "/img/floorplans/" + floor + "-" + id + ".png");
}

function load_store_description(id){
	$('.storedescription').load('/ajax/storedescription/'+id);
}

$(document).ready(function() {
	$('#header_menu a').bind('mouseover', function(){
		$('.nav_layer').hide();
		var current_layer = $(this).attr('rel');
		if(current_layer != undefined){
			$(this).css('padding-bottom', '12px');
			$('#' + current_layer).show();
		}
	});
	
	$('.nav_layer').bind('mouseleave', function(){
		$(this).hide();
	});
	
	$('#category-box div').bind('mouseover', function(){
		$(this).css('background-image', 'url(/img/bulletred.png)');
		$(this).children().css('color', '#A61124');
	});	
	
	$('#category-box div').bind('mouseleave', function(){
		$(this).css('background-image', 'url(/img/bulletblue.png)');
		$(this).children().css('color', '#6D6D6D');
	});	
	
	
});





















