// JavaScript Document
var flash = "newlaunch";

$(document).ready(function(){
						   
						   $('input.search').click(function(){ $(this).attr({ value: '' }); });

$('.rotate').cycle({
		fx: 'fade',
		speed:    300, 
        timeout:  8000,
		pager: '.nav .buttons',
		pause: 1
	});



$('.newsflash .close').click(function(){
			$('.newsflash').slideUp(150);
			$.cookie(flash, 'hide');
			return false;
		});

 if ($.cookie(flash) == 'hide') {  
$(".newsflash").hide();  
}
else{
$('.newsflash').animate({top: '0px'}, 2000).slideDown(150);
};

$(".wp-caption a img").click(function(){ 
          caption = $(this).attr("alt"); 
          $(".wp-caption a").attr("title",caption); 
        }
        
      );  


$("a.fancybox, .entry-content a[href$='.jpg'], a[href$='.png'], .entry-content a[href$='.PNG'], .entry-content a[href$='.JPG'], .entry-content a[href$='.gif'], .entry-content a[href$='.GIF']").fancybox({overlayOpacity:0.6});


});

function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = ""
     }
 }
 
 function doClear2(theText) {
     if (theText.value == "") {
         theText.value = theText.defaultValue
     }
 }
