var x,y;

function moveFly() {
	if (x != null && y != null) { 
		var position = jQuery("#fly").offset();		 
		if((position.left-x) > 0) {
			jQuery('#fly').animate({marginLeft: "-=15px"}, 1);
		} else if ((position.left-x) < -15) {
			jQuery('#fly').animate({marginLeft: "+=15px"}, 1);
		}
		if((position.top-y) > 0) {
			jQuery('#fly').animate({marginTop: "-=15px"}, 1);
		} else if ((position.top-y) < -15) {
			jQuery('#fly').animate({marginTop: "+=15px"}, 1);
		}
	}
	var t=setTimeout("moveFly()",70);
}
 
jQuery(document).ready(function(){
	moveFly();
	jQuery(document).mousemove(function(e){
		x = e.pageX;
		y = e.pageY;
	});

   jQuery('.my-tec-button-off').button(); 
   jQuery('.my-tec-button-on').button(); 
   jQuery('.my-tec-next-month').button(); 
   jQuery('.my-tec-prev-month').button(); 
   jQuery('.my-ical').button(); 
   jQuery('.my-back').button(); 
   jQuery('.button').button(); 
   jQuery('.wpcf7-submit').button();
   
   

//  jQuery('#feature').addGlow({ textColor: '#0f0', haloColor: '#0f0', radius: 100 });

/*	Brofest stuff... 

	jQuery('#glowlay').show();
   
  	jQuery('#glowlay').mousemove(function() {
   		jQuery(this).delay(300).fadeOut(1000);
  	});
*/


	jQuery('.widget-title').each(function () {
		var title = jQuery(this).html();
		jQuery(this).parent().prepend('<div class="text-background">'+title+'</div>');

	}
	);

   
});
