	/*<![CDATA[*/
	function IEHoverPseudo() {

		var navItems = document.getElementById("primary-nav").getElementsByTagName("li");
		
		for (var i=0; i<navItems.length; i++) {
			if(navItems[i].className == "menuparent") {
				navItems[i].onmouseover=function() { this.className += " over"; }
				navItems[i].onmouseout=function() { this.className = "menuparent"; }
			}
		}

	}
	window.onload = IEHoverPseudo;
	
	/*]]>*/
$(document).ready(function(){

		
	/**cart content**/

	$('#shoplink-close').live("click", function() {
		$('#shopcontent').slideUp('fast');
	});

	$("a#shoplink").live("click", function() {
    	if ($('#shopcontent').is(":hidden")){
			$('#loginform').hide();
			$('#shopcontent').slideDown('fast');	        
		} else {
        	$('#shopcontent').slideUp("fast");        
		}		
		
	});	

	$("#loginform").bind("mouseleave",function(){    
 	   $('#loginform').slideUp("fast");   	
    });
    
    $("#shopcontent").bind("mouseleave",function(){    
 	   $('#shopcontent').slideUp("fast");   	
    });


	
	
	$('#loginlink').click(function() {
    	if ($('#loginform').is(":hidden")){
	        $('#loginform').slideDown("fast");
	        $('#shopcontent').hide();	     
		} else {
        	$('#loginform').slideUp("fast");        	
		}		
	});	
	
	/*
	// something is selected, get details & display div
	if ($('#shipping_zone :selected').val()!='') {
		doShow();
	}
 	
	$('#shipping_zone').change(function() {
		doShow();
	});	
	
	function doShow() {
		 $('#shipping_zone_rate').hide();        	 	    		 
	      var selectedval = $('#shipping_zone :selected').val();
	      $.get("/seminar_ajax.php", { type: "shipping", id: selectedval },
		  function(data){
			   $('#shipping_zone_rate').html(data);
		  });
		
		$('#shipping_zone_rate').show();
	}
	*/
	// something is selected, get details & display div
	if ($('#country :selected').val()!='') {
		doShow('country','shipping_container','country_option');
	}
 	
	$('#country').change(function() {
		doShow('country','shipping_container','country_option');
	});
	
	// something is selected, get details & display div
	if ($('#delivery_country :selected').val()!='') {
		doShow('delivery_country','shipping_container','delivery_country_option');
	}
 	
	$('#delivery_country').change(function() {
		doShow('delivery_country','shipping_container','delivery_country_option');
	});
	
	function doShow(ajax_elm,ajax_div,ajax_type) {
		//alert("sadfsd")
		 $('#'+ajax_div).hide();        	 	    		 
	      var selectedval = $('#'+ajax_elm+' :selected').val();
	      $.get("/seminar_ajax.php", { type: ajax_type, id: selectedval },
		  function(data){
			   $('#'+ajax_div).html(data);
		  });
		
		$('#'+ajax_div).show();
	}
	

});

function clearText(theField) {
   if (theField.defaultValue == theField.value)
   theField.value = '';
}

function addText(theField) {
   if (theField.value == '')
   theField.value = theField .defaultValue;
} 

   function replacePass(q){
        if (q){
            document.getElementById('passwordtext').style.display="none";
            document.getElementById('password').style.display="inline";
            document.getElementById('password').focus();
        } else {
            document.getElementById('password').style.display="none";
            document.getElementById('passwordtext').style.display="inline";
        }
   }


