jQuery.noConflict();
(function($) { 
  $(function() {
    // more code using $ as alias to jQuery
    
    $(document).ready
    (
    	function()
    	{ 
            //console.log($("#scrollBox .scroll_box").size());
            if($("#scrollBox .scroll_box").size()>1)     
            {
                // initialize scrollable
                $("#scrollBox").scrollable({         
                    size: 1,         
                    items: '#scrollItem',  
                    clickable: false,         
                    hoverClass: 'hover',
                    keyboard: false
                });
            }
            else
            {
                $("#main_middle .prev").addClass('hide');
                $("#main_middle .next").addClass('hide');
            }
            
            
            
            
            $("#hideContent").click(function(){
                $("#container").fadeOut('slow');
                $("#showContent").show();
            });
            initToolBox("#hideContent", 150);
            
            $("#showContent").click(function(){
                $("#container").fadeIn('slow');
                $("#showContent").hide();
            });
            //initToolBox("#showContent", 150);
            
    	}
    );
    
  });
})(jQuery);


function initToolBox( elTool , elWidth  )
{
    
    var textVal = jQuery(elTool+' span').text();
    jQuery(elTool).qtip(
    {
       content: textVal,
       style: { 
          width: elWidth,
          padding: 3,
          background: '#000000',
          color: '#ffffff',
          textAlign: 'center',
          border: {
             width: 2,
             radius: 3,
             color: '#000000'
          },
          tip: 'leftMiddle',
          name: 'dark' // Inherit the rest of the attributes from the preset dark style
       },
       position: { 
           corner: { 
              target: 'rightMiddle', 
              tooltip: 'leftMiddle' 
           }
       }
    }); 
}

