﻿$(document).ready(function() {
	$("div#map a").attr("title", "");
		$("div#map a").hoverIntent(function() {
			var cityName = $(this).html();
			var cityLeft = $(this).css("left");
			cityLeft = parseInt(cityLeft.replace("px", "")) - 90;
			cityLeft = cityLeft.toString() + "px";
			$("div#city").stop(true, true).css("left", cityLeft).html(cityName).show().css('opacity', 0).animate({top: '-5px', opacity: '1'}, 'slow');
		}, function() {
			$("div#city").stop(true, true).fadeOut('slow', function() {
				$(this).css('top', '8px');
			});
		});
			
	/* Fancybox */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	
	$("div.entry a[href$='.jpg']").has('img').attr('rel', 'gall').addClass('group').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	
	
	
	$("div.gallery a").attr('rel', 'gall').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	
});


