$(function() {

	// InnerFade Twitter
	$('#twitter_update_list').innerfade({ type: 'random',	speed: 1000, timeout: 9000, containerheight:85 }); 
	
	var searchstring = $('input#s').attr('value');
	$('input#s').each(function () {
		if ($(this).val() == '') {
			$(this).val(searchstring);
		}
	}).focus(function () {
		if ($(this).val() == searchstring) {
			$(this).val('');
		}
	}).blur(function () {
		if ($(this).val() == '') {
			$(this).val(searchstring);
		}
	});
	$('#user_login, #user_pass').focus(function () {
		if ($(this).val() == 'Username' || $(this).val() == 'Password') {
			$(this).val('');
		}
	});
	
	$("#loginbtn").toggle(
		function () {
			$("#custom_login").show("slow");
			$(this).html("Cancel login");
      	},
      	function () {
        	$("#custom_login").hide("slow");
			$(this).html("Login");
      	}
	);


// Fancybox
$("a[rel=lightbox]").fancybox({
	'titleShow' : false
});

	
/**
 * RollOver Images with Fade
 *
 *
 */
 

$('.op50 img').animate({ opacity: 0.5 }, 500);

$('.op50').hoverIntent(
     function() {
       
         $(this).find('img').animate({ opacity: 1.5}, 400);
       
     },
     function() {
         $(this).find('img').animate({ opacity: 0.5 }, 600);  
     }
   );
    	
});