/* ----- gallery ----- */
$(document).ready(function() {
	$(".gallery a, .historie a, .bahnzoom a, .news a").fancybox();
});

/* ----- easing gallery ----- */
$(document).ready(function(){
	$(".gallery a, .historie a").fadeTo("fast", 1.0);
	$(".gallery a, .historie a").hover(function(){
	$(this).fadeTo("fast", 0.3);
	},function(){
		$(this).fadeTo("fast", 1.0);
	});
});

/* ----- slider courses ----- */
$('#courses').cycle({ 
    fx:     	'scrollHorz', 
    speed:  	'slow', 
    next:   	'#next', 
    prev:   	'#prev',
	//easing: 	'backinout',
    timeout:	0
});

/* ----- slider anlage neu ----- */
$(function() {
    $('#anlage').cycle({ 
        fx:     		'scrollHorz',
		speed:  		'slow',
		startingSlide:	0,
		next:   		'#next-anlage',
		prev:   		'#prev-anlage',
		timeout:		0
    });
    $('#course-00').click(function() { 
        $('#anlage').cycle(0); 
        return false; 
    });
    $('#course-01').click(function() { 
        $('#anlage').cycle(1); 
        return false; 
    });
    $('#course-02').click(function() { 
        $('#anlage').cycle(2); 
        return false; 
    });
    $('#course-03').click(function() { 
        $('#anlage').cycle(3); 
        return false; 
    });
    $('#course-04').click(function() { 
        $('#anlage').cycle(4); 
        return false; 
    });
    $('#course-05').click(function() { 
        $('#anlage').cycle(5); 
        return false; 
    });
    $('#course-06').click(function() { 
        $('#anlage').cycle(6); 
        return false; 
    });
    $('#course-07').click(function() { 
        $('#anlage').cycle(7); 
        return false; 
    });
    $('#course-08').click(function() { 
        $('#anlage').cycle(8); 
        return false; 
    });
    $('#course-09').click(function() { 
        $('#anlage').cycle(9); 
        return false; 
    });
    $('#course-10').click(function() { 
        $('#anlage').cycle(10); 
        return false; 
    });
    $('#course-11').click(function() { 
        $('#anlage').cycle(11); 
        return false; 
    });
    $('#course-12').click(function() { 
        $('#anlage').cycle(12); 
        return false; 
    });
    $('#course-13').click(function() { 
        $('#anlage').cycle(13); 
        return false; 
    });
    $('#course-14').click(function() { 
        $('#anlage').cycle(14); 
        return false; 
    });
    $('#course-15').click(function() { 
        $('#anlage').cycle(15); 
        return false; 
    });
    $('#course-16').click(function() { 
        $('#anlage').cycle(16); 
        return false; 
    });
    $('#course-17').click(function() { 
        $('#anlage').cycle(17); 
        return false; 
    });
    $('#course-18').click(function() { 
        $('#anlage').cycle(18); 
        return false; 
    });
    $('#course-19').click(function() { 
        $('#anlage').cycle(19); 
        return false; 
    });
    $('#course-20').click(function() { 
        $('#anlage').cycle(20); 
        return false; 
    });
    $('#course-21').click(function() { 
        $('#anlage').cycle(21); 
        return false; 
    });
    $('#course-22').click(function() { 
        $('#anlage').cycle(22); 
        return false; 
    });
    $('#course-23').click(function() { 
        $('#anlage').cycle(23); 
        return false; 
    });
    $('#course-24').click(function() { 
        $('#anlage').cycle(24); 
        return false; 
    });
    $('#course-25').click(function() { 
        $('#anlage').cycle(25); 
        return false; 
    });
    $('#course-26').click(function() { 
        $('#anlage').cycle(26); 
        return false; 
    });
    $('#course-27').click(function() { 
        $('#anlage').cycle(27); 
        return false; 
    });
});


/* ----- cycle partner ----- */
$('#partner').cycle({ 
    fx:		'scrollRight', 
    speed:	'fast',
    pause:	1, 
    sync:	1
});

/* ----- easing courses ----- */
$(document).ready(function(){
	$("#courses a").fadeTo("fast", 1.0);
	$("#courses a").hover(function(){
	$(this).fadeTo("fast", 0.7);
	},function(){
		$(this).fadeTo("fast", 1.0);
	});
});

/* ----- google maps ----- */
function initialize() {
if(GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.setMapType(G_HYBRID_MAP);
		map.setCenter(new GLatLng(53.981, 10.875), 11);
		var baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.shadow = null;
		baseIcon.iconSize = new GSize(70, 90);
		baseIcon.shadowSize = null;
		baseIcon.iconAnchor = new GPoint(35, 80);
		baseIcon.infoWindowAnchor = new GPoint(35, 80);
		baseIcon.image = "http://www.ltgk.de/img/icons/location.png";
		markerOptions = { icon:baseIcon };			
		map.addOverlay(new GMarker(new GLatLng(53.981, 10.875), markerOptions));
		map.addControl(new GSmallZoomControl());
	}
}
