$(document).ready(function(){


	// it releases Carousel on home page
	try {
		var Swing = {
			'images': $('#swing img'),
			'timer': null,
			'position': null,
			'delay': 4000,
	
			// method poses teaser to an aimed state
			'goto': function(to){
				Swing.position = to;
				// All hide
				Swing.images.hide();
				// Aim show
				Swing.images.eq(to-1).fadeIn();
			},
			// method shifts teaser to next position
			'step': function(){
				var next = (Swing.position >= Swing.images.length) ? 1 : Swing.position+1;
				Swing.goto(next);
			},
			// method starts shifting
			'start': function(){
				Swing.timer = setInterval(Swing.step, Swing.delay);
			},
			'init': function() {
				Swing.images.hide();
				Swing.goto(1);
				Swing.start();
			}
		}
	
		if ( $('#swing img').length > 1 ) {
			Swing.init();
		}
	} catch(e) {}


	// release menu hover
	try {
		$("#nav .i").hover(
			function () {
				$(this).find('div').slideDown(250);
			},
			function () {
				$(this).find('div').slideUp(250);
			}
		);
	} catch(e) {}


});
