Ajax load main pages

Have not fixed the weird loading for permalinks.
Ajax load pages