$(function () {
var counter = 0,
myElements = $('#element1, #element2');
function showElement () {
myElements.hide()
.filter(function (index) { return index == counter % 3; }) // figure out correct element to show
.show('fast'); // and show it
counter++;
}; // function to loop through elements and show correct element
showElement(); // show first element
setInterval(function () {
showElement(); // show next element
}, 10 * 1000); // do this every 10 seconds
});