//
// DOM LOAD FUNCTIONS

// add class to show js enabled (all javascript ENABLED css styles can be prepended with html.js, all javascript DISABLED css styles can be prepended with html.no-js)
$('html').removeClass('no-js').addClass('js');

$(function(){

	$("a[rel='external']").addClass("external").click( function() { window.open( $(this).attr('href') ); return false; } );

	// add hover class to buttons (and other elements) for easier css styling
	$("#body-homePage #right-col li,#body-portfolioPage #content li, #skywire-client-feed .feed-row")
		.live('mouseenter', function() {
			$(this).addClass('hover');
		})
		.live('mouseleave', function() {
			$(this).removeClass('hover');
		});

	$('#body-homePage #right-col').cycle({
		fx:    'fade',
		speed:  10000
	});

	$('#body-homePage #skywire-other-news ul').cycle({
		fx:    'fade',
		speed:  5000
	});

	// windows detection for navigation to fix margin
	if ($.client.os == "Windows") {
		$('#body-homePage #navigation').addClass('reduce');
		$('#body-homePage #n-contact').addClass('last');
	}

});
