


$(document).ready(function()
{

	$('.nav a').hoverIntent(function(event) {
	
		$(this).animate({backgroundPosition: '0px 0px'}, 100);
		$(this).css({color:'#fff'});
	}
	, function(){
	
		$(this).animate({backgroundPosition: '-95px 0px'}, 100);
		$(this).css({color:'#333'});
	});
	
	resizeMyWidthThingy();

	
	$('.gallery_container').cycle({
		fx: 'scrollHorz',
		speed: 500,
		timeout: 0,
		prev: '.prev',
		next: '.next',
		pager:'.gallery_pager',
		cleartype:true,
		cleartypeNoBg:true
	});
		
	$('.service').hoverIntent(function(event) {
	
		$(this).find('.service_info').show(200);
	}
	, function(){
	
		$(this).find('.service_info').hide(200);
	});
	
	$('.slider_container').jCarouselLite({
		auto: 600,
   		speed: 7000,
   		cicular: true
	});
	
	
	$('.description_container').cycle({
		fx: 'fade',
		speed: 7000,
		timeout: 600,
		cleartype:true,
	  cleartypeNoBg:true
	});	
	
	
	//EXTERNAL LINK
	$('a[rel="external"]').live('click', function() {
		window.open( $(this).attr('href') );
        return false;
	});
	
	
	// Spin logo
	$('.spinlogo a').hover(function()
	{
		$(this).parent('.spinlogo').find('span').slideToggle('slow');
	},function()
	{
		$(this).parent('.spinlogo').find('span').slideToggle();
	});

});
$(window).resize(function() 
{
 resizeMyWidthThingy();
});


function resizeMyWidthThingy()
{
	var totalWidth = $(window).width();	
	$('.slider').css('width', totalWidth + 'px');
	$('.sledge').css('width', totalWidth + 'px');
	$('to_index').css('width', totalWidth + 'px');
	$('.slider_internal').css('width', totalWidth + 'px');
}
