function paypal(){
	var d = {
	    email:false,
		message:"Thanks for Your Donation",
	    title:"Donation Box",
	    amount:[1.00,2.00,3.00,4.00,5.00,6.00,7.00,8.00,9.00,10.00],
		currency:[["EUR","Euro"],["USD","US Dollar"]],
		currencies:[
           ["AUD","Australian Dollar"],["GBP","British Pound"],
		   ["CAD","Canadian Dollars"],["CZK","Czech Koruna"],
		   ["DKK","Danish Kroner"],["EUR","Euro"],
		   ["HKD","Hong Kong Dollars"],["HUF","Hungarian Forint"],
		   ["JPY","Japanese YEN"],["NZD","New Zealand Dollars"],
		   ["NOK","Norwegian Kroner"],["PLN","Polisg Zlotych"],
		   ["SGD","Singapore Dollars"],["SEK","Swedish Kronor"],
		   ["CHF","Swiss Francs"],["USD","US Dollar"]
		]
	};
	function form(){
	    var html = "<form action='https://www.paypal.com/row/cgi-bin/webscr' name='_xclick' method='post' style='margin:0px;padding:0px;'>";
		html+="<input value='"+d.message+"' name='item_name' type='hidden' />";
		html+="<input value='"+d.email+"' name='business' type='hidden' />";
		html+="<input value='_xclick' name='cmd' type='hidden' />";
		html+="<table width='130' style='font-family:verdana;border:1px solid black;background:#f9fdff;' cellspacing='0' cellpadding='4'>";
		html+="<tr><td align='center' style='font-size:13px;color:navy;font-weight:bold;background:#e1f5ff;'>"+d.title+"</td></tr>";
		html+="<tr><td align='left' style='font-size:12px;color:crimson;font-weight:bold;padding-top:10px;'>Amount</td></tr>";
		html+="<tr><td align='left'><select name='amount' style='font-family:monospace;font-size:12px;'>";
		for(var i=0;i<d.amount.length;i++){
		    var amount = d.amount[i].toString();
			if(amount.indexOf(".")==-1){amount+=".00";}
			    else if(amount.substr( amount.indexOf(".") ).length<3){amount+="0";}
			if(amount.length==4){amount="&nbsp;&nbsp;&nbsp;"+amount;}
			    else if(amount.length==5){amount="&nbsp;&nbsp;"+amount;}
			        else if(amount.length==6){amount="&nbsp;"+amount;}
		    html+="<option value='"+d.amount[i].toString()+"' style='color:blue;'>"+amount+"</option>"; 
		}
		html+="</select></td></tr>";
		html+="<tr><td align='left' style='font-size:12px;color:crimson;font-weight:bold;padding-top:10px;'>Currency</td></tr>";
		html+="<tr><td align='left' style='font-size:12px;'><select name='currency_code' style='font-family:arial;font-size:12px;width:120px;'>";
		for(var k=0;k<d.currency.length;k++){
		    var currency_code = d.currency[k][0];
			var currency_name = d.currency[k][1];
		    html+="<option value='"+currency_code+"' style='color:blue;'>"+currency_name+"</option>"; 
		}
		html+="</select></td></tr>";
		html+="<tr><td align='center' style='padding:10px;'><img alt='' border='0' src='https://www.paypal.com/en_US/i/scr/pixel.gif' width='1' height='1'><input type='image' src='https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif' border='0' name='submit' alt='Donate'></td></tr>";
		html+="<tr><td align='right' style='padding:1px;font-size:8px;color:navy;background:#e1f5ff;'><a href='http://remiya.com/cms/projects/jquery-plugins/paypal/' target='_blank' style='color:navy;text-decoration:none;' onmouseover='this.style.color=\"red\"' onmouseout='this.style.color=\"navy\"'>GET THIS WIDGET</a></td></tr>";
		html+="</table>";
		html+="";
        html+="";
		html+="</form>";
		return html;
	}
	this.currencies = function(currency){
	    d.currency=[];var currencies = currency.split(",");
		for(var i=0;i<currencies.length;i++){
		    for(var j=0;j<d.currencies.length;j++){
			   if(d.currencies[j][0]==currencies[i]){d.currency[d.currency.length]=d.currencies[j];}
			}
		}
	    return this;
	};
	this.message= function(message){d.message=message;return this;};
	this.amounts= function(amounts){d.amount=amounts;return this;};
	this.title = function(title){d.title=title;return this;};
	this.email = function(email){d.email=email;return this;};
    this.load = function(id){
	    if(d.email===false){alert("Donation Widget Error:\nPlease, specify your PayPal email!");return false;}
	    $(document).ready(function(){$("#"+id).html(form());});
	};
	this.html = function(){if(d.email===false){alert("Donation Widget Error:\nPlease, specify your PayPal email!");return false;}return form();};
	return this;
}