

this.imagePreview = function(){	
		xOffset = 10;
		yOffset = 30;
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' /></p>");		 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("normal");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});
	$("a.preview").click(function(){
		return false;
	});
};

$(document).ready(function(){
        $("div.menu_item").bind("mouseenter mouseleave", function(e){
                $(this).toggleClass("menu_item_over");
        });

        $('.menu_item').click(
                function (e) {
                        document.location=$(this).parent().attr('href');
                        e.preventDefault();
                }
        );

        var work=false;
	$('#adv_top').slideshow({pauseSeconds:3,width:480,height:80,fadeSpeed:0.7,caption:false});        

        $('.btn').click(function () {
                if(!work) {
                        p_l($("a:first",this).attr("href"));
                        return false;
                }
        });
        $('.mnu_btn').hover(
                function () {
                        $(this).attr('src','/images/icons/'+this.id+'_hl.png');
                },
                function () {
                        $(this).attr('src','/images/icons/'+this.id+'.png');
                }
        );

	imagePreview();
	tb_init('a.thickbox, area.thickbox, input.thickbox');
});
