var height = jQuery('#primary').height();
if(jQuery('body.home').length>0){
height = 290;
}
jQuery('html').css({opacity: 0});
jQuery('html').addClass('js');
jQuery('html').css({opacity: 1});

jQuery(document).ready(function() {

jQuery('html').addClass('ready');

  jQuery('a[rel*=external], a[data-target*=_blank]').click(function(){
    window.open(jQuery(this).attr('href'));
    return false; 
  });



jQuery('body.home .entry-content ul.services').cycle();
//jQuery('body.home .entry-content ul').css({height: '241px'});


//jQuery('#primary').animate({height: '290px', overflow: 'visible'}, {duration: 1500});
jQuery('#primary').css({height: '290px', overflow: 'hidden'});

jQuery('.spare-parts').cycle();
jQuery('body.home .entry-content ul.image-slideshow').cycle();


jQuery('.csstransitions nav a[href^=http]').click(function(event){
	event.preventDefault();
	//console.log( jQuery(event.currentTarget).attr('href') );
/*	jQuery('#primary').animate({
		height: '0'
	}, {
	duration: 1500,
	complete: function(){
		//console.log('complete!');
		jQuery(this).css({display: 'none'});
		location.href = jQuery(event.currentTarget).attr('href');
	}
	} ); */
jQuery('#primary').css({height: '0', overflow: 'hidden'});

window.setTimeout(
function(){location.href = jQuery(event.currentTarget).attr('href');},
1500
);

		
	return false;
});




});
