$(document).ready(function() {

	    

    $('#dropdown li.headlink').hover(

			function() { 

				$('ul', this).css('display', 'block'); 

				$('a', this).css('background-color', '#EFEFEF');

				$('a', this).css('color', '#333');

			   // $(this).corner("round 5px"); 

			},

			function() { 

				$('ul', this).css('display', 'none'); 

				$('a', this).css('background-color', 'transparent');

				$('a', this).css('color', '#FFF');

			    //$(this).corner("round 5px"); 

			}

	);

    

    $('.showcputip').each(function(i) { 

    	$(this).simpletip({ fixed: true, content: $(this).next().html() }); 

    });

    $('.showhddtip').each(function(i) { 

    	$(this).simpletip({ fixed: true, content: $(this).next().html() }); 

    });

    

    $("input[name=paytype]").click(function() {

    	if($(this).val() == "last")

    		$("#paytype-ext").show();

    	else

    		$("#paytype-ext").hide();

    })



    $('a.showhide').click(function() {

    	if($('#'+$(this).attr('name')).css("display") == "none") {

			$('#'+$(this).attr('name')).show();      

			$(this).removeClass('showbutton');         

			$(this).addClass('hidebutton');  		

    	} else {

			$('#'+$(this).attr('name')).hide();  

			$(this).removeClass('hidebutton');  

			$(this).addClass('showbutton');     		

    	}

    });

});
