// remove the "$" namespace from jQuery, avoids conflicts with other libraries
jQuery.noConflict();

// closure, mapping jQuery to $, window, document and undefined - useful for minifing tools
(function($, window, document, undefined){

// document ready method
$(function(){

	
	if ($.fn.equalHeights)
	{
		$('#container').children().equalHeights();
		$('#home').children().equalHeights();
	}



	// IE6 PNG fix
	if (window['DD_belatedPNG'] !== undefined)
		DD_belatedPNG.fix('img');
});

// plugins

// equalHeights - jQuery plugin - forces elements to have the same height (maximum)
$.fn.equalHeights = function(add)
{
	var m = 0;
	this.each(function(){
		m = Math.max(m, $(this).outerHeight());
	});
	return this.each(function(){
		var t = $(this), p = 0;
		$.each(['borderTopWidth', 'paddingTop', 'paddingBottom', 'borderBottomWidth'], function(i,n){
			var v = parseInt(t.css(n));
			p += (isNaN(v) ? 0 : v);
		});
		var h = m - p;
		if (add && add[this.id])
			h += add[this.id];
		if ($.browser.msie && $.browser.version <= 6) 
			t.css('height', h);
		t.css('min-height', h); 
	});
};


})(jQuery, window, document);

