$(document).ready(function() {
    var tabContainers = $('div.tabs > div');
    tabContainers.hide().filter(':first').show();
    
    $('div.tabs ul.tabNavigation a').click(function() {
        tabContainers.hide();
        tabContainers.filter(this.hash).show();
        $('div.tabs ul.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');
        showContent(tabContainers.filter(this.hash));       
        
        return false;
    }).filter(':first').click();
	
	function showContent($container){
	 $.ajax({
	                          type: 'GET',
	                          url: "http://api.swissunihockey.ch/rest/v1.0/leagues/125/groups/8/table",
	                          processData: true,
	                          dataType: 'text',
	                          success: function(data, textStatus, request) {
								alert(1);
	                          }
							  });
	
	
	
	 /*$.getJSON("http://api.swissunihockey.ch/rest/v1.0/leagues/125/groups/8/table", function(json) {
      alert("success");
    });*/
  }
	
	$(".fancy-iframe").fancybox({
				'width'				: 1220,
				'height'			: '90%',
				'autoScale'			: true,
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade',
				'type'				: 'iframe',
				'overlayColor'		: '#000',
				'scrolling'			: 'yes'
			});
});

