 /*

function toggle_visibility(target){
    $("#"+target).show
}*/

$(document).ready(function(){

	Cufon.replace('#enquiry-info')('#header-text');
    
    try{
        
        //When page loads...
        $(".tab-page").hide(); //Hide all content
        $("#page-tabs a:first").addClass("active").show(); //Activate first tab
        $(".tab-page:first").show(); //Show first tab content

        //On Click Event
        $("#page-tabs a").click(function() {

            $("#page-tabs a").removeClass("active"); //Remove any "active" class
            $(this).addClass("active"); //Add "active" class to selected tab
            $(".tab-page").hide(); //Hide all tab content

            var activeTab = $(this).attr("href"); //Find the href attribute value to identify the active tab + content
            $(activeTab).fadeIn(); //Fade in the active ID content
           // return false;
        });
        
        // get JS query string bits after # in the URI
        var uri = location.href;
        bits = uri.split("#");

        if(bits[1] != undefined) {
            // see if any match tabs and make that tab active
            $("a[href=#" + bits[1] + "]" ).click();
        }
        
       // $("#content").tabs();
    } catch(e) {
        //console.log(e);
    }
    
    try{
        $('#whats-happening-around').ticker({
            titleText    : '',
            displayType  : 'fade',
            controls     : false,
            pauseOnItems : 15000
        });
    } catch(e) {
        //console.log(e);
    }

});


