function findPosTop(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent)
	{
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent)
		{
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return curtop;
}
function set_size()
{
	height = get_height();
	document.getElementById('footer').style.top = (height-205)+'px';
	if(height <= 500)
	{
		document.getElementById('home_text').style.position = 'static';
		document.getElementById('home_text').style.marginTop = '10px';
		document.getElementById('home_text').style.marginBottom = '10px';
		document.getElementById('footer').style.position = 'static';
			}
	else 
	{
		document.getElementById('home_text').style.position = 'absolute';
		document.getElementById('home_text').style.marginTop = '-56px';
		document.getElementById('home_text').style.marginBottom = '0px';
		document.getElementById('footer').style.position = 'absolute';
	}
}

function get_height()
{
	var myWidth;
	var myHeight;
	
	if( typeof( window.innerWidth ) == 'number' ) { 
	
	//Non-IE 
	
	myWidth = window.innerWidth;
	myHeight = window.innerHeight; 
	
	} else if( document.documentElement && 
	
	( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
	
	//IE 6+ in 'standards compliant mode' 
	
	myWidth = document.documentElement.clientWidth; 
	myHeight = document.documentElement.clientHeight; 
	
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 
	
	//IE 4 compatible 
	
	myWidth = document.body.clientWidth; 
	myHeight = document.body.clientHeight; 
	
	} 
	return myHeight;
}



/* clients functions */
function clientsShowImage()
{
	var image = $(this);
	if (image.find('.project').size() == 0) return;
	
	$(this).find('img.logo').fadeOut(200, function ()
	{
		image.find('img.project').fadeIn(1000);
	});	
}

function clientsHideImage()
{
	var image = $(this);
	if (image.find('.project').size() == 0) return;
	
	$(this).find('img.project').fadeOut(200, function ()
	{
		image.find('img.logo').fadeIn(1000);
	});
}




$(window).load(function(){
		
	/* clients */
	$('div#clients div.box-holder').delay(0).each(function(i) {
		$(this).delay(i*0).fadeIn(0);
	});
	
	$('div#clients div.image').hoverIntent(clientsShowImage, clientsHideImage);
		
	
});


$(window).load(function(){

$('#slideshow_left').mouseover(
	
       function(){ $('#arrow_left').addClass('arrow_l_over') }
       
)
$('#slideshow_left').mouseout(
	
       function(){ $('#arrow_left').removeClass('arrow_l_over') }
       
)
$('#slideshow_right').mouseover(
	
       function(){ $('#arrow_right').addClass('arrow_r_over') }
       
)
$('#slideshow_right').mouseout(
	
       function(){ $('#arrow_right').removeClass('arrow_r_over') }
       
)
});




