/*
* Function changes current panel accordingly to specified direction
*
* @param direction int
*          Two values recognized:
*          -1  :   change to previous
*          1   :   change to next
* @author Adam Ludera <adam.ludera@xsolve.pl>;
* @access public
* @return void
*/
function changePanel(direction)
{
   //Check if sp3 element is defined on page
   if(typeof sp3 === 'undefined')
   {
       //If not - do not try to execute
       return ;
   }
   
   //Choose direction
   switch(direction)
   {
       //Previous:
       case -1:
           sp3.showPreviousPanel();
           break;
       //Next
       case 1:
           sp3.showNextPanel();
           break;
   }
}

/*
* Function changes current panel to previous one
*
* @author Adam Ludera <adam.ludera@xsolve.pl>;
* @access public
* @return void
*/
function changePanelPrevious()
{
   changePanel(-1);
}

/*
* Function changes current panel to next one
*
* @author Adam Ludera <adam.ludera@xsolve.pl>;
* @access public
* @return void
*/
function changePanelNext()
{
   changePanel(1);
}


jQuery(document).ready(function(){

	jQuery(".picture").hover(
			 function () {
				 jQuery(".leftArrow, .rightArrow").show();
			 }, 
			 function () {
				jQuery(".leftArrow, .rightArrow").hide();
			 }
		 );

 });

