$(document).ready(function(){
	var mapopts = {
		mapCenter: [$('#courselat').val(),$('#courselon').val()], 
		mapZoom: parseInt($('#coursezoom').val(), 10),
		mapShowjMapIcon: false,
		mapType: 'sat',
		mapEnableOverview: false,
		mapEnableType: true
	}
	$('#coursemap').jmap('init', mapopts, function(el, options){
		//
	});

	$('.coursemain').after('<div class="clr"></div><div id="slideshownav">').cycle({ 
    	fx: 'scrollDown',
	    //easing: 'bounceout',
		sync:   0,
		timeout: 0,
		speed: 300,
		pager:  '#slideshownav', 
		pagerAnchorBuilder: function(idx, slide) { 
			return '<div class="coursethumb"><a href="javascript:void(0);"><img src="' + slide.src.replace('main.', 'tiny.') + '" width="50" height="50" /></a></div>'; 
		} 
	});
	
	$('.coursemain img').click(function(){
		var caption = $(this).attr('title') || '';
		var url = $(this).attr('src').replace('main.jpg', 'large.jpg');
		tb_show(caption, url, 'courseimg');
	});
});
