function printlimator() {
//remove conflicts with other javascript libraries
var $ = jQuery;
//like the hover function, but for mousedown state
$.fn.active = function(fn1, fn2) {
var el = this;
$(el).mousedown(fn1);
$(document).mouseup(function() {
fn2.call(el);
});
return this;
};
var history = [];
var dont = false;
$('body *:not(._print_controls, ._print_controls *)').live('click', function (e) {
if (!dont) {
e.preventDefault();
var done;
if(e.altKey) {
done = $("body *").not("._print_controls, ._print_controls *, style")
.not($(this).parents().andSelf())
.not($(this).find("*"))
.hide();
}
else done = $(this).hide();
done.addClass("_print_removed");
history.push(done);
}
}).live('mouseover', function () {
if (!dont) $(this).css('outline', '3px solid red')
}).live('mouseout', function () {
if (!dont) $(this).css('outline', 'none')
});
var controls = $('
').addClass('_print_controls').css({
position: 'fixed',
top: 25,
right: 25,
width: 162,
height: 182,
background: 'url(http://css-tricks.com/examples/ThePrintliminator/images/printliminator2.png) no-repeat',
zIndex: 10000
}).mouseover(function () {
dont = true
}).mouseout(function () {
dont = false
}).appendTo('body');
//fix IE6, which doesn't support position: fixed
if (controls.css('position') != 'fixed') {
controls.css('position', 'absolute');
}
//Remove Graphics
$('