$(function() {
	
	//alert($.client.os);
	$('html').addClass($.client.os);
	
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});
	
	
	$('input[type=text], input[type=password]').each(function() {
		$(this).addClass('dim');
		var default_value = this.value;
		$(this).focus(function(){
			if(this.value == default_value) {
				this.value = '';
			}
			$(this).removeClass('dim');
		});
		$(this).blur(function(){
			if(this.value == '') {
			   this.value = default_value;
			   $(this).addClass('dim');
			}
		});
	});
	
	$("#recordings .main .left h2 a").click(function(){
		var e = $(this).attr('title');
		//alert(e);		
		if ($("#streampadPlayerClickToPlay").length > 0){
			$("#streampadPlayerClickToPlay").trigger('click',function(){
				SPAPI.skip(e-1);
				SPAPI.play();
			});
		} else {
			SPAPI.skip(e-1);
		}
		return false;
	});
	
});

$(document).ready(function(){
	
	// $('section:nth-child(3)').addClass('ie-last');
	
	$('nav.top ul').superfish({
		delay: 400,
		animation: {height:'show'},
		speed: 200,   
		autoArrows: false,
		dropShadows: false,
		disableHI: true    
	});
	
});
