﻿// Video Share Hide/Show Functionality
// Description: This script shows the social sharing links when you hover over the button and hides them when you mouse away.

$(document).ready(function ()
{
	$(".share_box").hover(function ()
	{ //On hover...
		$(".social_sharing", this).stop()
			.animate({ //Animate and expand the social_sharing box (Width + height)
				width: '60px',
				height: '100px'
			}, 500);
	}, function ()
	{
		$(".social_sharing", this).stop() //On hover out, go back to original size 50x17
		  .animate({
		    width: '60px',
		    height: '20px'
		  }, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
	});
});



/*getFacebookURL and getTwitterURL can be used at your leisure. They may prove helpful when you are dynamically
changing videoShare URLs - such as in conjunction w/a jwPlayer nav. Simply pass in the proper parameters and it will
return the appropriate string required.*/
function getFacebookURL(pageVideoIsOn, title, description, fbYouTubeURL, thumbnailURL)
{
var fURL = "";

fURL = "http://api.addthis.com/oexchange/0.8/forward/facebook/offer?" +
	"url=" + pageVideoIsOn + "&" +
	"title=" + title + "&" +
	"description=" + description + "&" +
	"swfurl=" + fbYouTubeURL + "&" +
	"screenshot=" + thumbnailURL + "&" +
	"height=349&width=560&pubid=ra-4ddaaca5338bf8c2";

return fURL;
}

function getTwitterURL(twitterYouTubeURL, title)
{
var tURL = "";
tURL = "http://api.addthis.com/oexchange/0.8/forward/twitter/offer?" +
"url=" + twitterYouTubeURL + "&" +
"title=" + title + "&" +
"template={{title}}: {{url}}&pubid=ra-4ddaaca5338bf8c2";

return tURL;
}
