$(document).ready(function() {
 $('.home-slideshow').append('<img src="./assets/images/home/Slide-10.jpg"/><img src="./assets/images/home/Slide-11.jpg"/><img src="./assets/images/home/Slide-2.jpg"/><img src="./assets/images/home/Slide-4.jpg"/><img src="./assets/images/home/Slide-5.jpg"/><img src="./assets/images/home/Slide-6.jpg"/><img src="./assets/images/home/Slide-7.jpg"/>');


    $('.slideshow').cycle({
		fx: 'fade',timeout:3000
	});
	
	    $('#slideshow-2').cycle({
		fx: 'fade',timeout:3000
	});
	
	 $('.home-slideshow').cycle({
		fx: 'fade',timeout:3000
	});
	
	$.localScroll();
	
	$('#menu li a').hover(
      function () {
        $(this).parent().addClass("hover");
      }, 
      function () {
        $(this).parent().removeClass("hover");
      }
    );

	$("#enquireNowButton").click(function() {
  $('#BlackLabelEventsForm').slideDown('slow');
  $('#enquireNowButton').hide();
});
	
	$('#BlackLabelEventsForm').css('display', 'none');
		
	
	$('div.event a').each(function()
   {
		var rooms = $(this).attr('data-room');
   		var roomSplit = rooms.split(',');
		var roomSpans = "";
		for (var i = 0; i < roomSplit.length; i++)
		{
			roomSpans += "<span class='"+roomSplit[i]+"'>"+roomSplit[i]+"</span>";
			if(!(i == (roomSplit.length-1)))
				roomSpans += ", ";
		}
		



      $(this).qtip(
      {	
         content: "<span class='eventName'>"+$(this).attr('data-title')+"</span><br/><span class='clientName'>"+$(this).attr('data-client')+"</span><div class='eventDate'>Date: "+$(this).attr('data-date')+"<br/>Type: "+$(this).attr('data-type')+"</div>"+roomSpans, // Use the ALT attribute of the area map
	position: {
                  corner: {
                     tooltip: 'topLeft', // Use the corner...
                     target: 'bottomRight' // ...and opposite corner
                  }
               },
			   
			   show: {
                  when: { event: 'mouseover' }, // Don't specify a show event
                  ready: false // Show the tooltip when ready
               },
               hide: { when: { event: 'mouseout' } },
			   /*
               show: {
                  when: { event: 'mouseover' }, // Don't specify a show event
                  ready: false // Show the tooltip when ready
               },
               hide: {
                  when: { event: 'mouseout' }
				  },*/ // Don't specify a hide event
               style: {
      padding: 5,
      background: '#000',
      color: '#fff',
      textAlign: 'left',
                  border: {
                     width: 0,
                     radius: 5,
					 color: '#000'
                  },
                  padding: 10, 
                  tip: true, // Give it a speech bubble tip with automatic corner detection
                  name: 'dark' // Style it according to the preset 'cream' style
               }
            });

   });
	
	// Use the each() method to gain access to each elements attributes
   $('area').each(function()
   {
      $(this).qtip(
      {
         content: "<span class='tipName'>"+$(this).attr('title')+"</span><br/>"+$(this).attr('alt'), // Use the ALT attribute of the area map
		 style: { 
      width: 140,
      padding: 5,
      background: '#000',
      color: '#fff',
      textAlign: 'left',
      border: {
         width: 0,
         radius: 0,
         color: '#000'
      },
      tip: 'bottomLeft',
      name: 'dark' // Inherit the rest of the attributes from the preset dark style
   },
   position: {
      corner: {
         target: 'topRight',
         tooltip: 'center'
      }
   }
      });
   });


   //	$(".enquire-now").colorbox({width:"50%", inline:true, href:"#example1"});
	
	
	$("a[rel='summitFoyer']").colorbox({});
	$("a[rel='summit1']").colorbox({});
	$("a[rel='summit2']").colorbox({});
	$("a[rel='summitChill']").colorbox({});
	$("a[rel='summitIce']").colorbox({});
	$("a[rel='polar']").colorbox({});

	
	
	/*$('#Scroll-Menu li a').click(function(){
$.scrollTo( this.hash, 1500, { easing:'elasout' });
return false;
}); */

});


function move_box() {
    var offset = 0; // set offset (likely equal to your css top)
    var element = document.getElementById('navigation');

    element.style.top = (document.documentElement.scrollTop + offset) + 'px';
}

