$(document).ready(function() {
    
  $("#billboard").royalSlider({
    preloadNearbyImages:true,               // Preloads two nearby images, if they have lazy loading enabled
    imageScaleMode:"none",                  // Scale mode of all images. Can be "fill", "fit" or "none"
    imageAlignCenter:true,		    // Aligns all images to slide center
    keyboardNavEnabled:false,	            // Keyboard arrows navigation
    directionNavEnabled: false,              // Direction(arrow) navigation
    directionNavAutoHide: false,            // Direction(arrow) navigation auto hide on hover. 
                                            // (On touch devices arrows are always shown)
    hideArrowOnLastSlide:false,             // Auto hide right arrow on last slide and left on first slide.
                                            // Always true for touch devices.
                                            
    slideTransitionSpeed:1000,               // Slide transition speed in ms. (1s = 1000ms)
    slideTransitionEasing:"easeInOutSine",  // Easing type for slide transition. View supported easing types
    
    controlNavEnabled: true,                // Control navigation (bullets, thumbs)  enabled
    controlNavThumbs: false,                // Use thumbs for control navigation
                                            // (use data-thumb="myThumb.jpg" attribute in html royalSlide div)
    controlNavThumbsNavigation:true,        // Enables navigation for thumbs
    controlNavThumbsSpeed:400,		    // Thumbnails navigation move speed (1000ms = 1s)
    controlNavThumbsEasing:"easeInOutSine", // Thumbnails navigation easing type
    
    slideshowEnabled: true,                // Autoslideshow enabled          
    slideshowDelay:5000,                    // Delay between slides in slideshow
    slideshowPauseOnHover: true,            // Pause slideshow on hover
    slideshowAutoStart:true,                // Auto start slideshow 
    
    welcomeScreenEnabled: false,             // Welcome (loading) screen enabled
    welcomeScreenShowSpeed:500,             // Welcome screen fade out speed
    
    minSlideOffset:20,                      // Minimum distance in pixels to show next slide while dragging    
    
    disableTranslate3d:false,               // Disables CSS3 transforms on touch devices
    
    removeCaptionsOpacityInIE8:false,       // If your animated captions with fade effect 
    					    // have no background color, so turn this option on. 
                                            // It's a fix for pixelated text bug in IE8 and lower. 
                                            // Removes fade effect animation in ie8 and lower.
                                            
    startSlideIndex: 0,			    // Start slide index (starting from 0).
    slideSpacing: 0,			    // Distance between slides in pixels.
            
    blockLinksOnDrag: true,		    // Blocks all links when dragging.
    nonDraggableClassEnabled: false,        // Prevents dragging on all elements that have 'non-draggable' class.
                                            // Works only inside slides. Turned off by default to improve performance.
    
    
    beforeSlideChange: function(){},        // Callback, triggers before slide transition
    afterSlideChange: function(){},         // Callback, triggers after slide transition	
    
    beforeLoadStart:function() {},	    // Callback, triggers before first image loading starts
    loadingComplete: function() {},         // Triggers after load complete and before welcome screen animation
    allComplete: function() {}	            // Callback, triggers after loading and welcome screen animation
  });	
  
  
  $('.element').find('img').click(function() {
  				
  				
  
  				if($(this).hasClass('zoom'))
  				{
  			        $(this).parent().parent().find('.zoom').each(function() {
  						$(this).toggleClass('zoom');
  						$(this).parent().find('.details').toggleClass('info');
  						
  			        	var tmp = $(this).attr('src');
  						$(this).attr('src', $(this).attr('rel'));	
  						$(this).attr('rel', tmp);
  			        });
  				}
  				else
  				{
  					$(this).parent().parent().find('.zoom').each(function() {
  						$(this).toggleClass('zoom');
  						$(this).parent().find('.details').toggleClass('info');
  						
  						var tmp = $(this).attr('src');
  						$(this).attr('src', $(this).attr('rel'));	
  						$(this).attr('rel', tmp);
  					});
  					
  					$(this).toggleClass('zoom');
  					$(this).parent().find('.details').toggleClass('info');
  					var tmp = $(this).attr('src');
  					$(this).attr('src', $(this).attr('rel'));	
  					$(this).attr('rel', tmp);
  				}   
  		        
  		    });
});

function initMenu() {
  $('#accordion ul').hide();
  $('#accordion li.active ul').show();
  $('#accordion li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#accordion ul:visible').slideUp('normal', function() {
            $(this).parent().removeClass('active');
          });
        checkElement.slideDown('normal', function() {
            $(this).parent().addClass('active');
          });
        
        return false;
        }
      }
    );
  
  }
