jQuery(function() { jQuery('input[type=file].contact-attach-file').filestyle({ image: applicationPath + '/Files/images/' + localizedImagesFolder + 'btn-browse.gif', imageheight : 20, imagewidth : 61, width : 261 }); jQuery('input[type=file].contact-attach-file').focus(function(){ jQuery('.file-upload-input div').addClass('bordered'); }).blur(function(){ jQuery('.file-upload-input div').removeClass('bordered'); }); }); jQuery.noConflict(); jQuery(function(){ if (jQuery('.preference-area textarea').text() == ''){ jQuery('#FakehtbPrefer').show(); jQuery('.preference-area textarea').hide(); jQuery('#FakehtbPrefer').focus( function(){ jQuery('#FakehtbPrefer').hide(); jQuery('.preference-area textarea').show(); jQuery('.preference-area textarea').focus(); });} }); jQuery(function(){ jQuery('div.file-upload-input div').hover( function(){ jQuery(this).addClass('hover'); }, function(){ jQuery(this).removeClass('hover'); }); }); jQuery(function(){ jQuery(".button-send").hover(function(){ jQuery(this).addClass("hover"); },function(){ jQuery(this).removeClass("hover"); }); }); /* * Style File - jQuery plugin for styling file input elements * * Copyright (c) 2007-2008 Mika Tuupola * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * * Based on work by Shaun Inman * http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom * * Revision: $Id: jquery.filestyle.js 303 2008-01-30 13:53:24Z tuupola $ * */ (function($) { $.fn.filestyle = function(options) { /* TODO: This should not override CSS. */ var settings = { width : 250 }; if(options) { $.extend(settings, options); }; return this.each(function() { var self = this; var wrapper = $("
") .css({ "width": settings.imagewidth + "px", "height": settings.imageheight + "px", "background": "url(" + settings.image + ") 0 0 no-repeat", "background-position": "right", "display": "inline", "position": "absolute", "overflow": "hidden" }); var filename = $('') .addClass($(self).attr("class")) .css({ "display": "inline", "width": settings.width + "px" }); $(self).before(filename); $(self).wrap(wrapper); $(self).css({ "position": "relative", "height": settings.imageheight + "px", "width": settings.width + "px", "display": "inline", "cursor": "pointer", "opacity": "0.0" }); if ($.browser.mozilla) { if (/Win/.test(navigator.platform)) { $(self).css("margin-left", "-142px"); } else { $(self).css("margin-left", "-168px"); }; } else { $(self).css("margin-left", settings.imagewidth - settings.width + "px"); }; $(self).bind("change", function() { filename.val($(self).val()); }); }); }; })(jQuery); (function($) { $(function(){ contactInputs = $('.item-inputs input').not('input[type=file]'); if ($.browser.msie || $.browser.opera) { $(contactInputs).keydown (checkForContactEnter); $(contactInputs).keypress ( function() { // Opera is fun } ); } else { $(contactInputs).keypress (checkForContactEnter); } function checkForContactEnter (event) { if (event.keyCode == 13){ if ($.browser.opera){ $('form').submit(function(){ return false; }); } event.preventDefault(); $('.contact-form1 input.button-send').click(); return false; } } }); }) (jQuery); jQuery.fn.maxlength = function(options) { var settings = jQuery.extend({ maxChars: 10 }, options); return this.each(function() { var me = jQuery(this); var l = settings.maxChars; me.bind('keydown keypress keyup',function(e) { if(me.val().length>settings.maxChars) me.val(me.val().substr(0,settings.maxChars)); }); }); }; jQuery(function(){ jQuery("textarea").maxlength({ maxChars: 1000 }); jQuery('.captcha-section input').attr('tabIndex', '12'); }); (function($) { $(function(){ if ($('.advertisement-source select').val() == 5){ $('.advertisement-source .custom-advertisement-source').show(); } else{ $('.advertisement-source .custom-advertisement-source').hide(); } $('.advertisement-source select').change( function() { if ($('.advertisement-source select').val() == 5){ $('.advertisement-source .custom-advertisement-source').show(); } else{ $('.advertisement-source .custom-advertisement-source').hide(); } }); }); }) (jQuery);