jQuery(function($){
	$('.article ul').easyListSplitter({ colNumber: 2 });
	//$('#menu_products').easyListSplitter({ colNumber: 2 });
	$("a[rel='modal']").colorbox();
	
	//Preserves the mouse-over on top-level menu elements when hovering over children
    $('#nav ul').each(function(i){
      $(this).hover(function(){
        $(this).parent().find('a').slice(0,1).addClass('active');
      },function(){
        $(this).parent().find('a').slice(0,1).removeClass('active');
      });
    });

    // IE6 Fix: Drop-down fix due to lack of support for :hover on list elements
    if($.browser.msie && ($.browser.version < 7)) {
      $('#nav').each(function(i){
        $(this).find('li').hover(function(){
          $(this).addClass('sfhover');
        },function(){
          $(this).removeClass('sfhover');
        });
      });
    }
	
	if ($('.slides_container').length)
	{
		$('#content').slides({
			preload: false,
			preloadImage: 'images/loading.gif',
			generatePagination: false,
			play: 5000,
			pause: 2500,
			hoverPause: true
		});
	}
	
	$('a[rel*=external]').attr('target','_blank');
});
