/**  Javascript file for Firefox browsers
*   
*   General javascript code for touch-innovation.com
*
* Dependencies:
*   jQuery
*   JFlow
*   Easing
*   Dimensions
*
*   Created by 
*       Ezra(ezra@tsdme.nl)
*       Nathan Brenninkmeyer
*
*   DO NOT USE THIS CODE WITHOUT PRIOR CONSENT
*/
 function insertemote(code){
	$('#commentsbox').val($('#commentsbox').val()+code);
 }
$(document).ready(function(){
 if (screen.height	 < 600)
     {
	 location.href='http://www.mobile.touch-innovation.com'
	 }
  $("#menu").css("width", "45px").css("marginLeft", "110px");
  $("#hTxt").hide();
  $("#vTxt").show();
  

	
  window.setTimeout(function(){
    $("#menu").animate({
      width: "170px",
      marginLeft: "20px"
    },1000,"easeOutBounce",function(){
      $("#hTxt").show();
      $("#vTxt").hide();
    });
  },400);

  $(".message_box_ok:hidden:first").fadeIn(1000);
  window.setTimeout('$(".message_box_ok").fadeOut(6000);', 2000);	      
  $(".message_box_error:hidden:first").fadeIn(1000);
  window.setTimeout('$(".message_box_error").fadeOut(6000);', 2000);		  
    
  //window.setTimeout(scroll, 100);
		
  $("#latest_subs").jFlow({
    slides: "#latest_s",
    controller: ".Left_right", // must be class, use . sign
    slideWrapper : "#jFlowSlide", // must be id, use # sign
    selectedWrapper: "jFlowSelected",  // just pure text, no sign
    width: "100%",
    height: "109px",
    duration: 400,
    prev: ".jFlowPrev", // must be class, use . sign
    next: ".jFlowNext" // must be class, use . sign
  });
});

function scroll(){
  var pageScrl = $(document).scrollTop();
  $('#menu').animate({
    marginTop: pageScrl+30
  },500, '' ,function(){
    window.setTimeout(scroll, 50);
  });
}