/*

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

	--------------------------------------------------------------------
	
	Easy social bookmarks, Version: 2.0.0
	Download, support, contact: http://www.spyka.net 
	(c) Copyright 2008, 2009 spyka Web Group
	
*/


/* change settings here */ 
var settings = {
	'html_before'	: '<li>',           // HTML before each bookmark mark link
	'html_after'	: '</li>',			// HTML after each bookmarj link
	'imagepath'		: '/images/icons/' 		// Path to icon folder
}


/*	bookmarks: 
				syntax: 
				new Array(Bookmark Submit URL, Bookmark name, Icon image name),
				
				use {url} in bookmark URL to insert current url
				use {title} in bookmark URL to insert current page title
*/
var sites = [
			 
	new Array('http://del.icio.us/post?url={url}&title={title}',			'Del.icio.us',	'delicious.png'),
	new Array('http://reddit.com/submit?url={url}&title={title}',			'reddit',	  	'reddit.png'),
	new Array('http://furl.net/storeIt.jsp?t={title}&u={url}',				'Furl', 		'furl.png'),
	new Array('http://www.stumbleupon.com/submit?url={url}', 				'Stumble', 		'stumble.png'),
	new Array('http://digg.com/submit?phase=2&url={url}',					'Digg', 		'digg.png'),
	
]


//////////////////////////////////////////  
//			END EDITS HERE             
//////////////////////////////////////////   
function sw_bookmarks()
{
	for(i = 0; i < sites.length; i++)
	{
		var g = sites[i];
		var u = g[0];
		u = u.replace('{url}', escape(window.location.href));
		u = u.replace('{title}', escape(window.document.title));
		var img = (settings.imagepath == '0') ? '' : '<img src="'+settings.imagepath+g[2]+'" alt="'+g[1]+'" /> ';
		var k = '<a href="'+u+'">'+img+'</a>';
		window.document.write(settings.html_before+k+settings.html_after);				
	}
}
function swgbookmarks(){sw_bookmarks();}