$(function() { $.fn.clearForm = function() { return this.each(function() { var type = this.type, tag = this.tagName.toLowerCase(); if (tag == 'form') return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; $('#m1').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m2').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m3').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m4').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m5').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m6').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m7').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m8').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); $('#m9').hover(function() { $(this).animate({opacity: 1}, 550); }, function() { $(this).animate({opacity: 0}, 350); }); var theInt = null; var $crosslink, $navthumb; var curclicked = 0; theInterval = function(cur){ clearInterval(theInt); if( typeof cur != 'undefined' ) curclicked = cur; $crosslink.removeClass("active-thumb"); // $navthumb.eq(curclicked).parent().addClass("active-thumb"); $navthumb.eq(curclicked).addClass("active-thumb"); $(".stripNav ul li a").eq(curclicked).trigger('click'); theInt = setInterval(function(){ $crosslink.removeClass("active-thumb"); // $navthumb.eq(curclicked).parent().addClass("active-thumb"); $navthumb.eq(curclicked).addClass("active-thumb"); $(".stripNav ul li a").eq(curclicked).trigger('click'); curclicked++; if( 4 == curclicked ) curclicked = 0; }, 5000); }; $(function(){ $("#main-photo-slider").codaSlider(); $navthumb = $("a.nav-thumb"); $crosslink = $("a.cross-link"); $navthumb .click(function() { var $this = $(this); theInterval($this.parent().attr('href').slice(1) - 1); return false; }); theInterval(); }); $('#tabs').tabs({selected:0}); }); function hirlevel() { document.location.href='/hirlevel/uj/'+$('#hirlevelcim').val(); }