JavaScript Expand/Collapse

Hey guys I’m building and iFrame for a tab on a Facebook page, I have got the following so far

However there are a few things I would like modified the first is

When one tab is open and the other tab is clicked is for it to close the current open tab.

For the border of the expanded content to link up with the corresponding tab but for it to also leave the white space underneath.

Also for the collapse button I would like it to appear at the bottom of the div (outside the scroll) when the expand link is clicked.

Final question is that there is a slight overlay with the border with the pod is collapsed after being expanded. Thanks in advance, any help will be grateful.