function isIE(version){if($.browser.msie&&parseInt($.browser.version)==version){return true;}else{return false};}window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console)console.log(Array.prototype.slice.call(arguments));};(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info, log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});(function($){$.fn.linkExternal=function(){$(this).each(function(i,obj){var href=$(obj).attr('href');var host=(location.host).replace('www.','');if(href&&href.indexOf('http')==0&&!$(obj).children().get(0)){if(href.indexOf('http://'+host)==-1&&href.indexOf('http://www.'+host)==-1&&href.indexOf('https://www.'+host)==-1){$(obj).addClass('external')}}});return $(this);}
$.fn.autoClear=function(){$(this).each(function(){$(this).attr("defaultvalue",$(this).attr("value"));});$(this).bind('focus',function(){if($(this).attr("value")==$(this).attr("defaultvalue")){$(this).attr("value","").addClass('autoclear-normalcolor');}}).bind('blur',function(){if($(this).attr("value")==""){$(this).attr("value",$(this).attr("defaultvalue")).removeClass('autoclear-normalcolor');}});return $(this);}
$.fn.formsWidthNormalize=function(){if($.browser.msie&&$.browser.version<7){$("select.form-weight-normal").each(function(i,obj){var normPadding=Math.ceil(Number(String($(obj).css("padding-left")).slice(0,-2)))+Math.ceil(Number(String($(obj).css("padding-right")).slice(0,-2)));var normBorder=Math.ceil(Number(String($(obj).css("border-left-width")).slice(0,-2)))+Math.ceil(Number(String($(obj).css("border-right-width")).slice(0,-2)));var normWidth=Math.ceil(Number($(obj).width()))+normPadding+normBorder*2;$(obj).width(normWidth);});}else{$("input[type=text].form-weight-normal, input[type=password].form-weight-normal, textarea.form-weight-normal").each(function(i,obj){var normPadding=Math.ceil(Number(String($(obj).css("padding-left")).slice(0,-2)))+Math.ceil(Number(String($(obj).css("padding-right")).slice(0,-2)));var normWidth=Math.ceil(Number($(obj).width()))-normPadding;$(obj).width(normWidth);});$("select.form-weight-normal").each(function(i,obj){var normPadding=Math.ceil(Number(String($(obj).css("padding-left")).slice(0,-2)))+Math.ceil(Number(String($(obj).css("padding-right")).slice(0,-2)));var normBorder=Math.ceil(Number(String($(obj).css("border-left-width")).slice(0,-2)))+Math.ceil(Number(String($(obj).css("border-right-width")).slice(0,-2)));if($.browser.msie&&$.browser.version<8){var normWidth=Math.ceil(Number($(obj).width()))+normPadding+normBorder*2;}else{var normWidth=Math.ceil(Number($(obj).width()))+normPadding+normBorder;}$(obj).width(normWidth);});}return $(this);}})(jQuery)