//var $j = jQuery.noConflict();
//function vote(form, id) {
//	
//	$('voteButton-' + id).disabled = true;
//	$('sendText-' + id).toggle();
//	
//	$(form).request({
//
//		onComplete: function(callback) {
//
//			$j('#updateMe-' + id).html(callback.responseText);
//			$j('#updateMe-' + id).ready(function() {
//				console.log("3");
//				console.log('---');
//				console.log(callback);
//				console.log('---');
//				// ### Run script-tag in callback
//				$j('#updateMe-' + id + ' script').each(function(i, obj) {
//					eval($j(obj).text());
//				});
//				
//								
//				// ### Eval showFeed-var in script-tag in callback
//				console.log("DDDD");
//				
//				if (fbConnected) {
//					
//////					 ### Eval show pictures-var in script-tag in callback
////					var images = eval('FB_votePictures_V_' + id);
////					var title 	= cms_header + " " + $('pTitle_' + id).innerHTML;
////					var url		= "http://" + host_url + $('pURL_' + id).innerHTML;
////					var vote 	= $('pAnswer_' + id).innerHTML;
////					var comment = cms_before_comment + ' "' + $('pTitle_' + id).innerHTML + '" ' + cms_voted_for + " " + vote;
//					
//					// ### Publish on Facebook
//					FB.ui({
//						method: 'feed',
//						name: '<cms:write path="facebook/vote/header" edit="false"/>',
//						link: '<s:property value="#session.site.host"/>',
//						caption: '<cms:write path="facebook/vote/beforeComment" edit="false"/>',
//						message:  '<cms:write path="facebook/vote/userMessagePrompt" edit="false"/>',
//						display	: 'iframe'
//					//add images?
//					},function(response) {
//						console.log(response);
//						if (response && response.post_id) {
//							alert('Post was published.');
//						} else {
//							alert('Post was not published.');
//						}
//					}
//					
//					);
//				}
//			});
//
//		}
//	});
//}
