$(document).ready(
	function() {		
		// if we have some banners
		if ($('#sgh_banner_cont').length === 1) {
			// check to see if we have more than one image to cycle through
			if ($('#sgh_banner_cont').children('li').length > 1) {
				// so we have more than one image to cycle through, so do the innerfade
				
				$('#sgh_banner_cont').innerfade({ 
					speed: 8000, 
					timeout: 4000, 
					runningclass: 'banner_innerfade' 
				}); 
			}
			
			
			// check to see if we've got an banner text 
			if ($('.banner_text').length > 0) {
				$('.banner_text').each(
					function() {
						$(this).hover(
							function() {
								if ($(this).hasClass('banner_text_expand') === false) {
									$(this).animate({
										marginTop : '-20px',
										height : '90px'
									}, 200, 'linear', function() {
										$(this).parent().children('.banner_text_expand').trigger('mouseleave');//removeClass('banner_text_expand');
										$(this).addClass('banner_text_expand');
									});
								}
							},
							
							function() {
								$(this).animate({
									marginTop : '1px',
									height: '70px'
								}, 200, 'linear', function() {
									$(this).removeClass('banner_text_expand');
								});
							}
						)
					}
				);
				
			}
		}
	}
);


function toogle_login() {
	var iLeft = $('#banner_img_cont').css('left').replace('px', '');
	
	iLeft = iLeft == 0 ? -213 : 0;
	
	if(iLeft != 0){
		$('#banner_mixed_cont').show();
	}
	
	$('#banner_img_cont').animate({left:iLeft}, 1000, '', function(){
		if(iLeft == 0){
			$('#banner_mixed_cont').hide();
		}
	});
}
