// xtCommerce Javascript-Functions
var selected;
var submitter = null;

function submitFunction() {
    submitter = 1;
}
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}  

function selectRowEffect(object, buttonSelect) {
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }

  if (selected) selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;

// one button is not an array
  if (document.getElementById('payment'[0])) {
    document.getElementById('payment'[buttonSelect]).checked=true;
  } else {
    //document.getElementById('payment'[selected]).checked=true;
  }
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
/*
function popupImageWindow(url) {
  window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}*/





$(document).ready(function(){
	// debugging-funktionen
	$('.thickbox img').addClass('TEST');
	$( '#productimages' ).jqGalScroll( { direction : 'horizontal', speed: 500, ease: 'easeInOutQuad', height: 244, width: 244 } );

	// debugging-funktionen
	$("input#s").DefaultValue("Produktsuche");//.find("label[for=' + this.attr("id") + ']").attr('visibility', 'hidden'); 
	$("#sign_in input.text").DefaultValue("E-Mail-Adresse");

	// debugging-funktionen
	$("input#loginbox-email").DefaultValue("E-Mail-Adresse");
	$("input#loginbox-password").DefaultValue("Passwort");

	$("#nav-first ul").superfish({
		hoverClass:		'hover',
		//pathClass:		'active',
		delay:			500,
		animation:		{opacity:'show'},
		speed:			'fast',
		autoArrows:		false,
		dropShadows:	false,
		disableHI: 		true
	});
	
	
});








/*
// When document has loaded, initialize pagination and form 
$(document).ready(function(){
  
  // Defaultwerte als Beschriftung für Textfelder
  $("input#search").DefaultValue("Produktsuche");
  $("input#username").DefaultValue("Benutzername");
  $("input#password").DefaultValue("Passwort");
  
  // Vor absenden des Warenkorbs pruefen, ob die AGB akzeptiert worden sind
  $("#warenkorb").submit(function() { 
    if (!isCheckedById("#dgform-agb")) { 
      alert ("Bitte akzepieren Sie die Allgemeinen Geschäftsbedingungen"); 
      return false; 
    } else { 
      return true; //submit the form 
    } 
  }); 
  
  function isCheckedById(id) { 
    //var checked = $("input[@id="+id+"]:checked").length; 
    //return checked; 
    return $("input[@id="+id+"]:checked").length; 
  }
   
  function date_de(s) {
    var a = s.split('.');
    a[1] = a[1].replace(/^[0]+/g,"");
    return new Date(a.reverse().join("/")).getTime();
  }
});
*/
