/*
 * Written by Will Hattingh
 *
 * This file is to serve only the NeuStore storefront template page.
 */

  
  function popUpMessage(){
        alert("Please select a Managed DNS item first");
     }

$("#imgCart").click(function () {
    $("#cartview").toggle();

    var  img = $("#imgCart").find('img');
    var   src = img.attr('src');
    var  onCheck = /\-open\.gif$/ ;
    var  offCheck = /\-close\.gif$/;

    if (src.match(offCheck)) {
     img.attr('src', src.replace(offCheck, '-open.gif'));
    } else {
     img.attr('src', src.replace(onCheck, '-close.gif'));
    }

});
/*$('a[class^=popup]').click(popup); */
  $(".popup_infopage").click(popup);
    function popup()
    {
		var url	    = $(this).attr('href');
		var target  = ($(this).attr('target'))? $(this).attr('target') : '_blank';
		var params  = $(this).attr('class').split('_'); // identifier_[width_height|preset]
		var oShare  = ',scrollbars=yes,resizable=no,location=no,status=no'; // shared options
		var options = 'width=400,height=300' + oShare; // defaults

		if (params[1])
		{
			switch(params[1]) // presets
			{
			case 'small':
				options = 'width=200,height=200' + oShare;
				break;
			case 'medium':
				options = 'width=400,height=300' + oShare;
				break;
			case 'large':
				options = 'width=600,height=400' + oShare;
				break;
			default:
				options = 'width=800,height=800' + oShare;
				break;
			}
		}

		var nw = window.open(url, target, options);
			nw.focus();

		return false;
    }
