// JavaScript Document

$(document).ready(function () {	
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'dark_square',
		keyboard_shortcuts: false,
		social_tools:false,
		deeplinking:false
	});

	$('#slides').carouFredSel({
		pagination: "#pager",
		scroll		: {
			fx:	"fade",
			items: 1
					
			},
		auto : {
	        duration    : 1600,
	        pauseDuration: 7000,
	        pauseOnHover: false
	    }
	});
	
	$('.main-navigation li.mn-product').hover(
		function () {
			//show its submenu
			$('li.mn-product a.top-cat').addClass("active");
			$('ul', this).slideDown(300);

		}, 
		function () {
			//hide its submenu
			$('ul', this).fadeOut("100");
			//setTimeout(function() {
			$('li.mn-product a.top-cat').removeClass("active");	
			//}, 300);		
		}
	);
	
	$('.main-navigation li.mn-app').hover(
		function () {
			//show its submenu
			$('li.mn-app a.top-cat').addClass("active");
			$('ul', this).slideDown(300);

		}, 
		function () {
			//hide its submenu
			$('ul', this).fadeOut("100");
			//setTimeout(function() {
			$('li.mn-app a.top-cat').removeClass("active");	
			//}, 300);		
		}
	);
	
	$('.main-navigation li.mn-support').hover(
		function () {
			//show its submenu
			$('li.mn-support a.top-cat').addClass("active");
			$('ul', this).slideDown(300);

		}, 
		function () {
			//hide its submenu
			$('ul', this).fadeOut("100");
			//setTimeout(function() {
			$('li.mn-support a.top-cat').removeClass("active");	
			//}, 300);		
		}
	);
	
	$('.main-navigation li.mn-news').hover(
		function () {
			//show its submenu
			$('li.mn-news a.top-cat').addClass("active");
			$('ul', this).slideDown(300);

		}, 
		function () {
			//hide its submenu
			$('ul', this).fadeOut("100");
			//setTimeout(function() {
			$('li.mn-news a.top-cat').removeClass("active");	
			//}, 300);		
		}
	);
	
	$(function() {
    
            $("#tabs").organicTabs();
    
        });
		
	$(function() {
    $('.rollover').hover(function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    }, function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    });
});
		
});
