jQuery(document).ready(function(){
	jQuery(":text,textarea").focus(function(){
		jQuery(this).parent().addClass("currentFocus");
		jQuery(".currentFocus .desc").css({"color" : "#ff5a00"});
		jQuery(".currentFocus .message_input, .currentFocus #author, .currentFocus #email, .currentFocus #url").css({"border-color" : "#ff5a00", "color" : "#000"});
	});
	jQuery("div.mainpage-box").hover(
	    function(){
		jQuery(this).addClass("boxFocus");},
		function(){
		jQuery(this).removeClass("boxFocus");}
	);
	jQuery("#box1").click(
	    function(){
		window.location.href = jQuery("#box-link1").attr("href");
		}
	);
	jQuery("#box2").click(
	    function(){
		window.location.href = jQuery("#box-link2").attr("href");
		}
	);
	jQuery("#box3").click(
	    function(){
		window.location.href = jQuery("#box-link3").attr("href");
		}
	);
	jQuery("#box4").click(
	    function(){
		window.location.href = jQuery("#box-link4").attr("href");
		}
	);

	jQuery(":text,textarea").blur(function(){
		jQuery(this).parent().removeClass("currentFocus");
		jQuery(".message_input, .desc, #author, #email, #url").removeAttr("style");
	});
	
	/*jQuery("#sidebar ul li ul li").hover(function(){
		jQuery("#sidebar ul li ul li").css({"cursor" : "pointer"});
	});*/
	
	/*jQuery("#sidebar ul li ul li").click(function(){
		window.location=jQuery(this).find("a").attr("href");
		return false;
	});*/
	
	/*dropdown menu 20090805*/
	jQuery("div#main_navi ul.left li").hover(
		function(){jQuery("ul", this).css("display", "block");},
		function(){jQuery("ul", this).css("display", "none");}
	);
});
var loclat_1 = "52.200518"; 
var loclng_1 = "21.126611";
var cloudtext = "<strong>Gra-Ma-R - Centrum Szlachetnej Kostki Brukowej </strong><br />Ul. Bronowska 36, Warszawa<br /><strong>GPS</strong> N: 52° 12' 1\"  E: 21° 7' 35\"<br /> ";
window.onload = launchMaps;
if (window.onload.captureEvents) window.onload.captureEvents(Event.ONLOAD);
function launchMaps(e) {
	if (!e) var e = window.event
	// e refers to the event
	{
		initialize();
	}
};
function initialize() {
      if (GBrowserIsCompatible() && jQuery('#map_canvas').length) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(loclat_1,loclng_1), 13);
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        var baseIcon = new GIcon();
        baseIcon.iconSize = new GSize(24, 24);
        baseIcon.iconAnchor = new GPoint(10, 10);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        function createMarker(point, textOnMarker) {
          var letteredIcon = new GIcon(baseIcon);
          letteredIcon.image = "../wp-content/themes/gramar/images/gmaps_marker.gif";
          markerOptions = { icon:letteredIcon };
          var marker = new GMarker(point, markerOptions);
          GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(textOnMarker);
          });
          return marker;
        }
		markerLoc = createMarker(new GLatLng(loclat_1, loclng_1),cloudtext);
		map.addOverlay(markerLoc);
		markerLoc.openInfoWindowHtml(cloudtext);
      }
    };
