/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

jQuery(document).ready(function($){
   
    $("#faqs").accordion();
   
    $("#banner-main").cycle({
        timeout: 6000,
        speed: 2000,
        pause:true,
        fx: 'fade',
        next:'#featuresNext',
        prev:'#featuresPrev',
        pager:'#nav',
        easing:'easeInOutExpo',
        // callback fn that creates a thumbnail to use as pager anchor
        pagerAnchorBuilder: function(idx, slide) {
            return '<a href="#" class="pager-'+(idx+1)+'">'+(idx+1)+'</a>';
        }
    });
    
    $("#fixture-list li ul li.button a").click(function(){
        var type = '';
        var fixture_class = $(this).parent().parent().parent().attr('id');
        
        if($(this).html()=='Show'){
            $('#'+fixture_class+'-more').show();
            $(this).html('Hide');
        }else{
            $('#'+fixture_class+'-more').hide();
            $(this).html('Show');
        }
        
        
        return false;
    });
    

    
    $("#content-h2-center li.fixtures-link a").click(function(){
        $("#content-h2-center #fixtures-summary").show();
        $("#content-h2-center #results-summary").hide();
        $(this).addClass('active');
        $("#content-h2-center li.results-link a").removeClass('active');
        return false;        
    });
    
    $("#content-h2-center li.results-link a").click(function(){
        $("#content-h2-center #results-summary").show();
        $("#content-h2-center #fixtures-summary").hide();
        $(this).addClass('active');
        $("#content-h2-center li.fixtures-link a").removeClass('active');
        return false;
    });
    
    $('a[rel*=external], a.external').click( function() {
        window.open(this.href);
        return false;
    });
    
});


