$(document).ready(function()
{
	$(".next")
	.live(
		'click', function() { $('.photos').hide(); $('#'+$(this).find('b').attr('class')).show(); }
	);
	
	$('.photos span')
	.mouseover(function(){ $(this).addClass('hover'); })
	.mouseout(function(){ $(this).removeClass('hover'); });
	
	$("#focusme input").focus();
	$('#focusme').addClass('focused');
	$('input').live('focusin', function(){ $("label").removeClass('focused'); $(this).parent().addClass('focused'); }).live('focusout', function(){ $(this).parent().removeClass('focused'); });
	$('textarea').live('focusin', function(){ $("label").removeClass('focused'); $(this).parent().addClass('focused'); }).live('focusout', function(){ $(this).parent().removeClass('focused'); });
	$('select').live('focusin', function(){ $("label").removeClass('focused'); $(this).parent().addClass('focused'); }).live('focusout', function(){ $(this).parent().removeClass('focused'); });
	
	$('.photos img[tooltip]').each(function()
	   {
		  $(this).qtip({
			content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
			position: 'topRight', // Set its position
			hide: {
				fixed: true // Make it fixed so it can be hovered over
			},
			style: {
				padding: '2px 5px', // Give it some extra padding
				name: 'green' // And style it with the preset dark theme
			}
		  });
	   });
});
