// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$(document).ready(function(){
	$('.tabs li ').click(function(){
		var index = $(this).prevAll().length + 1;
		$(this).parent().parent().children().find('.active').removeClass('active');
		$(this).addClass('active');
		$(this).parent().parent().next('.tabs-holder').children('.active').slideDown('normal', function() {
			$(this).removeClass('active');
		});
		$(this).parent().parent().next('.tabs-holder').children('div:nth-child('+index+')').slideUp('normal', function() {
			$(this).addClass('active');
		});
		return false;
	});
});

$(document).ready(function() {

	$("a.iframe").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$("input").focus(function(){ $(this).attr({ value: '' }); });
  
});