$(document).ready(function () {
	$('#selectTypeDialog input.selectType, #selectTypeDialog a.selectType, .right').click(function (e) {
		e.preventDefault();

		// example of calling the selectType function
		// you must use a callback function to perform the "yes" action
		selectType("<div style='color:#000000;font-size:14px;font-weight: bold;'>Please select the Format that you would like to receive.<div style='color:#FF0000;font-size:12px;'>Note: You may change it after the order is placed.</div>", function () {
			;
		});
	});
});





$(document).ready(function(){
						   $(".arrow-hover").fadeTo("slow", 0.3); // This sets the opacity of the thumbs to fade down to 30% when the page loads
						   $(".arrow-hover, .video-image, .video-text").hover(function(){
						   $(".arrow-hover").fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
						   },function(){
						   $(".arrow-hover").fadeTo("fast", 0.3); // This should set the opacity back to 30% on mouseout
						   });
						   });



function displayButItNowAfterVideo()
{
hs.close();
 selectType("<div style='color:#000000;font-size:14px;font-weight: bold;'>Please select the Format that you would like to receive.<div style='color:#FF0000;font-size:12px;'>Note: You may change it later.</div>", function () {
                        ;
                });
}


function test(a)
{
hs.close();
 selectType("<div style='color:#000000;font-size:14px;font-weight: bold;'>Please select the Format that you would like to receive.<div style='color:#FF0000;font-size:12px;'>Note: You may change it after the order is placed.</div>", function () {
                        ;
                });
}

function selectType(message, callback) {
	$('#selectType').modal({
		close:false,
		position: ["20%",],
		opacity:50,
		overlayId:'selectTypeModalOverlay',
		containerId:'selectTypeModalContainer', 
onClose: function (dialog) {
  dialog.data.fadeOut('slow', function () {
    dialog.container.slideUp('slow', function () {
      dialog.overlay.fadeOut('slow', function () {
        $.modal.close(); // must call this!
      });
    });
  });
},
onOpen: function (dialog) {
  dialog.overlay.fadeIn('slow', function () {
    dialog.container.slideDown('slow', function () {
      dialog.data.fadeIn('slow');
    });
  });
},
		onShow: function (dialog) {
			dialog.data.find('.message').append(message);

			// if the user clicks "Access"
			dialog.data.find('.Access').click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					AccessButtonClicked();
				}
				// close the dialog
				$.modal.close();
			});

			// if the user clicks "Excel"
			dialog.data.find('.Excel').click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					document.addtoCart.submit();
				}
				// close the dialog
				$.modal.close();
			});
		}
	});
}




