var addthis_pub = 'gedotcom';
var addthis_brand = 'GE';
var addthis_options = 'favorites, digg, myspace, google, twitter, delicious, facebook, live';
var validation = new GE_innovation_taf_validation();
GE_Main.addInitFn( function () {
	var els = $('ge_content').select('.collapsable');
	els.each(function(el,i){
		el.addClassName('closed');
		var toggle = new Element('a',{href:'#',title:'expand this section'}).addClassName('toggler');
		el.insert( toggle );
		toggle.observe('click',function(e){e.stop();this.hasClassName('closed')?this.removeClassName('closed'):this.addClassName('closed');}.bind(el));
	});
	var share = $('ge_content').down('.share_story');
	if (share) {
		var addthis_el = new Element('a',{id:'addthis_widget',href:'http://www.addthis.com/bookmark.php?v=20',title:'Bookmark and Share'}).insert( new Element('img',{src:'http://s7.addthis.com/static/btn/lg-share-en.gif',width:'125',height:'16',alt:'Share'}) );
		var form = share.down('form');
		if (form) {
			validation.init(form);
			form
				.setStyle({display:'block'})
				.insert({before:addthis_el})
				.observe('submit',function(e){
					e.stop();
					validation.clearErr();
					if (!validation.validate(e)) return;
					if ($('statusmsg')) $('statusmsg').remove();
					
					form.submit(); // <-- REPLACING AJAX
				
				});
		} else {
			share.insert(addthis_el);
		}
		addthis_el
			.observe('mouseover',function(e){ addthis_open(this, '', '[URL]', '[TITLE]'); if (/MSIE/i.test(navigator.userAgent)) { $('at15s').setStyle({left:'584px'}); } })
			.observe('focus',function(e){ addthis_open(this, '', '[URL]', '[TITLE]'); if (/MSIE/i.test(navigator.userAgent)) { $('at15s').setStyle({left:'584px'}); } })
			.observe('mouseout',function(e){addthis_close();})
			.observe('blur',function(e){addthis_close();})
			.observe('click',function(e){e.stop();addthis_sendto();});
	}
} );
