﻿function toggle() {
    var ele = document.getElementById("toggleText");
    var text = document.getElementById("readMore");
    if (ele.style.display == "block") {
        ele.style.display = "none";
        text.innerHTML = "Show All";
    }
    else {
        ele.style.display = "block";
        text.innerHTML = "Show Brief";
    }
}



$(document).ready(function () {

    $("a[rel=example_group]").fancybox({
        'transitionIn': 'elastic',
        'transitionOut': 'elastic',
        'titlePosition': 'over',
        'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
            return '<span id="fancybox-title-over">Photo ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
        }
    });

});

function Popup(link) {
    window.open(link, 'Courses', 'width=600,height=500,menubar=no,status=yes');
    return false;

}


function ShowPage(id) {

    var newid = id + 1;
    document.getElementById("ShowClick").setAttribute("onclick", "ShowPage(" + newid + ")");
    if (id == 3)
        document.getElementById("showmore").style.display = "none";
    var Page = document.getElementById("page" + id);
    Page.style.display = "block";
}

$(document).ready(function () {

    $("#Video").click(function () {
        $.fancybox({
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'title': this.title,
            'width': 680,
            'height': 495,
            'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
            'type': 'swf',
            'swf': {
                'wmode': 'transparent',
                'allowfullscreen': 'true'
            }
        });

        return false;
    });

});

