// JavaScript Document
 
      $().ready(function() {

        $('#modalpopup').jqm({overlay: 50, modal: true, trigger: false}).jqmAddClose('#modalpopup area.close');
        $('#modalpopup2').jqm({overlay: 50, modal: true, trigger: false}).jqmAddClose('#modalpopup2 area.close');
        $('#modalpopup3').jqm({overlay: 50, modal: true, trigger: false}).jqmAddClose('#modalpopup3 area.close');
        $('#modalpopup4').jqm({overlay: 50, modal: true, trigger: false}).jqmAddClose('#modalpopup4 area.close');
        
        //exit 1
        //var surveyUrl = 'survey_yes.html';

        $('#modalpopup').
          jqm({overlay: 88, modal: true, trigger: false}).
          jqmAddClose('#modalpopup .close');
/*
        $('#modalpopup input.yes').
          click(function() { location.href = surveyUrl; });*/

        $('area.exitLink').click(function(e) {
         // e.preventDefault();
          var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
        });
		$('a.exitLink').click(function(c) {
          //c.preventDefault();

          var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
        });
         //
        //exit 2
        $('area.exitLink2').click(function(e) {
          e.preventDefault();
          var href = $(this).attr('href');
          $('#modalpopup2').jqmShow().find('input.no').click(function() { location.href = href; });
        });
		$('a.exitLink2').click(function(c) {
          c.preventDefault();
          var href = $(this).attr('href');
           $('#modalpopup2').jqmShow().find('input.no').click(function() { location.href = href; });
        });
        //
         //exit 3
        $('area.exitLink3').click(function(e) {
          e.preventDefault();
          var href = $(this).attr('href');
          $('#modalpopup3').jqmShow().find('input.no').click(function() { location.href = href; });
        });
		$('a.exitLink3').click(function(c) {
          c.preventDefault();
          var href = $(this).attr('href');
           $('#modalpopup3').jqmShow().find('input.no').click(function() { location.href = href; });
        });
        //
         //exit 4
        $('area.exitLink4').click(function(e) {
          e.preventDefault();
          var href = $(this).attr('href');
          $('#modalpopup4').jqmShow().find('input.no').click(function() { location.href = href; });
        });
		$('a.exitLink4').click(function(c) {
          c.preventDefault();
          var href = $(this).attr('href');
           $('#modalpopup4').jqmShow().find('input.no').click(function() { location.href = href; });
        });
        //
      });


      function openDIV(){
            var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
         document.getElementById('modalpopup').style.display = "block";
        document.getElementById('overLayDiv').style.display = "block";
    }
  // Close/remove the div overlay in this function
function ClosePopup()
{
        document.getElementById('modalpopup').style.display = "none";
        document.getElementById('overLayDiv').style.display = "none";
}

function loadvid_knowyourbody(){
        url = "/flash/KnowYourBody.swf"
        loadSWF(url)
         var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();

    }
	   function loadvid_plateletscount(){
        url = "/flash/PlateletsCount.swf"
        loadSWF(url)
         var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();
    }
	   function loadvid_liftingthecloudofitp(){
      url = "/flash/LiftingCloudITP.swf"
        loadSWF(url)
         var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();

    }
	function loadvid_whatsgoingoninside(){
        url = "/flash/WhatsGoingOnInside.swf"
        loadSWF(url)
 var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();

    }
	function loadvid_makingthemostofyourappointment() {
	    url = "/flash/MakingTheMostofApp.swf"
        loadSWF(url)
         var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();
	}

	function loadvid_liftingthecloudofitp2() {
		    url = "/flash/LiftingCloudITP2.swf"
        loadSWF(url)
         var href = $(this).attr('href');
          $('#modalpopup').jqmShow().find('input.no').click(function() { location.href = href; });
		openDIV();
	}
function GoToSignup()
{
window.location = "https://www.lowplatelets.com/signup.jsp";
}
function loadSWF(url){
    var flashvars = {};
        var params = {};
    var attributes = {};

    flashvars.account = s_account;
    swfobject.embedSWF(url, "flashcontent", "728", "553", "8", false, flashvars, params, attributes);
}