(function() {
    jQuery(document).ready(function() {
        prepareOnLoad();
        jQuery('#tabs').tabs("select", 0);


        jQuery("select.select_tappa:first").css('visibility', 'hidden');

				jQuery("#hidden_tab_id").map(function() {
					return jQuery(this).val()!="" ? this : null;
				}).each(function() {
					var val=jQuery(this).val().toString().replace('2','1').replace('3','2');
					val=new Number(val);
					jQuery('#tabs').tabs("select",val);
				});


        jQuery("img.foto:first").each(function() {

            var self = this;
            var type = (function() {
                return "atleti/neutro.jpg"
            })();

            jQuery(self).each(function() {

                var img = new Image()
                var self = this;
                img.onload = function() {
                    self.src = this.src;
                }
                var src = this.src;
                this.src = "lib/images/" + type;
                img.src = src;

            });
        });


    });
})()
