var open = false;
var contact_height = 383;
var hidden = true;

function openRemoteSupport() {
	if (open == false) {
		(function ($) {
			$('#contact_tab').css('display', 'none');
			$('#contact_window').animate({ top : 0}, 500);
	        $('#darkbackground').css('display', 'block');
	        $('#darkbackground').animate({ opacity : '0.2'}, 'swing');
	        open = true;
        })(jQuery);
    };
}
function closeRemoteSupport() {
	(function ($) {
	    $('#contact_window').animate({ top : (contact_height * -1)}, 500, 'swing');
	    $('#darkbackground').animate({ opacity : '0'}, function(){
	    	$('#darkbackground').css('display', 'none');
	    	$('#contact_tab').css('display', 'block');
	    });
	    open = false;
	})(jQuery);
}

$(document).ready(function(){
    (function ($) {
        $('#contact_tab').hover(function() {
            $(this).css('cursor','pointer');
            }, function() {
            $(this).css('cursor','auto');
        });
        $('#contact_tab').click(function() {
            openRemoteSupport();
        });
        $('#formCancel').click(function() {
			closeRemoteSupport();
        });
        
        $('#hidden').click(function()
   			{
			if (hidden) {
	    		$('#copyme').css('display', 'block');
	   			hidden = false;
			} else {
	    		$('#copyme').css('display', 'none');
	    		hidden = true;
			};
    	});
      })(jQuery);
});
$(window).load(function(){
    (function ($) {
    		$('#subhero_web').nivoSlider({
        		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        		slices:1,
        		animSpeed:500, //Slide transition speed
        		pauseTime:5000,
        		startSlide:0, //Set starting Slide (0 index)
        		directionNav:false, //Next & Prev
        		controlNav:false, //1,2,3...
        		keyboardNav:false //Use left & right arrows
    		});
    		$('#subhero_software').nivoSlider({
        		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        		slices:1,
        		animSpeed:500, //Slide transition speed
        		pauseTime:8000,
        		startSlide:0, //Set starting Slide (0 index)
        		directionNav:false, //Next & Prev
        		controlNav:false, //1,2,3...
        		keyboardNav:false //Use left & right arrows
    		});
    		$('#subhero_support').nivoSlider({
        		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        		slices:1,
        		animSpeed:500, //Slide transition speed
        		pauseTime:7000,
        		startSlide:0, //Set starting Slide (0 index)
        		directionNav:false, //Next & Prev
        		controlNav:false, //1,2,3...
        		keyboardNav:false //Use left & right arrows
    		});
    		$('#subhero_design').nivoSlider({
        		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        		slices:1,
        		animSpeed:500, //Slide transition speed
        		pauseTime:6000,
        		startSlide:0, //Set starting Slide (0 index)
        		directionNav:false, //Next & Prev
        		controlNav:false, //1,2,3...
        		keyboardNav:false //Use left & right arrows
    		});
	})(jQuery);
	
});
