
var FABOfan = '<fb:fan profile_id="209204180228" stream="" connections="" width="300"></fb:fan>'; // <div style="font-size:8px; padding-left:10px"><a href="http://www.facebook.com/pages/Skladem/209204180228">Skladem na Facebooku</a></div>

var FABOshare = '<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Sdílet</a>';

window.addEvent('load', function(){
    if($chk($('FABOfan'))) {
      $('FABOfan').set('html', FABOfan);
      
      var myScriptLoad = Asset.javascript('http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/cs_CZ', {
                            id: 'FABOfanscr', 
                            onload: function(){
                                FB.init("73c7c4d4eac20058167a283d325803e0"); 
                            }                       
      });
    }
    
    if($chk($('FABOshare'))) {
      $('FABOshare').set('html', FABOshare);
      var myScriptLoad2 = Asset.javascript('http://static.ak.fbcdn.net/connect.php/js/FB.Share', {
                            id: 'FABOshare'         
      });       
    }
    
    
    if($chk($('TWITshare'))) {
      var stuffType = $$('.prodDetail .info h2').get('text');
      var stuffName = $$('.prodDetail .info h1').get('text')
      var stuffId = document.location.href.split('skladem.eu/');
      stuffId = stuffId[1].split('/');
      stuffId = stuffId[0];
      
      var myTwitLink = new Element('a', {
                    'class' : 'twitLink', 
                    href : 'http://twitter.com/home?status='+ stuffType + ' ' + stuffName + ' http://www.skladem.eu/' + stuffId ,
                    target: '_blank',
                    html : '<img src="/public/img/twitterlogo.gif" alt="Přidat na Twitter" />',
                    title : 'Přidat na Twitter',
                    rel : 'nofollow' 
      });
      $('TWITshare').adopt(myTwitLink);
             
    }
          
    
});   