﻿$(document).ready(function () {
    $(".openInLightbox").fancybox({
        autoDimensions: true,
        autoScale: true,
        width: 730,
        height: 390,
        padding: 0,
        margin: 0,
        opacity: true,
        scrolling: 'no',
        onComplete: function () {
            $(".fancy-bg").remove();
        }
    });

    $(".openInLightboxPast").fancybox({
        autoDimensions: true,
        autoScale: true,
        width: 355,
        height: 380,
        padding: 0,
        margin: 0,
        opacity: true,
        scrolling: 'no',
        onComplete: function () {
            $(".fancy-bg").remove();
        }
    });

    $("#FormID-5 .FormSubmitButton").click(function () {
        try {
            _gaq.push(["_trackPageview", "/virtualgoal/join-newsletter"]);
        } catch (e) { /*GoogleAnalytics error */ }
    });

    $(".facebookSharing").click(function () {
        try {
            _gaq.push(["_trackPageview", "/virtualgoal/social?type=facebook"]);
        } catch (e) { /*GoogleAnalytics error */ }
    });

    $("#FormID-1 .FormSubmitButton").click(function () {
        try {
            _gaq.push(["_trackPageview", "/virtualgoal/tips-oss"]);
        } catch (e) { /*GoogleAnalytics error */ }
    });

    $("input[id*=AddCommentImage]").click(function () {
        try {
            _gaq.push(["_trackPageview", "/virtualgoal/comment"]);
        } catch (e) { /*GoogleAnalytics error */ }
    });
}); 
