$(document).ready(function() {
    tooltip();
/*    if (window.ActiveXObject && !window.XMLHttpRequest) {
        var ywidth = 670;
        $(".main_left img").each(function() {
            if ($(this).width() > ywidth) {
                $(this).width(ywidth);
            }
        });
    }*/


    //$("img[original]").lazyload();
	
/*    $(".ck_re_comment ul li").hover(function() {
        $(this).addClass("li-hover")
    },
    function() {
        $(this).removeClass("li-hover")
    })*/
});



/*$(function() {
     $(this).bind("contextmenu", function(e) {
         e.preventDefault();
     });
}); */



$(function(){
	var $search = $('#search_box');
	original_val = $search.val();
	$search.focus(function(){
		if($(this).val()===original_val){
			$(this).val('');
		}
	})
	.blur(function(){
		if($(this).val()===''){
			$(this).val(original_val); 
		}
	});
});




this.tooltip = function() {
    xOffset = 10;
    yOffset = 20;
    $("a").hover(function(e) {
        this.t = this.title;
        this.title = "";
        if (this.t != '') {
            $("body").append('<span class="show-tooltip-text"><div class="inner-boundary"><p>' + this.t + '</p></div></span>');
            $(".show-tooltip-text").css("top", (e.pageY - xOffset) + "px").css("left", (e.pageX + yOffset) + "px").fadeIn("fast");
        }
    },
    function() {
        this.title = this.t;
        $(".show-tooltip-text").remove();
    });
    $(".show-tooltip a").mousemove(function(e) {
        $(".show-tooltip-text").css("top", (e.pageY - xOffset) + "px").css("left", (e.pageX + yOffset) + "px");
    });
};
