// JavaScript Document
$(document).ready(function() {
	$('label.insideTextarea').labelInsideTextarea();
	$('.featuredCycle').cycle({ fit: 1 });

	if (swfobject.hasFlashPlayerVersion("7.0.0")) {
		$("#headerFlash").parent().height(335).width(960).css({ overflow: "hidden" });
		swfobject.embedSWF(
            "/_PROJECT/_Block/Frame/Flash/header.swf",
            "headerFlash",
            "960",
            "373",
            "7.0.0",
            "",
            {},
            {wmode: 'transparent'}
        );
	}
});

jQuery.fn.labelInsideTextarea = function() {
	return this.each(function() {
		var $field = $('#' + $(this).attr('for'));
		var $label = $(this);
		if ($field) {
			if ($field.val()) {
				$label.hide();
			}
			$field.focus(function() {
				$label.hide();
			}).blur(function() {
				if (!$(this).val()) $label.show();
			});
		}
	});
};
