/* TAB SWITCHER -------------------------------*/

function navHover(elem) {
	
	if ($(elem).parent().parent().hasClass('active')) {
		$(elem).parent().parent().removeClass('active');
	}
	
	else
		$(elem).parent().parent().addClass('active'); 
}

/* TAB SWITCHER -------------------------------*/

function elemToggle(tab, elem) {
	
	$(tab).parent().parent().children().removeClass('active');
	$(elem).parent().children().removeClass('active');

	$(tab).parent().addClass('active');
	$(elem).addClass('active');
}

/* HERO -------------------------------*/

function heroSliderLeft() {
		
	if ($('#hero_3').hasClass('active')) {
	
		$('#hero_3').removeClass('active');
		$('#hero_3').hide('slide', { direction: 'right' }, 500);
		
		$('#hero_2').show('slide', { direction: 'left' }, 500, function() {
			$('#hero_2').addClass('active');
		});
	}
	
	if ($('#hero_2').hasClass('active')) {
		
		$('#hero_2').removeClass('active');	
		$('#hero_2').hide('slide', { direction: 'right' }, 500);
		
		$('#hero_1').show('slide', { direction: 'left' }, 500, function() {
			$('#hero_1').addClass('active');
		});		
	}
}

function heroSliderRight() {
		
	if ($('#hero_1').hasClass('active')) {
	
		$('#hero_1').removeClass('active');
		$('#hero_1').hide('slide', { direction: 'left' }, 500);
		
		$('#hero_2').show('slide', { direction: 'right' }, 500, function() {
			$('#hero_2').addClass('active');
		});
		
		/*
		sIFR.replace(meta_normal, {
		  selector: '.hero_content p',
		  css: '.sIFR-root { color: #c8c8c8; }',
		  wmode: 'transparent'
		  });
		*/
		  
		sIFR.replace(meta_normal, {
		  selector: '.hero_content h1',
		  css: '.sIFR-root { color: #ffffff; text-align: left; text-decoration: none; }',
		  wmode: 'transparent',
		  filters: {
		        DropShadow: {
		           distance: 0
		          ,color: '#000000'
		          ,strength: 2
		          ,alpha: .5
		        }
		      }
		  });
	}
	
	if ($('#hero_2').hasClass('active')) {
		
		$('#hero_2').removeClass('active');
		$('#hero_2').hide('slide', { direction: 'left' }, 500);
		
		$('#hero_3').show('slide', { direction: 'right' }, 500, function() {
			$('#hero_3').addClass('active');
		});
		
		/*
		sIFR.replace(meta_normal, {
		  selector: '.hero_content p',
		  css: '.sIFR-root { color: #c8c8c8; }',
		  wmode: 'transparent'
		  });
		*/
		  
		sIFR.replace(meta_normal, {
		  selector: '.hero_content h1',
		  css: '.sIFR-root { color: #ffffff; text-align: left; text-decoration: none; }',
		  wmode: 'transparent',
		  filters: {
		        DropShadow: {
		           distance: 0
		          ,color: '#000000'
		          ,strength: 2
		          ,alpha: .5
		        }
		      }
		  });
		
	}
	
}