$(document).ready(function() {

    // Change the page title when different sections are selected.
    //$("#homelink").click(function(){ document.title="iZigg | Home"; });

    $("#t1 a").click(function() { document.title = "iZigg | iZigg Story"; });
    $("#t2 a").click(function() { document.title = "iZigg | 90210"; });
    $("#t3 a").click(function() { document.title = "iZigg | How It Works"; });
    $("#t4 a").click(function() { document.title = "iZigg | Join"; });
    $("#t5").click(function() { document.title = "iZigg | Coming Summer 2011"; });

    $("#tWho").click(function() { document.title = "iZigg | Who"; });
    $("#tWhat").click(function() { document.title = "iZigg | What"; });
    $("#tWhy").click(function() { document.title = "iZigg | Why"; });
    $("#tWow").click(function() { document.title = "iZigg | Wow"; });
    $("#tHome").click(function() { document.title = "iZigg | Home"; });
    $("#tFAQ").click(function() { document.title = "iZigg | FAQ"; });
    $("#tContactUs").click(function() { document.title = "iZigg | Contact Us"; });
    $("#tAboutUs").click(function() { document.title = "iZigg | About Us"; });
    $("#tLogin").click(function() { document.title = "iZigg | Login"; });

   
    $(".phoneCh").click(function() {
        // get access to the API
        var api = $("#flowpanes").data("scrollable");
        var l_attr = this.getAttribute("ref");

        if (api.getIndex() != 0) {
            //scroll to phone content div
            api.seekTo(0);
        }

        //set phone content (call at the end of script to accept onBeforeSeek event)
        $("#rnPhoneChannel").html($("#" + l_attr).html());
    });

    $("#flowpanes").scrollable({
        size: 1,
        keyboard: false,
        clickable: false,
        onBeforeSeek: function(obj, index) {
            //close player
            $("#rnPhoneChannel").html("");
        }
    }).navigator({ //circular()
        // select #flowtabs to be used as navigator
        navi: ".Nav",
        // select A tags inside the navigator to work as items (not direct children)
        naviItem: "a.sel",
        // assign "current" class name for the active A tag inside navigator
        activeClass: "current"
    });

});

