(function (a)
{
    a.fn.smartSocialShare = function (b)
    {
        function i(a)
        {
            var b = "";
            return b
        }
        function g(a, b, c)
        {
            var d = '<li class= "smws_' + a + '">\n';
            d = d + '<a name="hplshr' + a + '" href= "' + b + '" alr = "' + c + '" Target="_blank"\n';
            if (a == "facebook")
            {
                d = d + " onclick=\"window.open(this.href,'sharer','toolbar=0,status=0,width=626,height=436'); return false;\""
            }
            d = d + 'class="external" rel="nofollow"  > </a>\n';
            d = d + "</li>\n";
            return d
        }
        var c = {
            url: encodeURIComponent(location.href),
            title: encodeURIComponent(document.title),
            icon_bookmark: ["facebook", "dig", "delicious", "gmail", "googlebuzz", "linkedin", "mail", "reddit", "stumbleupon", "twitter", "newsvine", "tumblr", "netvibes", "myspace", "googlebookmarks", "blog", "bebo", "friendfeed", "yahoomail", "designbump", "designfloat", "evernote", "mixx", "orkut", "posterous", "slashdot", "squidoo", "technorati", "virb"],
            animation_duration: 400,
            toolTip: true,
            toolTipFadeIn: 500,
            toolTipFadeOut: 500,
            toolTipPosition: "top",
            toolmaxWidth: "auto",
            developer_link: true
        };
        var d = jQuery.extend(c, b);
        var e = "";
        e += '<div class="smws-social-bookmarks smws-social-bookmarks-expand"> ';
        e += '<ul class="socials">';
        var f = new Object;
        f = {
            facebook: ["http://www.facebook.com/share.php?v=4&src=bm&u={url}&t={title}", "Share this on Facebook"],
            digg: ["http://digg.com/submit?phase=2&url={url}&title={title}&bodytext={body}", "Digg this!"],
            delicious: ["http://delicious.com/post?url={url}&title={title}", "Share this on del.icio.us"],
            gmail: ["https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su={title}&body=Link:%20{url}%20(sent%20via%20http://www.smartdatasoft.com)", "Email this via Gmail"],
            googlebuzz: ["http://www.google.com/buzz/post?url={url}&title={title}", "Post on Google Buzz"],
            linkedin: ["http://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary=(send via : www.smartdatasoft.com)", "Share this on LinkedIn"],
            mail: ["mailto:?subject={title}&body={body}&Link={url}(send via : www.smartdatasoft.com)", "Email this to a friend?"],
            reddit: ["http://reddit.com/submit?url={url}&title={title}", "Share this on Reddit"],
            stumbleupon: ["http://www.stumbleupon.com/submit?url={url}&title={title}", "Stumble upon something good? Share it on StumbleUpon"],
            twitter: ["http://twitter.com/home?status={title}+-+{url}source=smartwebsource", "Tweet This!"],
            newsvine: ["http://www.newsvine.com/_tools/seed&save?u={url}&h={title}", "Seed this on Newsvine"],
            tumblr: ["http://www.tumblr.com/share?v=3&u={url}&t={title}", "Share this on Tumblr"],
            netvibes: ["http://www.netvibes.com/share?title={title}&url={url}", "Submit this to Netvibes"],
            myspace: ["http://www.myspace.com/Modules/PostTo/Pages/?u={url}&t={title}", "Post this to MySpace"],
            googlebookmarks: ["http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}", "Add this to Google Bookmarks"],
            blog: ["http://www.blogger.com/blog_this.pyra?t&u={url}&n={title}", "Blog this on Blogger"],
            bebo: ["http://www.bebo.com/c/share?Url={url}&Title={title}", "Share this on Bebo"],
            friendfeed: ["http://www.friendfeed.com/share?title={title}&link={url}", "Share this on FriendFeed"],
            yahoomail: ["http://compose.mail.yahoo.com/?Subject={title}&body={body}:link={url}", "Email this via Yahoo! Mail"],
            designbump: ["http://designbump.com/submit?url={url}&title={title}", "Bump this on DesignBump"],
            designfloat: ["http://www.designfloat.com/submit.php?url={url}&link={title}", "Submit this to DesignFloat"],
            evernote: ["http://www.evernote.com/clip.action?url={url}&title={title}", "Clip this to Evernote"],
            mixx: ["http://www.mixx.com/submit?page_url={url&title={title}", "Share this on Mixx"],
            orkut: ["http://promote.orkut.com/preview?nt=orkut.com&amp&tt={url};du={title}", "Promote this on Orkut"],
            posterous: ["http://posterous.com/share?linkto={url}&title={title}", "Post this to Posterous"],
            slashdot: ["http://slashdot.org/bookmark.pl?url={url}&title={title}", "Submit this to SlashDot"],
            squidoo: ["http://www.squidoo.com/lensmaster/bookmark?={url}&title={title}", "Add to a lense on Squidoo"],
            technorati: ["http://technorati.com/faves?add={url}", "Share this on Technorati"],
            virb: ["http://virb.com/share?external&v=2&url={url}&title={title}", "Share this on virb"]
        };
        a.each(d.icon_bookmark, function (a, b)
        {
            var c = f[b][0].replace("{url}", d.url).replace("{title}", d.title).replace("{body}", d.title);
            var h = f[b][1];
            e += g(b, c, h)
        });
        e += "</ul>";
        e += '<div style="clear: both;">';
        e += "</div>";
        if (d.developer_link == true)
        {
            e += '<div class="smws-smartadd" align="right">';
            e += '<a href="http://www.smartdatasoft.com" target="_blank" class="smartAdd" title="Welcome to SmartDataSoft">Developed By: SmartDataSoft.com</a>';
            e += "</div>"
        }
        e += " </div>";
        a(this).append(e);
        var j = jQuery(".smws-social-bookmarks").height();
        ulHeight = jQuery(".smws-social-bookmarks ul.socials").height();
        h = jQuery(".smws-social-bookmarks div.smws-smartadd").outerHeight(true);
        ulHeight > j && jQuery(".smws-social-bookmarks-expand").hover(function ()
        {
            jQuery(this).animate(
            {
                height: ulHeight + h + "px"
            }, {
                duration: d.animation_duration,
                queue: true
            })
        }, function ()
        {
            jQuery(this).animate(
            {
                height: j + "px"
            }, {
                duration: d.animation_duration,
                queue: false
            })
        });
        if (d.toolTip == true)
        {
            jQuery(".smws-social-bookmarks  a").tipTip(
            {
                defaultPosition: d.toolTipPosition,
                attribute: "alr",
                maxWidth: d.toolmaxWidth,
                fadeIn: d.toolTipFadeIn,
                fadeOut: d.toolTipFadeOut
            })
        }
    }
})(jQuery)
