
$(document).ready(function(){


	// 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;
  
  $('#nav_sub li, #menu 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).css('opacity', 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(600, 1);
      }, function () {
        // off hover
        
        // again, stop any animations currently running, and fade out
        $span.stop().fadeTo(600, 0);
      });
    });


						   	
	$("#slider_index").cycle({
		fx: 'fade',
		next:   '#slider_index',
		pager: '#slider_nav',
		timeout: 8000,
		cleartypeNoBg: true,
		delay: -1000
	});
	
	$("#gallery_slider").cycle({
		fx: 'fade',
		next:   '#gallery_slider',
		pager: '#gallery_slider_nav',
		timeout: 3000,
		delay: -1000
	});
	
	
	$(".modal").colorbox({width:"720px", height:"520px", iframe:true, opacity:0.5});
	$(".iframe").colorbox({width:"80%", height:"80%", iframe:true, opacity:0.5});
	$(".colorchart").colorbox({width:"90%", height:"90%", iframe:true, opacity:0.5});	
	$(".productframe").colorbox({width:"840px", height:"80%", iframe:true, opacity:0.5});	
	
	
	$("a[rel='gallery1']").colorbox({ opacity: 0.5, title: function(){
    	var product = $(this).attr('alt');
    		return ''+product+'';
	}});
	
	
	
});


	
	

