/**
 * copy plugin
 *
 * Copyright (c) 2007 Yang Shuai (http://yangshuai.googlepages.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.copy=function(t)
{
	if(typeof t=='undefined')
	{
		t='';
	}
	d=document;
	if (window.clipboardData)
	{
		window.clipboardData.setData('Text',t);
	}
	else
	{
		var f='flashcopier';
		if(!d.getElementById(f))
		{
			var dd=d.createElement('div');
			dd.id=f;
			d.body.appendChild(dd);
		}
		d.getElementById(f).innerHTML='';
		var i='<embed src="/js/copy.swf" FlashVars="clipboard='+encodeURIComponent(t)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
		d.getElementById(f).innerHTML=i;
	}
}

jQuery(document).ready(function() {
    var the_text = jQuery('#copy_text').attr('value');
    jQuery('#copy_button').click(function() {
        jQuery.copy(the_text);
        alert('The text has been copied to your clipboard. (Now you can paste it into an email.)');
    });
});





