// JavaScript Document

var isIE=/*@cc_on!@*/false;

function jQuaryAttachments()
{
	//if (!isIE){}
	// FADE OUT EFFECT
	if (!isIE)
	{
		$j('#ttop_navigation li').hover(
			function () 
			{
				if ( $j(this).hasClass('') )
				{
					$j(this).fadeTo(0,0);
					$j(this).stop(true).fadeTo('fast',1);
				}
			}
		);
	}
}

// FIXES FOR BROWSERS
function resizeContent() 
{
	function fixHeightFor(target) 
	{
		var bottomMargin = 0; // value in pixels
		var newHeight = $j('#all_elements_contener').height() + bottomMargin;
		var bodyHeight = $j('body').height();
	
		bodyHeight > newHeight ? $j(target).css('height', bodyHeight) : $j(target).css('height', newHeight);
		
	}
	fixHeightFor('#exampler');
	
	function fixMiddleColumnsHeight() 
	{
		var lcHeight = parseInt($j('#middle_c_left_column').height());
		var rcHeight = parseInt($j('#middle_c_right_column').height());
		
		rcHeight > lcHeight ? $j('#middle_c_left_column').css('height', rcHeight) : $j('#middle_c_left_column').css('height', 'auto');
	}
	if (!$j.browser.webkit) {
    	fixMiddleColumnsHeight();
  	}
	
	function fixFootPosition(target) 
	{
		var mMargin = 170; // value in pixels
		var mHeight = parseInt($j('#slideshow_contener').height()) - mMargin;
		$j(target).css('height', mHeight);
	}
	fixFootPosition('#middle_contener_inside.resize_it');
	
	function fixOfferBoxPosition(target) 
	{
		var boxHeight = parseInt($j('#offer_box_contener').height() - 28);
		var stageHeight = parseInt($j('#all_elements_contener').height() / 2) - boxHeight;
		$j(target).css('margin-top', stageHeight);
	}
	function fixOfferBoxPosition2(target) 
	{
		var boxHeight = parseInt($j('#offer_box_contener').height() - 23);
		var stageHeight = parseInt($j('#all_elements_contener').height() / 2) - boxHeight;
		$j(target).css('margin-top', stageHeight);
	}
	if (!isIE) { 
		fixOfferBoxPosition('#offer_box_contener, #offer_box_contener_shadow');	
	} else {
		fixOfferBoxPosition('#offer_box_contener');	
		fixOfferBoxPosition2('#offer_box_contener_shadow');
	}
}

$j(window).resize(resizeContent);
$j(document).ready(resizeContent);
$j(document).ready(jQuaryAttachments);





