(function(a){a.fn.example=function(e,g){var d=a.isFunction(e),f=a.extend({},g,{example:e});return this.each(function(){var c=a(this),b=a.metadata?a.extend({},a.fn.example.defaults,c.metadata(),f):a.extend({},a.fn.example.defaults,f);if(!a.fn.example.boundClassNames[b.className]){a(window).unload(function(){a("."+b.className).val("")});a("form").submit(function(){a(this).find("."+b.className).val("")});a.fn.example.boundClassNames[b.className]=true}if(!c.attr("defaultValue")&&(d||c.val()==b.example))c.val("");
if(c.val()==""&&this!=document.activeElement){c.addClass(b.className);c.val(d?b.example.call(this):b.example)}c.focus(function(){if(a(this).is("."+b.className)){a(this).val("");a(this).removeClass(b.className)}});c.change(function(){a(this).is("."+b.className)&&a(this).removeClass(b.className)});c.blur(function(){if(a(this).val()==""){a(this).addClass(b.className);a(this).val(d?b.example.call(this):b.example)}})})};a.fn.example.defaults={className:"example"};a.fn.example.boundClassNames=[]})(jQuery);


$(document).ready(function() {
    $(".hover")
		.each(function(i) {
			var src = $(this).attr("src").replace("btn_", "hbtn_");
			$('<img/>')[0].src = src;
		})
        .mouseover(function() {
			var src = $(this).attr("src").replace("btn_", "hbtn_");
            $(this).attr("src", src);
        })
        .mouseout(function() {
            var src = $(this).attr("src").replace("hbtn_", "btn_");
            $(this).attr("src", src);
        });
		$(".hova").fadeTo("slow", 0.8); 
		$(".hova").hover(function(){ // This should set the opacity to 100% on hover, but it doesn't work :(
			$(this).fadeTo("fast", 1.0);
		},function(){
			$(this).fadeTo("fast", 0.8); // This sets the opacity back to 60% on mouseout
		});
		$(".network").fadeTo("slow", 0.7); 
		$(".network").hover(function(){ // This should set the opacity to 100% on hover, but it doesn't work :(
			$(this).fadeTo("fast", 1.0);
			$(this).css("background-color","#6f6f6f");
		},function(){
			$(this).fadeTo("fast", 0.7); // This sets the opacity back to 60% on mouseout
			$(this).css("background-color","#ff6600");
		});
		$('.ajuda_form').example(function() {
 			return $(this).attr('title'); 
		});
		$('.input').example(function() {
 			return $(this).attr('title'); 
		});
});
