﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />
/// <reference path="jquery.blockUI.js" />

$(document).ready(function() {
    $(".subscriptionBox").wrap("<div class='wrap1'><div class='wrap2'>" +
     "<div class='wrap3'></div></div></div>");

    $(".bubble").hide();

    $(".subscriptionBox").children(".logo").hover(function() {
        $(this).siblings(".bubble").show();
    }, function() {
        $(this).siblings(".bubble").hide();
    });

    $(".subscriptionBox").click(function(event) {

        if (window.event) {
            window.event.cancelBubble = true;
        }

        if ($(this).children(".selection").val() == "1") {
            $(this).children(".selection").val("0");
            $(this).children(".purchase").attr("src", "/ASTD/images/buttons/unchecked_16x16.gif");
            $(this).removeClass('selected');
        }
        else {
            $(this).children(".selection").val("1");
            $(this).children(".purchase").attr("src", "/ASTD/images/buttons/checked_16x16.gif");
            $(this).addClass('selected');
        }
    });
    
});

function OpenWindow(e, url) {
    if (window.event) {
        window.event.cancelBubble = true;
    }
    else {
        e.stopPropagation();
    }

    window.open(url, 'myProduct');
}

