$(document).ready( function() {

	Cufon.replace('#subpage h2, #subpage h3, table.offer thead th');

	$("#main ul.slider").bxSlider({
		auto: true,
		infiniteLoop: true,
		pause: 5000
	});

	$("#header .menu li span").css("opacity",0)

	$("#header .menu li a").mouseenter( function() {
		$(this).parent().children("span").fadeIn(150);
		$(this).parent().children("span").animate({
			opacity: 1,
			top: '35px'
		}, {
			queue: false
		}, 50 );
	}).mouseleave( function() {
		$(this).parent().children("span").animate({
			opacity: 0.0,
			top: '70px'
		}, {
			queue: false
		}, 100 );
		$(this).parent().children("span").fadeOut(200);
	});
	$("table.offer .promo").tooltip({
		bodyHandler: function() {
			return '<img src="/wp-content/themes/jach/images/rabat.png" />';
		},
		positionLeft: true,
		showURL: false,
		top: -74,
		left: -10
	});
	
	function __initialize() {
		var latlng = new google.maps.LatLng(50.878696,20.62726);
		var myOptions = {
			zoom: 16,
			center: latlng,
			zoomControl: true,
			mapTypeControl: false,
			streetViewControl: false,

			mapTypeId: google.maps.MapTypeId.ROADMAP
		};
		var map = new google.maps.Map(document.getElementById("map_canvas"),
		myOptions);

		var image = '/wp-content/themes/jach/images/google_icon.png';
		var myLatLng = new google.maps.LatLng(50.878696,20.62726);
		var beachMarker = new google.maps.Marker({
			position: myLatLng,
			map: map,
			icon: image
		});
	}

	//initialize();

});
