Added resize slider function on window resize event