// jQuery
$(document).ready(function(){
	// chrome & safari nav fix
	if($.browser.webkit){
		$('a.nav,a.nav:active,a.nav:hover,a.navactive').css({float:'left',marginRight:'1px',height:'20px',lineHeight:'20px'});
		$('#languages li a').css({lineHeight:'28px'});
	}
	// ff 8.0 fix
	if($.browser.mozilla && $.browser.version=='8.0'){
		$('td.nav').css('padding','1px 0 2px 0');
	}
	// base href anchor fix
	$("a[href^='\#']").click(function(e){
		e.preventDefault();
		document.location.hash=this.href.substr(this.href.indexOf('#')+1);
	})
});
// JW Player
function createPlayer(playerFile, playerId, playerImage, playerStart, playerWidth, playerHeight){
	jwplayer(playerId).setup({
		flashplayer: "_swf/player.swf",
		backcolor: 'FFFFFF',
		lightcolor: 'CCCCCC',
		file: playerFile,
		image: playerImage,
		autostart: playerStart,
		width: playerWidth,
		height: playerHeight,
		controlbar: 'over',
		playlist: 'none'
	});
}
// gmap
function initializeGmap(gMapLat,gMapLng,gMapZoom,gMapElementId,gMapImage){
	var latlng = new google.maps.LatLng(gMapLat,gMapLng);
	var myOptions = {
		zoom: gMapZoom,
		center: latlng,
		mapTypeControl: true,
		mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DEFAULT},
		navigationControl: true,
		navigationControlOptions: {style: google.maps.NavigationControlStyle.DEFAULT},
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};
	var map = new google.maps.Map(document.getElementById(gMapElementId), myOptions);
	var image = gMapImage;
	var spotMarker = new google.maps.Marker({
		position: latlng,
		map: map,
		icon: image
	});
}

