


function load() {
if (GBrowserIsCompatible()) {
         var map = new GMap2(document.getElementById("map"));
         map.addControl(new GLargeMapControl());
         var MapTypes = map.getMapTypes();
         MapTypes[0].getName= function() { return "text 1";}
         MapTypes[1].getName = function() { return "text 2";}
         MapTypes[2].getName = function() { return "text 3";}
         map.addControl(new GMapTypeControl());
         map.setCenter(new GLatLng(51.1367277, 17.1251181), 13);
         var info='<div style="background-color: #fff; width: 200px; font-size: 11px; FONT-FAMILY: Verdana, Tahoma, Arial, Sans-Serif;"><B>AWM Dom Sp. z o.o.</B><hr>ul. Sienna 14<BR>51-349 Wroc&#322;aw <hr><B>GPS</B> N: 51&deg; 8&#39; 12&#34; &nbsp;E: 17&deg; 7&#39; 30&#34; </div>';
         var point = new GLatLng(51.1367277, 17.1251181);
         var marker = new GMarker(point);
         GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(info);
         });
         map.addOverlay(marker);
         marker.openInfoWindowHtml(info);

}
} 

/*-------------------------------------------------------------------- 
 * JQuery Plugin: "EqualHeights"
 * by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
 *
 * Copyright (c) 2008 Filament Group
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 *
 * Description: Compares the heights or widths of the top-level children of a provided element 
 		and sets their min-height to the tallest height (or width to widest width). Sets in em units 
 		by default if pxToEm() method is available.
 * Dependencies: jQuery library, pxToEm method	(article: 
		http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/)							  
 * Usage Example: $(element).equalHeights();
  		Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
 * Version: 2.0, 08.01.2008
--------------------------------------------------------------------*/

$.fn.equalHeights = function(px) {
	$(this).each(function(){
		var currentTallest = 0;
		$(this).children().each(function(i){
			if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
		});
		if (!px || !Number.prototype.pxToEm) currentTallest = currentTallest.pxToEm(); //use ems unless px is specified
		// for ie6, set height since min-height isn't supported
		if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': currentTallest}); }
		$(this).children().css({'min-height': currentTallest}); 
	});
	return this;
};

$(function(){ $('.all').equalHeights(); });

        $(document).ready(function(){
            
var highestCol = Math.max($('#do_lewej').height(),$('#do_prawej').height());
$('body').height(highestCol);		

		
	$("a[rel=lightbox]").livequery(function(){
		$(this).lightBox();
	}
	);


                 $('#slider').innerfade({ speed: 1500,
		 timeout: 5000, 
		 type: 'sequence', 
		 containerheight: '274px' });
            
        });
        
 $(document).ready(function(){
	 
	 $("a.popup").click(popup);
 });       
        
function popup(){

	var product = $(this).attr("rel").split("_")[1];
	
	$.post(
		"ajax.php",
		"action=popup_product&product="+product,
		function(response) {
			$("#overlay_content").html(response);
			$("#overlay_container").overlay({expose: "#FF0000"}).load();
			$("a[rel=lightbox]").lightBox();
		}
	);
	
	return false;
}
