$(document).ready(function() {
	
	
	//$("#scroller").scrollable({size: 1, speed: 1500, clickable: false}).autoscroll({interval: 6000, }).circular();
	
	$(".items").jCarouselLite({
	    auto: 4000,
	    speed: 2000
	});
		
	
	$("#about.sub.floor").addClass("height");
	
	var els = $(".post_load");
	for (var i=0; i < els.length; i++) {
		el = $(els[i]);
		el.attr("src", el.attr("longdesc"));
	};
	
var cssObj = { backgroundPosition: "0 -755px" }
	if ($(window).height()> 760) { 
		  $('.footer').show();
			$('#screen').addClass('height');
			
		} else { 
		  $('.footer').fadeOut();
		   $('#screen').removeClass('height');
			$('.floor').css(cssObj)
		};

	$(window).bind("resize", function(){
		var winwidth = $(window).height();
		var cssObj = { backgroundPosition: "0 -800px" }
		var cssRevert = { backgroundPosition: "" }
		
	   if ($(window).height()> 760) { 
	   			  $('.footer').fadeIn();
				  $('#screen').addClass("height");
				  $('.floor').css(cssRevert)
	   			} else { 
	   			  $('.footer').fadeOut();
				  $('.floor').addClass("height")
				  $('#screen').removeClass('height');
				  
				  $('.floor').css(cssObj)				
	   			};
		});
   
	
	
	$('#s-navigation a').click(function () {
	  $('#s-navigation a').removeClass('selected');
	  $(this).addClass('selected');
	  var thisTarget = $(this).attr('href');  

	});
	
	$('#cl-navigation a').click(function () {
	  $('#cl-navigation a').removeClass('selected');
	  $(this).addClass('selected');
	});
	
	
	
	$(".off").click(function () { 		
	 $("#s-sections").fadeOut("fast");
	 $("#s-navigation").fadeOut("fast");
	 $("#a-sections").fadeOut("fast");
	 $("#a-navigation").fadeOut("fast");
	 $("#c-sections").fadeOut("fast");
	 $("#c-navigation").fadeOut("fast");
	 $("#cl-sections").fadeOut("fast");
	 //$("#cl-navigation").fadeOut("fast");
	 $("#clientsnew").fadeOut("fast");
	
	 $(".contact-wrapper").fadeOut("fast");
	 $(".contact-images").fadeOut("fast");
	 $(".homebody").fadeOut("fast");	
	 $(".on").fadeIn();
	 $(".off").hide();
	 	return false;
	 });
	
	
	//Turn on and off Button	 		
   	$(".on").click(function () { 
   		$("#s-sections").fadeIn("fast");
      	$("#s-navigation").fadeIn("fast");
      	$("#a-sections").fadeIn("fast");
      	$("#a-navigation").fadeIn("fast");
		$("#c-sections").fadeIn("fast");
      	$("#c-navigation").fadeIn("fast");
		//$("#cl-sections").fadeIn("fast");
      	//$("#cl-navigation").fadeIn("fast");
	    $("#clientsnew").fadeIn("fast");


		$(".contact-wrapper").fadeIn("fast");
		$(".contact-images").fadeIn("fast");
		$(".homebody").fadeIn("fast");
		$(".off").fadeIn();
		$(".on").hide();
   		return false;
	});



		$(".press").click(function () { 
	     	$(".a-company").hide();
	     	$(".a-location").hide();
	     	$(".a-staff").hide();
				$(".a-press").fadeIn();
	     		return false;
	  	});

	$(".career-home a").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poztext").fadeIn();
     		return false;
  	});

	$(".pos1").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz1text").fadeIn();
     		return false;
  	});
	


	$(".pos2").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz2text").fadeIn();
     		return false;
  	});

	$(".pos3").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz3text").fadeIn();
     		return false;
  	});

	$(".pos5").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz5text").fadeIn();
     		return false;
  	});
	$(".pos6").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz6text").fadeIn();
     		return false;
  	});
	$(".pos7").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz7text").fadeIn();
     		return false;
  	});
	$(".pos8").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz8text").fadeIn();
     		return false;
  	});
	$(".pos4").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz4text").fadeIn();
     		return false;
  	});
	$(".pos9").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz9text").fadeIn();
     		return false;
  	});
	
	$(".pos10").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz10text").fadeIn();
     		return false;
  	});
		$(".pos11").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz11text").fadeIn();
     		return false;
  	});
		$(".pos12").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz12text").fadeIn();
     		return false;
  	});
		$(".pos13").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz13text").fadeIn();
     		return false;
  	});
		$(".pos14").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz14text").fadeIn();
     		return false;
  	});
	
	$(".pos20").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz20text").fadeIn();
     		return false;
  	});
		$(".pos21").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz21text").fadeIn();
     		return false;
  	});
		$(".pos22").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz22text").fadeIn();
     		return false;
  	});
		$(".pos23").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz23text").fadeIn();
     		return false;
  	});
		$(".pos24").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz24text").fadeIn();
     		return false;
  	});
	$(".pos25").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz25text").fadeIn();
     		return false;
  	});
		$(".pos26").click(function () { 
     	$("[class*='poz']").hide();
     	$(".poz26text").fadeIn();
     		return false;
  	});
	



$('#comenu li a').click(function () {
  // Switch class="selected" for tabs
  $('#comenu li a').removeClass('selected');
  $(this).addClass('selected');

  // Assign value of the link target
  var thisTarget = $(this).attr('href');

});

$("a.dxfeet").click(function () { 
     	$("[class*='dxx']").hide();
     	$(".dxxfeettext").show();
		$(".cars").hide();
		$(".trains").hide();
		$(".dinos").hide();
		$(".feets").show();
     		return false;
});

$(".dxcar").click(function () { 
     	$("[class*='dxx']").hide();
     	$(".dxxcartext").show();
		$(".feets").hide();
		$(".trains").hide();
		$(".dinos").hide();
		$(".cars").show();
     		return false;
});

$(".dxtrain").click(function () { 
     	$("[class*='dxx']").hide();
     	$(".dxxtraintext").show();
		$(".trains").show();
		$(".feets").hide();
		$(".dinos").hide();
		$(".cars").hide();
     		return false;
});

$(".dxdino").click(function () { 
     	$("[class*='dxx']").hide();
     	$(".dxxdinotext").show();
		$(".feets").hide();
		$(".trains").hide();
		$(".dinos").show();
		$(".cars").hide();
     		return false;
});




						
						

});
