$(document).ready(function() {
var animating = false;
	$('#btn_left').click(function() {
	if($('#city_wrap').css('margin-left') != '0px' && animating == false){
		animating = true;
		$('#city_wrap').animate({
			marginLeft: '+=850'
			}, 3000, function() {
				animating = false;
		});
	}
	});

	$('#btn_right').click(function() {
	if($('#city_wrap').css('margin-left') != '-1700px' && animating == false){
		animating = true;
		$('#city_wrap').animate({
			marginLeft: '-=850'
			}, 3000, function() {
				animating = false;
		});
	}
	});
$(".loc").each(function(){
		if((!$('#disp_'+$(this).attr('id')).hasClass('manual_pos'))){
			var offset = $(this).position();
//			alert('left: '+offset.left+' and top: '+offset.top);
			$('#disp_'+$(this).attr('id')).css('left',offset.left);
			$('#disp_'+$(this).attr('id')).css('top',offset.top);
		}
});
var hovconfig = {    
 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
 interval: 200, // number = milliseconds for onMouseOver polling interval    
 over: makeTall, // function = onMouseOver callback (REQUIRED)    
 timeout: 400, // number = milliseconds delay before onMouseOut    
 out: makeShort // function = onMouseOut callback (REQUIRED)
};
function makeTall(){  $('#disp_'+$(this).attr('id')).show('slow');}
function makeShort(){ $('#disp_'+$(this).attr('id')).hide('slow');}

$(".loc").hoverIntent(hovconfig);

$("a.fbox").fancybox({
	'transitionIn'	:	'elastic',
	'transitionOut'	:	'elastic',
	'speedIn'		:	600, 
	'speedOut'		:	200, 
	'overlayShow'	:	false,
	'titlePosition'		:	'inside',
	'cyclic'				: true
});


}); // !jquery
