function fileUploaded(t) {
	$('input[name=uploadedPhoto]').val(t);
}

function facebookPost(img) {
	alert("TBD:" + img);
}


$(function(){

$('#btnTwitter')
   .click(function()
       {
           var lnk = $(this);
           lnk.attr('href', 'http://www.twitter.com/home?status=I+entered+to+become+the+face+of+@TinyPrints+and+WIN+$1k+in+their+Talent+Search+Contest.+Enter+today!+http://bit.ly/talentsearch');
           lnk.attr('target', '_blank');
       });

$('#btnContestTwitter')
   .click(function()
       {
           var lnk = $(this);
           lnk.attr('href', 'http://www.twitter.com/home?status=Enter+the+@TinyPrints+Talent+Search+Contest!+Become+the+face+of+Tiny+Prints+and+WIN+$1,000!+http://bit.ly/talentsearch');
           lnk.attr('target', '_blank');
       });

$('#btnFacebook')
   .click(function()
       {


           var lnk = $(this);
           var lnkUrl = unescape(lnk.attr('href'));
		FB.ensureInit(function () {

			FB.Bootstrap.requireFeatures(["Connect"], function() {     

		    	FB.Connect.requireSession( function () {                        

			 var attachment = {'description':'I just entered the Tiny Prints Talent Search Contest for a chance to become the face of Tiny Prints and to WIN $1,000! Enter your photo today! http://www.tinyprints.com/talentsearch', 'media':[{'type':'image','src':lnkUrl,'href':'http://tinyprints.promotionexpert.com/talentsearch/index.html'}]};
			var action_link = [{ "text": "Enter Today!", "href": "http://tinyprints.promotionexpert.com/talentsearch/index.html"}];
    		FB.Connect.streamPublish('', attachment, action_link);

  		});
  		});

  		});

           return false;
       });

})

$('#btnContestFacebook')
   .click(function()
       {

           var lnk = $(this);
           var lnkUrl = "http://gfx.citronstudio.com/c/tp/tc2009/img/TP_FB_2.gif";


		FB.ensureInit(function () {

			FB.Bootstrap.requireFeatures(["Connect"], function() {     

		    	FB.Connect.requireSession( function () {                        


			 var attachment = {'description':'Enter the Tiny Prints Talent Search Contest for a chance to become the face of Tiny Prints and to WIN $1,000! Don\'t miss the opportunity to shine. http://www.tinyprints.com/talentsearch', 'media':[{'type':'image','src':lnkUrl,'href':'http://tinyprints.promotionexpert.com/talentsearch/index.html'}]};
			var action_link = [{ "text": "Enter Today!", "href": "http://tinyprints.promotionexpert.com/talentsearch/index.html"}];
    		FB.Connect.streamPublish('', attachment, action_link);
  		});
  		});
    		
  		});
           return false;
       });


FB.init("bc3a8ca7dd831381d061992bc7f2b93b", "/talentsearch/xd_receiver.htm");

//if (document.forms['Register']) {
//	window.flashcontent = $('form[name=Register]');
//}
