$(function() { $("a[rel=lightbox]").lightbox({ fitToScreen: true, imageClickClose: false }); // $('a[rel=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel // $('a').lightBox(); $('#m1').hover(function() { $('#m1').animate({opacity: 0.6}, 600); }, function() { $('#m1').animate({opacity: 0}, 600); }); $('#m2').hover(function() { $('#m2').animate({opacity: 0.6}, 600); }, function() { $('#m2').animate({opacity: 0}, 600); }); $('#m3').hover(function() { $('#m3').animate({opacity: 0.6}, 600); }, function() { $('#m3').animate({opacity: 0}, 600); }); $('#m4').hover(function() { $('#m4').animate({opacity: 0.6}, 600); }, function() { $('#m4').animate({opacity: 0}, 600); }); $('#datepicker_erkezes').datepicker({ showOn: 'button', buttonImageOnly: true , buttonImage: 'theme/pic/datepicker.jpg', onSelect: function(dateText, inst) { var ertek = new Array(); ertek = dateText.split('/'); $('#erkezes_ev').val(ertek[2]); $('#erkezes_ho').val(ertek[0]); $('#erkezes_nap').val(ertek[1]); } }); $('#datepicker_tavozas').datepicker({ showOn: 'button', buttonImageOnly: true , buttonImage: 'theme/pic/datepicker.jpg', onSelect: function(dateText, inst) { var ertek = new Array(); ertek = dateText.split('/'); $('#tavozas_ev').val(ertek[2]); $('#tavozas_ho').val(ertek[0]); $('#tavozas_nap').val(ertek[1]); } }); $.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; }); }; });