$(document).ready(function(){
	//Nahozeni ukazek
	var _width = screen.width;
	var _height = screen.height;
	$("#galeriedilo").click( function() {
		_left = (_width - 700)/2;
		_top = (_height - 550)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=700,height=550');
		return false;
	});
	
	$("#vystava-miroslavao").click( function() {
		_left = (_width - 900)/2;
		_top = (_height - 600)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=900,height=600');
		return false;
	});
	
	$("#vystava-viktorz").click( function() {
		_left = (_width - 900)/2;
		_top = (_height - 600)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=900,height=600');
		return false;
	});
	
	$("#vystava-helenabastarova").click( function() {
		_left = (_width - 700)/2;
		_top = (_height - 550)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=700,height=550');
		return false;
	});
	
	$("#vystava-rostpos").click( function() {
		_left = (_width - 900)/2;
		_top = (_height - 600)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=900,height=600');
		return false;
	});
	
	$("#vystava-jansaudek").click( function() {
		_left = (_width - 900)/2;
		_top = (_height - 600)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=900,height=600');
		return false;
	});
	
	$("#vystava-borivojpejchal").click( function() {
		_left = (_width - 900)/2;
		_top = (_height - 600)/2;
		window.open( $(this).attr('href'), '_blank','status=yes,top='+_top+',left='+_left+',width=900,height=600');
		return false;
	});
	
	//Nahozeni mapy
	if (GBrowserIsCompatible()) {
		initialize();
	}
    
    function initialize(){
    	var mapa = new GMap2(document.getElementById('mapDiv'));
        mapa.setCenter(new GLatLng(49.192293, 16.606554), 17);
        mapa.setMapType(G_NORMAL_MAP);
        mapa.addControl(new GSmallMapControl());
        
        
        var xIcon = new GIcon(G_DEFAULT_ICON);
        xIcon.image = "images/point.jpg";
        xIcon.iconSize = new GSize(30, 30);
        xIcon.shadowSize = new GSize(0, 0);
        

        markerOptions = { icon:xIcon };
        marker = new GMarker(new GLatLng(49.192293, 16.606554), markerOptions);        
        mapa.addOverlay(marker);
        //map.setUIToDefault();
    }
});