$(document).ready(function(){setCancelLinks();setEmptyInputs();if($('#subForm').length==1){if(findPageLanguage()=="fr"){$("#klihtk-klihtk").focus(function(){$('#subForm div.not-required:first:hidden').slideToggle();});}else{$("#ujitdy-ujitdy").focus(function(){$('#subForm div.not-required:first:hidden').slideToggle();});}}
if($("#schema").length>=1&&$.browser.msie&&$.browser.version.substr(0,1)<7){$("#schema li").mouseover(function(){$(this).css("background-position","right top").find("p:first").toggle();});$("#schema li").mouseout(function(){$(this).css("background-position","left top").find("p:first").toggle();});}
if($("#wrapper").hasClass("installations")){setInstallationSheets();}});function setEmptyInputs(){var inputs=$(".newsletter input[type=\"text\"]");inputs.each(function(){if($(this).attr("value")!=""){$(this).click(function(){return clearInput(this);});};});};function clearInput(input){$(input).attr("value","");};function setCancelLinks(){if($('.form-reset').length>=1){var triggers=$('.form-reset');triggers.each(function(){$(this).click(function(){return cancelForm(this);});});};};function cancelForm(trigger){$(trigger).parents("form")[0].reset();if($(trigger).parents("form:first").children("div.not-required:visible").length>=1){$(trigger).parents("form:first").children("div.not-required").slideToggle();}
return false;};function findPageLanguage(){var pageLanguage=$("body:first").attr("class");return pageLanguage;}
function setInstallationSheets(){$("#content div.installation").addClass("paginated").find("p.return").hide();if(window.location.hash){var hash=window.location.hash;hash=hash.replace(/#/,'');$("#content div.installation").not("#"+hash+"-sheet").hide();$("#"+hash).addClass("selected");}else{$("#sheet-switcher a:first").addClass("selected");$("#content div.installation").not(":first").hide();}
$("#sheet-switcher a").click(function(e){e.preventDefault();var newSheetId=$(this).attr("id");window.location.hash=newSheetId;$("#sheet-switcher a.selected:first").removeClass("selected");$(this).addClass("selected");$("#content div.installation:visible:first").toggle();$("#"+newSheetId+"-sheet").toggle();});}
