// Javascript document
jQuery.noConflict();
(function($) { 
  $(function() {
   $(document).ready(function(){
   		// Slider select sisteme ----------------------
   		maxSisteme=75;
		$('#slider').html("").slider({
			stop: function (event,ui) { 
				var tempVal= Math.floor(maxSisteme * $(this).slider( "option", "value" ) / 100 );
				if (tempVal <= 1) { tempTxt = "1 sistem";}
				else if (tempVal >= 50) { tempTxt = "peste 50 sisteme";}
				else { tempTxt = tempVal + " sisteme";}
				$('#numarSisteme').html(tempTxt);
				$('.slideContent').animate({
					"left": - Math.floor(tempVal / 25) * 780 + "px"
				});
			},
			slide: function(event, ui) {  
				var tempVal= Math.floor(maxSisteme * $(this).slider( "option", "value" ) / 100 );
				if (tempVal <= 1) { tempTxt = "1 sistem";}
				else if (tempVal >= 50) { tempTxt = "peste 50 sisteme";}
				else { tempTxt = tempVal + " sisteme";}
				$('#numarSisteme').html(tempTxt);
			}
		});
		//-------------
		
		//Hover boxRounded2 ----------------------------
		defaultColor = "#8a8b85";
		$('.boxRounded2').hover (
		function() {
			myColor = $(this).attr('hover');
			myColor = ((myColor == "") || (myColor ==undefined)) ? defaulColor : myColor;
 			$(this).css({
				'background-color':myColor
			});
		},
		function () {
			$(this).css({
				'background-color':defaultColor
			});
		});
		$('.boxRounded2').click(function () {
			window.location = $(this).find('.target:eq(0)').attr('href');
			return false;
		});
		//-------------
		
		//Right hidden Bar show and hide --------------------------
		controlHoldingDivOriginalHtml  = $('#controlHiddenRightContent').html();
		$('#controlHiddenRightContent').click(function () {
			holdingDiv = $('#hiddenRightBar');
			if (holdingDiv.css('display') == 'none') {
				holdingDiv.slideDown();
				$(this).html('ascunde');
				$('#logo').animate({
				    "margin-left" : "0px"
				});
				$('#quercusholder').slideDown();
			} else  {
				holdingDiv.slideUp();
				$(this).html(controlHoldingDivOriginalHtml);	
				$('#logo').animate({
				    "margin-left" : "10px"
				});
				$('#quercusholder').slideUp();
			}
			return false;
		});
		//-------------
		
	});
  });
})(jQuery);

