var speed = 500 /* Defines the animation speed in milliseconds (1000 = 1sec) */


$(document).ready(function(){

	// Calling our splashScreen plugin and
	// passing an array with images to be shown
	
  
  // IE6 doesn't handle the fade effect very well - so we'll stick with
  // the default non JavaScript version if that is the user's browser.
  if ($.browser.msie && $.browser.version < 7) return;
  
  $('ul#nav_main li')
  
    // remove the 'highlight' class from the li therefore stripping 
    // the :hover rule
    .removeClass('highlight')
    
    // within the context of the li element, find the a elements
    .find('a')
    
    // create our new span.hover and loop through anchor:
    .append('<span class="hover" />').each(function () {
      
      // cache a copy of the span, at the same time changing the opacity
      // to zero in preparation of the page being loaded
      var $span = $('> span.hover', this).fadeTo(speed, 0);
      
      // when the user hovers in and out of the anchor
      $(this).hover(function () {
        // on hover
        
        // stop any animations currently running, and fade to opacity: 1
        $span.stop().fadeTo(speed, 1);
      }, function () {
        // off hover
        
        // again, stop any animations currently running, and fade out
        $span.stop().fadeTo(speed, 0);
      });
    });
    
    $("#slider").easySlider({
				auto: true, 
				continuous: true,
				numeric: true,
				speed: 600,
				pause: 5000,
			});
	
	$(".iframe").colorbox({width:"80%", height:"80%", iframe:true, opacity:0.7});
	$(".modal").colorbox({width:"720px", height:"600px", iframe:true, opacity:0.7});
	$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:385, opacity:0.7});
	
	
	$('div.read_more').hide();
	
	$('p.click_more').toggle(function () {
        	$(this).addClass("less");
        	$(this).next('.read_more').show(speed);
		},function () {
        	$(this).removeClass("less");
        	$(this).next('.read_more').hide(speed);
      });
    
});
