﻿function showSurvey() {
  setTimeout(function() { surveyCallback(); }, 0);
}

function surveyCallback() {
  $.fn.colorbox({ inline: true, href: "#bsp" });

  // bind the close event to the "no thanks" link
//  $("#bsp,a.no").click(function() {
//    $.fn.colorbox.close();
//  });

  // bind the pop-under to the okay link
//  $("#bsp,a.yes").click(function() {
//    var city, state, cookie, i;

//    // get the user's city/state from the cookie
//    cookie = getCookie("tds");
//    if (cookie) {
//      for (i = 0; i < cookie.split("&").length; i++) {
//        var segment;
//        segment = cookie.split("&")[i];
//        if (segment) {
//          if (segment.split("=")[0] == "city")
//            city = segment.split("=")[1];
//          if (segment.split("=")[0] == "state")
//            state = segment.split("=")[1];
//        }
//      }
//    }

//    // get a handle to the pop-up window
//    var hwnd = window.open('https://vovici.com/wsb.dll/s/11b14g3d76c?wsb14=' + escape(location.href) + '&wsb17=' + escape(city + ',' + state), 'bizsurvey');

//    // make it a pop-under
//    hwnd.blur();

//    // close the colorbox
//    $.fn.colorbox.close();
//  });
}

