$(document).ready(function(){

//Input
$('input[title]').example(function() {
return $(this).attr('title');
});

//Right click
//$(document).bind("contextmenu",function(e){
//return false;
//});
//IE bugs
if ($.browser.msie) {
$('hr').wrap('<div class="hr"></div>');
}

//IE6 nonsense
var version = jQuery.browser.version;
if (version instanceof Object)
version=version.number();

if (jQuery.browser.msie&&version<7) {
$('form input.login').attr("value","");
$('form input.search').attr("value","");
$('form input.contact').attr("value","");
}

});

function txtSize(nameEmt) {
minLen=8;
maxLen=15;
txtLen=document.getElementById(nameEmt).value.length;
if(txtLen>minLen&&txtLen<maxLen) {
document.getElementById(nameEmt).style.width=txtLen+'em';
}else if(txtLen<=minLen) {
document.getElementById(nameEmt).style.width=minLen+'em';
}}

function limitC(textid,limit,infodiv){
var text=$('#'+textid).val();
var textlength=text.length;
if(textlength>=limit){
$('#'+textid).val(text.substr(0,limit));
$('.'+infodiv).html('<strong>'+limit+' / '+limit+'</strong>');
return true;
}else{
$('.'+infodiv).html(textlength+' / '+limit);
return false;
}}
