$(function()
{   
    $('.a-feature').unbind('mouseenter').unbind('mouseleave');
    
    function check_default(obj, val) {
    	obj.focus(function() {
    		if(obj.val() == val) {
    			obj.val('');
    		}
    	});
    	obj.blur(function(){
    		if(obj.val() == '') {
    			obj.val(val);
    		}
    	})
    }
    
    check_default($('#homepage-register-form #firstname'),'first name');
    check_default($('#homepage-register-form #lastname'),'last name');
    check_default($('#homepage-register-form #email'),'email address');
    
    $('#homepage-register-form form').submit(function(){
    	$('input', $(this)).each(function(){
    		var self = $(this);
    		if(self.val() == 'first name' || self.val() == 'last name' || self.val() == 'email address') {
    			self.val('');
    		}
    	});
    	return true;
    })
    
    
    $('#maxi img.frame').click(function(){
    	var href = $('.video-item.clickable.active').find('a').attr('href');
    	window.location = href;
    });
    
    if (window.location.pathname === '/' || document.title.indexOf('Home') >= 0){
        //$('.a-feature').css({'margin-right':20, 'margin-top':30}).eq(3).css('margin-right', '0').addClass('last');
    }
});
