$(document).ready(function(){

/* 	alert('jquery good to go'); */

	//external attribute on anchor tags
	//$('#wide_top a').attr({target: "_blank" });


	//HOME PAGE
	//tabs
	$("ul.tabs").tabs("div.panes > div"); 
	
	//last tweet
	$("#twitter_update_list li:last").addClass('last'); 
	
	
	//tooltips
	$(".dead_link").tooltip({
		tip: '#coming_soon',
		offset: [80, 0],
		effect: 'slide'
		
	});	
	
	//killing the dead links
	$('.dead_link').click(function() {
		  return false;
	});
	
	
	//FANCY BOXES
	$(".iframe").fancybox({
		'width' : '85%',
		'height' : '85%',
		'autoScale' : true,
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'type' : 'iframe'
	});
	
	//FANCY intro
	$(".fancy_intro").fancybox({
		'width' : '650',
		'height' : '542',
		'autoScale' : false,
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'overlayOpacity' : '1',
		'type' : 'iframe'
	}); 
	
	
		$(".fancyvideo").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: this.title,
				'width'			: 640,
				'height'		: 360,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
				   	 'wmode'		: 'transparent',
					'allowfullscreen'	: 'true'
				}
			});
	
		return false;
	});
	
	
	$(".fancy_trailer").fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'width'			: 720,
				'height'		: 405,
				'type'			: 'swf',
				'swf'			: { 'allowfullscreen'	: 'true', 'wmode' : 'transparent' }
			});
	
	
	$('.cell_bg input').click(function() {
		  this.select();
	});
	
	
	
});

