// JavaScript Document

  window.fbAsyncInit = function() {
			FB.init({appId: '255582037800518', status: true, cookie: true,
					 xfbml: true});
		  };
		  (function() {
			var e = document.createElement('script');
			e.type = 'text/javascript';
			e.src = document.location.protocol +
			  '//connect.facebook.net/pt_PT/all.js';
			e.async = true;
			document.getElementById('fb-root').appendChild(e);
			
			
		  }());
		  
		  function inviteFriends() {
			FB.api('/me', function(user) {
				if (user != null) {
				  FB.ui({method: 'apprequests', message: 'Clique, rode e veja a luz! Explore o novo Kia Rio.', title: 'O NOVO KIA RIO. SPOT ON.'});
				}
			});
		  }
		  
		  function shareWall() {
			FB.api('/me', function(user) {
				if (user != null) {
					FB.ui({
						 method: 'feed',
						 name: 'O NOVO KIA RIO. SPOT ON.',
						 link: 'http://www.facebook.com/pages/KIA-MOTORS-Europe/271779556397?sk=app_159933464074266',
						 picture: 'http://www2.h2omedia.de/kia_rioturntable/images/thumbnail.jpg',
						 caption: '',
						 description: 'Clique, rode e veja a luz! Explore o novo Kia Rio.',
						 message: ''
					   },
					   function(response) {

					   }
					 );
				}
			});
		  }	
