$(document).ready(function(){
  jQuery.preloadImages = function() {
     jQuery.each (arguments,function (e) {
         jQuery("<img>").attr("src", this);
     });
     return true;
  }
  $.preloadImages("/images/slide/"+img3+".png", "/images/slide/"+img4+".png");
$('HTML').addClass('JS');
if ( $("a.fancyclass").length ) {$("a.fancyclass").fancybox({
 		'zoomSpeedIn'			: 600,
 		'zoomSpeedOut'			: 500,
 		'easingIn'				: 'easeOutBack',
 		'easingOut'				: 'easeInBack'
});}

$('table.prices tr').hover(function() {
      $(this).addClass('hover');
}, function() {
      $(this).removeClass('hover');
}).click(function(){
      $(this).toggleClass('hover2');
});
 
  var stack = []; 
  var pics = new Array(img1,img2);
  while(pics.length) {
        var img = new Image(267,240);  
        img.src = '/images/slide/' + pics.pop() + '.png'; 
        $(img).bind('load', function() { 
            stack.push(this); 
        }); 
  }
  $('.slideshow').cycle({
    timeout:6000,
    speed:2000,   
    before:   onBefore 
  }); 
  function onBefore(curr, next, opts) { 
    if (opts.addSlide)
      while(stack.length) 
        opts.addSlide(stack.pop());  
  };  
});