jQuery(document).ready(function(){
		
		jQuery('.slide-out-div').tabSlideOut({
			tabHandle: '.handleTab',                     //class of the element that will become your tab
			pathToTabImage: 'style/tabslideimage.png', //path to the image for the tab //Optionally can be set using css
			imageHeight: '546px',                     //height of tab image           //Optionally can be set using css
			imageWidth: '79px',                       //width of tab image            //Optionally can be set using css
			tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
			speed: 300,                               //speed of animation
			action: 'hover',                          //options: 'click' or 'hover', action to trigger animation
			topPos: '200px',                          //position from the top/ use if tabLocation is left or right
			leftPos: '0px',                          //position from left/ use if tabLocation is bottom or top
			fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
		});
		
	});
	
	jQuery(document).ready(function(){
		jQuery('.menu_ffxiii-2 li').click(function(){
			menuGo(jQuery(this));
		});
		jQuery('.menu_ffxiii-2 li').mouseover(function(){
			animateMenuTop(jQuery(this));
		});
		jQuery('.menu_ffxiii-2 li').mouseout(function(){
			animateMenuBottom(jQuery(this));
		});
	});
	
	function menuGo(link){
		window.location = link.find('a').attr('href');
	}
	
	function animateMenuTop(menuLi){
		
		var liClass = menuLi.attr('class');
		if(liClass.indexOf('newsy_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf('teksty_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf('historia_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf('postacie_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf( 'galeria_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf( 'video_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}else if(liClass.indexOf( 'oficjalnastrona_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 0'}, 200);
		}
	}

	function animateMenuBottom(menuLi){
		var liClass = menuLi.attr('class');
		if(liClass.indexOf('newsy_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('teksty_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('historia_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('postacie_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('galeria_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('video_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}else if(liClass.indexOf('oficjalnastrona_n') != -1){
			menuLi.stop().animate({backgroundPosition: '0 -17px'}, 200);
		}
	}
