$(document).ready(function() {
		
    /* auto height*/
	setHeight('.col');

	// Tab 
	$(".tab_content").hide();
	$("ul.tabs li:first").addClass("active").show();
	$(".tab_content:first").show();
	
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active");
		$(this).addClass("active");
		$(".tab_content").hide(); 
		var activeTab = $(this).find("a").attr("href"); 
		$(activeTab).fadeIn();
		return false;
	});
	
});

jQuery(function ($) {
    $('a.postpopup').click(function(){
        id = this.rel;
        $.get('http://garamond.biz/dev/lehmann/website/wp-content/themes/lehmann/popup.php/?id='+id, function (resp) {
            var data = $('<div id="ajax-popup"></div>').append(resp);
            // remove modal options if not needed
            data.modal({
                overlayCss:{backgroundColor:'#000'}, 
                containerCss:{backgroundColor:'#fff', border:'1px solid #ccc'}
            });
        });
        return false;
    });
});



/* column height*/
var maxHeight = 0;
function setHeight(column) {
    column = $(column);
    column.each(function() {       
        if($(this).height() > maxHeight) {
            maxHeight = $(this).height();;
        }
    });
    column.height(maxHeight);
}


