// JavaScript Document

/*
	function shortenURL(channel){
			var argumentsURL = propCode+"_"+channel+"_"+eventTitle;
			if (document.location.href.indexOf("?") == -1){
				//alert("no question");
				var combinedURL = document.location.href+"?social="+argumentsURL;
			}
			else{
				//alert("has question");
				var combinedURL = document.location.href+"&social="+argumentsURL;
			}
			BitlyCB.myShortenCallback = function(data) {
				// this is how to get a result of shortening a single url
				var result;
				for (var r in data.results) {
					result = data.results[r];
					result['longUrl'] = r;
					break;
				}
//				if(channel=="twitter"){
				
				$('#EventModule-TwitterShareDiv').html('<a href="http://twitter.com/share" class="twitter-share-button" data-url="'+result['shortUrl']+'" data-counturl="'+document.location.href+'">Tweet</a>');
//				}
			}
			BitlyClient.call('shorten', {
			'longUrl': combinedURL,
			'history': '1'
			}, 'BitlyCB.myShortenCallback');
		}
*/

function shortenURL(channel){
					$('#EventModule-TwitterShareDiv').html('<a href="http://twitter.com/share" class="twitter-share-button" via="#" data-url="'+document.location.href+'" data-counturl="'+document.location.href+'">Tweet</a>');

		}
function trimString(s) {
	s = s.replace(/(^\s*)|(\s*$)/gi,"");
	s = s.replace(/[ ]{2,}/gi," ");
	s = s.replace(/\n /,"\n");
	return s;
}
