incorporated ajax into pagination and photo categories