// JavaScript Document
function toggleSubmenu(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu';
		theMenu.className='menu-over';
	}
	else{
		theSub.className='submenu-hide';
		theMenu.className='';
	}
}

function toggleSubmenuH(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu-h';
	}
	else{
		theSub.className='submenu-hide';
	}
}

//Make the shipping details same as billing details
function checkShipping(){
	var theForm=document.forms['cart'];
	if(theForm.elements['controller'].checked){
		theForm.elements['dName'].value=theForm.elements['bName'].value;
		theForm.elements['dAddress'].value=theForm.elements['bAddress'].value;
		theForm.elements['dAddress1'].value=theForm.elements['bAddress1'].value;
		theForm.elements['dCity'].value=theForm.elements['bCity'].value;
		theForm.elements['dPhone'].value=theForm.elements['bPhone'].value;
	}else{
		theForm.elements['dName'].value='';
		theForm.elements['dAddress'].value='';
		theForm.elements['dAddress1'].value='';
		theForm.elements['dCity'].value='';
		theForm.elements['dPhone'].value='';
	}

}

$(function(){
    //Blog commment area
    $('.reply-button').click(function(){
        $('#cancel-reply').css('display','block');

        $('#parent_id').attr('value',$(this).attr('title'));
        $('#commentform-section').css('display','none');
        $(this).parent().append($('#commentform-section').remove());
        $('#commentform-section').slideDown('slow');

        $('#cancel-reply').click(function(){
            $('#cancel-reply').css('display','none');
            $('#parent_id').attr('value',0);
            $('.comment-section').append($('#commentform-section').remove());
            return false;
        });

        return false;
    });
})
	

	