working js for phots view change now