function showReviewForm() {
	$("#addReview").show();
}
    
$(function() {

     $('.help').click(function() {
        var dialogId = "#" + $(this).attr('rel');
        $(dialogId).dialog({
           width: 650,
           resizable: false,
           close: function() { $(this).dialog( 'destroy' );}
	    });
		return false;
	});

    $('#productImage a').lightBox();
    $('#enlargeImage a').lightBox();

    $('#thumbnails a').click(function(){
        $("#mainImage").attr('src', $(this).attr('href'));
        $('#productImage a').attr('href', $(this).attr('rel'));
        $('#enlargeImage a').attr('href', $(this).attr('rel'));
        return false;
    });
});

function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none") { 
  document.getElementById(d).style.display = "block"; 
  document.getElementById('show-hide-acc').innerHTML = 'Hide';
}
else { 
  document.getElementById(d).style.display = "none"; 
  document.getElementById('show-hide-acc').innerHTML = 'Show all';
}
}


$(function() {
   $('#newsletter-signup').live('click',function(){
      $("#loading").toggle();
      $.ajax({
        type: "POST",
        url: "index.php",
        data: { 
          page : "/modules/newsletter/ajax_newsletter_signup", 
          name : $('#newsletter-name').val(),
          email : $('#newsletter-email').val()
        },
        success: function(data) {
         $("#newsletter-block").replaceWith(data);
	    }
      });
      return false;
   });
   //jQuery("#loading").ajaxStart(function(){jQuery(this).show()});
   //jQuery("#loading").ajaxStop(function(){jQuery(this).hide()});


$('#newsletter-name').focus(function(){
$(this).val("");
});
});
