function checker(dname) { if ( $('#' + dname).is(':checked')) { $('#' + dname).prop('checked',false); } else { $('#' + dname).prop('checked',true); } } function checker2(dname) { if ( $('#' + dname).attr('checked')) { $('#' + dname).prop('checked',false); } else { $('#' + dname).prop('checked',true); } } $(document).ready(function() { $("a.group").fancybox({ openEffect : 'elastic', closeEffect : 'elastic', openSpeed : 'fast', closeSpeed : 'fast', openOpacity : false, closeOpacity: false, helpers : { title : { type : 'inside' } } }); $("#various5").fancybox({ type : 'iframe' }); $(".popup").fancybox({ type : 'iframe' }); $("img.[title]").tooltip({ tipClass: "tooltip", effect: "slide" }); $("a.[title]").tooltip({ tipClass: "tooltip", effect: "slide" }); $("span.[title]").tooltip({ tipClass: "tooltip", effect: "slide" }); $("div.[title]").tooltip({ tipClass: "tooltip", effect: "slide" }); $("td.[title]").tooltip({ tipClass: "tooltip", effect: "slide" }); (function($) { if (!$) { window.console && console.log("Checkbox Replacement: jQuery not found"); return; } // Replace the checkboxes // source: http://blog.gatherage.com/jquery-checkbox-replacement $(function() { function changeHandler() { var obj = $(this), isChecked = obj.is(":checked"); // IE runs this handler more than once per click, so we need to explicitly // set the classes instead of toggling them obj. prev(). addClass(isChecked ? "checkboxChecked" : "checkboxUnchecked"). removeClass(isChecked ? "checkboxUnchecked" : "checkboxChecked"); } var checkboxes = $(":checkbox").not(".checkboxReplaced").addClass("checkboxReplaced").each(function() { var obj = $(this); obj.before( $(document.createElement("span")). addClass("checkbox checkboxBlurred " + (obj.is(":checked") ? "checkboxChecked" : "checkboxUnchecked")). click(function() { if (obj.is(":checked")) { obj.removeAttr("checked"); } else { obj.attr("checked", "checked"); } obj.focus(); changeHandler.apply(obj); })); }). change(changeHandler). blur(function() { // The blur and focus handlers simply toggled the classes before IE... Now // they are broken into two separate handlers to avoid race conditions. $(this).prev().removeClass("checkboxFocused").addClass("checkboxBlurred"); }). focus(function() { $(this).prev().removeClass("checkboxBlurred").addClass("checkboxFocused"); }); }); })(window.jQuery); });