fixed JS style
added orientation stuff