// *****************************************
// add CSS3 'nth-child' seudo support for IE
// *****************************************
var $j = jQuery.noConflict();
$j(document).ready(function(){
	// art-Block CSS3 suedo functionality
	$j('body .art-Block:nth-child(4n+1)').addClass('nth-child1');
	$j('body .art-Block:nth-child(4n+2)').addClass('nth-child2');
	$j('body .art-Block:nth-child(4n+3)').addClass('nth-child3');
	$j('body .art-Block:nth-child(4n+4)').addClass('nth-child4');
	// home page block height equalisation
	setEqualHeights($j('.homecontent-wrapper .block-wrapper:nth-child(1) .equal_height'));
	setEqualHeights($j('.homecontent-wrapper .block-wrapper:nth-child(2) .equal_height'));
});

function setEqualHeights(elements){
	// home page block height equalisation
	var blockh = 0;
	//check each block's height
	elements.each(function(){
		if($j(this).height() > blockh){
			//update the blockh
			blockh = $j(this).height();
		}
	});
	//set heights
	elements.height(blockh);
}
