$(function() {
//$("#underspot").css({"height": $("#mainimg").height() });

// Social Bar hover
   $("#socialbar a").hover(function() {
   $(this).stop().animate({"margin-left" : "0"}, 200);
   }, function(){
   $(this).stop().animate({"margin-left" : "-10px"}, 200);
   });

// Social Bar Tooltips
   $("#socialbar a").hover(function(e) {
   var y = $(this).offset().top - $("#socialbar").offset().top;
   var content = $(this).attr('title'); id = $(this).attr('id');
   $(this).attr('title', '');
   $("#socialbar").append("<div id='tooltip'>" + content + "</div>");
   $("#socialbar #tooltip").css('opacity', 0.7).css('top', y + 8).css("left", 50).data('trigger', id).fadeIn();
   },
   function() {
   var trigger = $("#socialbar #tooltip").data('trigger');
   var content = $("#socialbar #tooltip").html();
   $('#' + trigger).attr('title', content);
   $("#socialbar #tooltip").remove();
   });


  $("#supptec-icon").click(function(e) {
  e.preventDefault();
  var where=($("#slider").children(".items").css("left")).replace("px","").replace("-","")/890;
  sel=$(".cont_si").eq(where).children("h1").text();
  window.location.href="/jsp/Template2/Contacts.jsp?ask=Demo "+sel;
  });


  $("#email-icon").click(function(e) {
  e.preventDefault();
  var where=($("#slider").children(".items").css("left")).replace("px","").replace("-","")/890;
  sel=$(".cont_si").eq(where).children("h1").text();
  window.location.href="/jsp/Template2/Contacts.jsp?ask="+sel;
  });

  $("#free-trial").click(function(e) {
  e.preventDefault();
  var where=($("#slider").children(".items").css("left")).replace("px","").replace("-","")/890;
  sel=$(".cont_si").eq(where).children("h1").text();
  window.location.href="/jsp/Template2/Contacts.jsp?ask=Free Trial "+sel;
  });
});
