// Citruss Tv Mycart JavaScript Document

$(document).ready(function() {
   
       // hides the popup soon as the DOM is ready
  
        $('.popup_box').hide();
  
 // show the popup on clicking the noted link 
 
        $('#showbtn').mouseenter(function() {
  			$('#showbtn a:first').addClass('active');
          $('.popup_box').show('fast');
        });
       
	         $('#showbtn').mouseleave(function() {
  			$('#showbtn a:first').removeClass('active');
          $('.popup_box').hide('fast');
        });
			 
			 
			 $('#show_newsletter').click(function() {
												  
				$('.light_box').fadeIn('slow');
				
												  
				});
			 
			 $('.newsletter_close').click(function() {
												   
												   
						$('.light_box').fadeOut('slow');						   
												   });
												  
												  
       
	          // Close the popup by closing close button 
       
    
	   
         // hide the popup on clicking the noted link 
       
       //  $('#showbtn').mouseout(function() {
 
       //   $('.popup_box').hide('slow');
 
       //   return false;
  
      //  });



$('.submit').click(function()
{ 
	$.ajax(
		   {
   type: "POST",
   url: "ProcessNewsletter.cfm",
  
  success: function(html)
  {
    $('#results').append(html);

   }
 });
 });



  
      });
	  
	  
	  
	  /**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", '../images_citruss_uk/vtip_arrow.png');
            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){vtip();}) 
	  
