// If we're in an iframe, the top will differ from the inner href
if (top.location != location) {
    top.location = location.href;
}

