// JavaScript Document

jQuery(document).ready(function(){
				
				
	if ($.browser.msie && $.browser.version.substr(0,1)<7) { 
	
		document.execCommand('BackgroundImageCache', false, true);
		
	};


	if ( $('#viewport').length > 0 ) {
		
		$('#viewport').carousel('.simplePrevious', '.simpleNext');
		
	}
	
	if ( $('#viewport').length > 0 ) {
		
		$('#viewport2').carousel('.simplePrevious2', '.simpleNext2');  
		
	}


	if ( $('#container-1').length > 0 ) {
		
		$('#container-1').tabs();
		
	}
	
	if ( $('#container-2').length > 0 ) {
		
		$('#container-2').tabs();
		
	}
	
	
	$('#preview1').slideUp('slow');
	
	
	$('.Hover').hover(
					  
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
		
	);
	
	
	$('#Signup').click(function () {
								 
		$('#preview1').slideDown('slow');					 
								 
	});
					   
	$('#CloseSignup').click(function () {
								 
		$('#preview1').slideUp('slow');		 
								 
	});

	$('.ImageHold').hover(
				
		function(){ 
			//console.log('over');
			$(this).find('.ImageTop').animate({ paddingTop: '0px'}, 500 );
		},
		function(){ 
			//console.log('out');
			$(this).find('.ImageTop').animate({ paddingTop: '106px'}, 500);
		}
						 
	);
	
	
	/*$('a[href^="http://"]').each( function(){
			if(this.href.indexOf(location.hostname) == -1) { 
				$(this).attr('target', '_blank');
			}
	});*/

$("#container-2 a.NavLink.Two").click (function(){ $('#container-2').addClass('tabover'); }	);
		
	$("#container-2 a.NavLink.One").click (function(){ $('#container-2').removeClass('tabover'); }	);
	
});