$(document).ready(function(){
bindSearchEnterKey();
triggerContactMeModal();
if($('span.feedbackPanelERROR').length > 0) {
showFeedbackPanel()
}
});
function bindSearchEnterKey(){
$('#search').keydown(function(e){
if (e.keyCode == 13) {

$('#go_submit').trigger('click');
return false;
}
});
}
function rebindSearchEnterKey(){
$("#search").unbind("keydown");
$("#go_submit").unbind("click");
bindSearchEnterKey();
}
function showFeedbackPanel(){
$('#feedbackPanel').show();
$('#feedbackPanel').fadeOut(10000);
}
function closeFeedbackPanel(){
$('#feedbackPanel').hide();
}
function triggerContactMeModal(){

var triggers = $('a.jqm,area.jqm');







$('#contactForm').jqm({
trigger: triggers,
target: 'div.contactContent',
overlay: 0
});

if ($.browser.msie) {
$('div.contact.jqmClose').hover(function(){
$(this).addClass('jqmCloseHover');
}, function(){
$(this).removeClass('jqmCloseHover');
});
}
}
function showPleaseWaitModal(trigger){
$('#pleaseWaitModal').show();
}
function closePleaseWaitModal(){
$('#pleaseWaitModal').hide();
}
function closeContactMePanel(){
$('#contactForm').hide();
}
function swapImage(obj, img){
obj = $('#' + obj.id)[0];
obj.src = img;
}
