Using a variable you can easily set the navigation. Horizontal navigation : Pass the variable to true. Vertical navigation: Pass the variable to false.
You can see this example live on codepen.io at http://codepen.io/GaetanBt/pen/zeyna.
This work is under the MIT license. Check the license file ;)