﻿
var conf =
    {
        APIKey: '2_28WIYW2cgv7ecJWXdyWJghShaObgsnvOn7hxx3IrMtNOn_1ACPgfottKkwnePOt_'
         , enabledProviders: 'facebook,linkedin,twitter,yahoo'
        /* ,messenger,google */
    }

$(document).ready(function () {
    var act = new gigya.services.socialize.UserAction();
    act.setUserMessage("SafePeak SQL server acceleration");
    //act.setTitle("Seasons");
    //act.setLinkBack("http://vimeo.com/24496773");
    //act.setDescription("Seasons is a surreal motion graphics animation based on the changing seasons.");
    //act.addActionLink("Watch this movie", "http://vimeo.com/24496773");
    //act.addMediaItem({ type: 'image', src: 'http://b.vimeocdn.com/ts/160/564/160564685_100.jpg', href: 'http://vimeo.com/24496773' });
    var showShareBarUI_params =
            {
                containerID: 'componentDiv',
                shareButtons: 'Facebook-Like,google-plusone,Twitter,LinkedIn,Share',
                userAction: act
            }
    gigya.services.socialize.showShareBarUI(conf, showShareBarUI_params);
});


function openSharePopup(title, content, url) {
    // Constructing a UserAction Object  
    var act = new gigya.services.socialize.UserAction();

    // Setting the User Message
    if (title != "")
        act.setUserMessage(title);

    // Setting the Title
    if (title != "")
        act.setTitle(title);

    // Adding a Link Back  
    if (url != "")
        act.setLinkBack(url);

    // Setting the Description  
    if (content != "")
        act.setDescription(content);

    // Activate the Share Plugin  
    gigya.services.socialize.showShareUI(conf, { userAction: act, showEmailButton: true, showMoreButton: true });
}
