jQuery.noConflict();



/* Banner animation */

function CrackedToFixed()
{
	// Non-IE version
	if (jQuery.support.opacity)
	{
		// Cracked iPhone is hidden
		jQuery('#banner .iphone-cracked')
			.animate({ right: '+=20px' }, 1000);
		
		// Fixed iPhone is shown
		jQuery('#banner .iphone-fixed')
			.css({ 'opacity': 0, 'display': 'block' })
			.animate({ right: '+=20px', opacity: 1.0 }, 1000);
	}
	// IE version
	else
	{
		// Cracked iPhone is hidden
		jQuery('#banner .iphone-cracked')
			.hide()
			.animate({ right: '+=20px' }, 1000);
		
		// Fixed iPhone is shown
		jQuery('#banner .iphone-fixed')
			.show()
			.animate({ right: '+=20px' }, 1000);
	}
	
	setTimeout("FixedToCracked();", 3000);
}

function FixedToCracked()
{
	// Non-IE version
	if (jQuery.support.opacity)
	{
		// Cracked iPhone is shown
		jQuery('#banner .iphone-cracked')
			.animate({ right: '-=20px', opacity: 1.0 }, 400, 'easeOutElastic');
		
		// Fixed iPhone is hidden
		jQuery('#banner .iphone-fixed')
			.animate({ right: '-=20px', opacity: 0.0 }, 400, 'easeOutElastic');
	}
	// IE version
	else
	{
		// Cracked iPhone is shown
		jQuery('#banner .iphone-cracked')
			.animate({ right: '-=20px' }, 400, 'easeOutElastic', function()
			{
				jQuery(this).show();
			});
		
		// Fixed iPhone is hidden
		jQuery('#banner .iphone-fixed')
			.animate({ right: '-=20px' }, 400, 'easeOutElastic', function()
			{
				jQuery(this).hide();
			});
	}
	
	setTimeout("CrackedToFixed();", 3000);
}

jQuery(document).ready(function()
{
	setTimeout("CrackedToFixed();", 1500);
});
