//<![CDATA[
$(document).ready(function() {

	/*function sendtoclipboard(s,el)	{
		if( window.clipboardData && clipboardData.setData )	{
			clipboardData.setData("text", s);
		} else {
			ffcopy(el);
		}
	}
	
	function ffcopy(inElement) {
	  if (inElement.createTextRange) {
		var range = inElement.createTextRange();
		if (range && BodyLoaded==1)
		  range.execCommand('Copy');
	  } else {
		var flashcopier = 'flashcopier';
		if(!document.getElementById(flashcopier)) {
		  var divholder = document.createElement('div');
		  divholder.id = flashcopier;
		  document.body.appendChild(divholder);
		}
		document.getElementById(flashcopier).innerHTML = '';
		var divinfo = '<embed src="/_includes/flash/clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
		document.getElementById(flashcopier).innerHTML = divinfo;
	  }
	}	*/
	
	$('#snappycopy').zclip({
		path:'/_includes/js/ZeroClipboard.swf',
		copy:function(){return $('#snappyurl').val()},
		beforeCopy:function(){
			$('#snappyurl').select();
		},
		afterCopy:function(){
			$('#snappyurl').select();
		}
	});
	// The link with ID "copy-dynamic" will copy the current value
	// of a dynamically changing input with the ID "dynamic"
	
	/*$('#snappycopy').click(function() {
		var el = $('#snappyurl');
		el.select();
/*		var t = $('#snappyurl').val();
		//sendtoclipboard(t,el);
		$.copy(t);*/
//	});
	
});
//]]>
