if(typeof (IXIGO)=="undefined"){IXIGO={}}IXIGO.Feedback=function(){this.MAX_COMMENT_LENGTH=500;var A=null;
this.init=function(){if($("#form").length>0){A=this;$("#charactersLeft").html(this.MAX_COMMENT_LENGTH);
$("#commentMaxChars").html(this.MAX_COMMENT_LENGTH);if($("#form\\:howYouHeard").val()=="other"){$("#otherText").show()
}$("#form\\:howYouHeard").change(function(B){A.checkOther(B)});$("#form\\:commentBox").keyup(function(B){A.checkLength(B)
}).change(function(B){A.checkLength(B)});$("#commentType").click(function(){A.showHelp()});$("#form\\:feedbackConcern").change(function(){A.changeHelp()
});$("#form\\:referrer").val(document.referrer);if(this.getParameters("type")=="pricing"){$("#form\\:typeOfComment\\:2").click()
}}};this.checkLength=function(C){var D=($.browser.msie)?C.target:C.currentTarget;var B=D.value;var F=B.length;
if(F>=this.MAX_COMMENT_LENGTH){F=this.MAX_COMMENT_LENGTH;C.stopPropagation();D.value=B.substr(0,this.MAX_COMMENT_LENGTH)
}var E=this.MAX_COMMENT_LENGTH-F;$("#charactersLeft").html(""+E)};this.changeHelp=function(){if($("#form\\:feedbackConcern").val()==="flights"){$("#bugHelp").html("please help us by giving details of your search including date, time of travel and flight name to help us narrow down on your problem.")
}else{if($("#form\\:feedbackConcern").val()==="hotels"){$("#bugHelp").html("please help us by giving details of your search including date of travel and hotel name to help us narrow down on your problem.")
}else{if($("#form\\:feedbackConcern").val()==="buses"){$("#bugHelp").html("please help us by giving details of your search including date, time of travel and bus name to help us narrow down on your problem.")
}else{if($("#form\\:feedbackConcern").val()==="mobile"){$("#bugHelp").html("please help us by giving details of your search including date, time of travel and flight/hotel name to help us narrow down on your problem.")
}else{$("#bugHelp").html("please help us by giving details of your search including date/time of travel and flight/hotel/bus name to help us narrow down on your problem.")
}}}}};this.showHelp=function(){if($("#form\\:typeOfComment\\:1").attr("checked")||$("#form\\:typeOfComment\\:2").attr("checked")){$("#bugHelp").show();
A.changeHelp()}else{$("#bugHelp").hide()}};this.checkOther=function(B){var D=($.browser.msie)?B.target.value:B.currentTarget.value;
var C=$("#otherText");if(D=="other"){C.show().focus()}else{C.val("").hide()}};this.getParameters=function(C){C=C.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var B="[\\?&]"+C+"=([^&#]*)";var E=new RegExp(B);var D=E.exec(window.location.href);if(D==null){return""
}else{return D[1]}}};$(document).ready(function(){var A=new IXIGO.Feedback();A.init()});