I made simple function which makes all container behave like link ("a" element).
function allHot(element){
$(element)
.click(
function(){
var hr
Adding to MarcoK's answer.
When using replace you are replacing the history state so you are not pushing one more state to the history.
If you have the following:
Page1 to State1
Page2 to State2
and then you use replace you will be replacing Page3 to State2.
When you press the back button you will go from State2 to State1 and that is why you are going to Page1.
When using window.location.href you are adding one more state so Page3 will be set to State3 and when you click the back button you will go to State2 wich has Page2 as URL.