$(document).ready(function() {
	$("#access span, #access a").hoverIntent(function(){
			$(this).animate({top: '-=10'}, 'slow', 'easeOutBounce');
		},
		  function () {
		    $(this).animate({top: '+=10'}, 'slow', 'swing');
		  }
	);
	
	$('form#loginform').submit(function() {
		
		var hasError = false;
			
		if(jQuery.trim($('#loginfieldidorig').val()) == '' || jQuery.trim($('#loginfieldidorig').val()) == 'Enter password') {
			alert(unescape("Bitte geben Sie ein Passwort ein%21"));
			hasError = true;
		}else{
			var loginID = document.getElementById('loginfieldidorig').value;
			window.open('http://troeber-casting.sharefolder.de/'+loginID+' ','_blank');
		}
		
		if(hasError) {
			return false;
		}
	});
	
    
});

function show_video(ref, video, lightbox, player){
	$(ref).click(function () {
		$(video).fadeIn('slow');
		//$(lightbox).fadeIn('slow');
		$(lightbox).css('filter','alpha(opacity=60)').fadeIn('slow');
		
		jQuery.each(jQuery.browser, function(i) {
			  if($.browser.msie){
				  document.getElementById(player).sendEvent('PLAY', 'true');
			   }
			});
	});
}

function close_video(video, lightbox, player){
		$(video).fadeOut('slow');
		$(lightbox).fadeOut('slow');
		
		jQuery.each(jQuery.browser, function(i) {
			  if($.browser.msie){
				  document.getElementById(player).sendEvent('PLAY', 'false');
			   }
			});
}
