$(document).ready(function() {
	$("#header .newsletter .text").each(function() {
		searchText = $(this).val();

		$(this).focus(function() {
			if($(this).val()==searchText) {
				$(this).val('');
			}
		});

		$(this).blur(function() {
			if(empty($(this).val())) {
				$(this).val(searchText);
			}
		});
	});
  
  $("a.fancybox").fancybox({
		'zoomOpacity'			: true,
		'overlayShow'			: false,
		'zoomSpeedIn'			: 500,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'hideOnContentClick'	: false
	});
});

function empty(str) {
	if (str === "" || str === 0 || str === "0" || str === null || str === false || typeof str === 'undefined') {
		return true;
	}
	if (typeof str == 'object') {
		var key;
		for (key in str) {
			return false;
		}
		return true;
	}
	return false;
}