jQuery(function($) {
		$("#tabs").tabs({ fx: { opacity: 'toggle' } });
		$("#tabs").tabs( "slow", "fx", { opacity: 'toggle' } );
		$("#tabs").tabs( "rotate" , 5000 , 0 )
		$(".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *")
 		.removeClass("ui-corner-all ui-corner-top")
  		.addClass("ui-corner-bottom");

});

function fbFetch(){
	  //Set Url of JSON data from the facebook graph api. make sure callback is set with a '?' to overcome the cross domain problems with JSON
      var url = "http://graph.facebook.com/310496644897/feed?limit=5&callback=?";
	jQuery(function($) {
		//Use jQuery getJSON method to fetch the data from the url and then create our unordered list with the relevant data.
		$.getJSON(url,function(json){
		    var html = "<ul>";
				//loop through and within data array's retrieve the message variable.
		    	$.each(json.data,function(i,fb){
		      	
			if(fb.picture){
				html += "<li class=fb_message><div class=fb_picture><img src=" + fb.picture + " width=60 height=60 /></div><div class=fb_message_text><strong>" + fb.from.name + "</strong> " + fb.message + "</div></li>";
			}else{
				html += "<li class=fb_message><div class=fb_picture><img src=/skin/frontend/New_ThePerfectCardCompany/default/images/fb_pcc.gif width=60 height =60 /></div><div class=fb_message_text><strong>" + fb.from.name + "</strong> " + fb.message + "</div></li>";
			}

			});
			html += "</ul>";

			//A little animation once fetched
			//$('.facebookfeed').animate({opacity:0}, 100, function(){

					$('.facebookfeed').html(html);

																//  });

		    //$('.facebookfeed').animate({opacity:1}, 100);
		  
		});
	});	


	};

