var qTipTag="a,label,input,span,img,textarea,cite",qTipX=9,qTipY=9;tooltip={name:"qTip",offsetX:qTipX,offsetY:qTipY,tip:null}; tooltip.init=function(){if(!a)var a="qTip";var b=document.getElementById(a);b||(b=document.createElementNS?document.createElementNS("http://www.w3.org/1999/xhtml","div"):document.createElement("div"),b.setAttribute("id",a),document.getElementsByTagName("body").item(0).appendChild(b));if(document.getElementById){if(this.tip=document.getElementById(this.name))document.onmousemove=function(a){tooltip.move(a)};for(var c,d=qTipTag.split(","),f=0;f<d.length;f++)if(c=document.getElementsByTagName(d[f]))for(var g= 0;g<c.length;g++)if(a=c[g],b=a.getAttribute("title"))a.setAttribute("tiptitle",b),a.removeAttribute("title"),a.removeAttribute("alt"),a.onmouseover=function(){tooltip.show(this.getAttribute("tiptitle"))},a.onmouseout=function(){tooltip.hide()}}}; tooltip.move=function(a){var b=0,c=0;document.all?(b=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,c=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,b+=window.event.clientX,c+=window.event.clientY):(b=a.pageX,c=a.pageY);this.tip.style.left=b+this.offsetX+"px";this.tip.style.top=c+this.offsetY+"px"}; tooltip.show=function(a){if(this.tip)this.tip.innerHTML=a,this.tip.style.display="block"};tooltip.hide=function(){if(this.tip)this.tip.innerHTML="",this.tip.style.display="none"};window.onload=function(){tooltip.init()};function collapsElement(a){document.getElementById(a).style.display!="none"?document.getElementById(a).style.display="none":document.getElementById(a).style.display=""}var url=baseurl+"/thumb/",timers=[],images=[],thumbs=7; function changeThumb(a,b){document.getElementById(a).src=b} $(document).ready(function(){$("img[id*='rotate_']").mouseover(function(){for(var a=$(this).attr("id"),b=a.split("_"),b=b[1],c=1;c<=thumbs;c++){var d=url+"/"+c+"_"+b+".jpg";images[c]=new Image;images[c].src=d}for(c=1;c<=thumbs;c++)timers[c]=setTimeout("changeThumb('"+a+"','"+url+"/"+c+"_"+b+".jpg')",c*500)}).mouseout(function(){for(var a=$(this).attr("id"),a=a.split("_"),a=a[1],b=1;b<=thumbs;b++)typeof timers[b]=="number"&&clearTimeout(timers[b]);$(this).attr("src",url+"/1_"+a+".jpg")})}); var post_timers=[];function destroy(a){$(a).fadeOut()}function user_posting(a,b,c){$(a).html(b);$(a).fadeIn();typeof c=="undefined"&&(typeof post_timers[0]=="number"&&clearTimeout(post_timers[0]),post_timers[0]=setTimeout("destroy('"+a+"')",3500))}function user_response(a,b){$(a).removeClass().addClass("response");$(a).html(b);$(a).fadeIn();typeof post_timers[0]=="number"&&clearTimeout(post_timers[0]);post_timers[0]=setTimeout("destroy('"+a+"')",3500)} function reset_chars_counter(){$("#chars_left").html("500")} $(document).ready(function(){$("ul#topnav li").hoverIntent({sensitivity:4,interval:0,over:function(){$(this).find(".sub").stop().fadeTo("fast",1).show();(function(a){jQuery.fn.calcSubWidth=function(){rowWidth=0;a(this).find("ul").each(function(){rowWidth+=a(this).width()})}})(jQuery);if($(this).find(".row").length>0){var a=0;$(this).find(".row").each(function(){$(this).calcSubWidth();rowWidth>a&&(a=rowWidth)});$(this).find(".sub").css({width:a});$(this).find(".row:last").css({margin:"0"})}else $(this).calcSubWidth(), $(this).find(".sub").css({width:rowWidth})},timeout:50,out:function(){$(this).find(".sub").stop().fadeTo("fast",0,function(){$(this).hide()})}});$("a[id*='likes_']").click(function(a){a.preventDefault();var b=$(this).attr("id").split("_"),a=b[1],b=b[2];$("#info_content_hide").hide();$("#ajax_container").hide();$("#post_report").hide();$.post(baseurl+"ajax.php?m=like_"+a,{item_id:b},function(a){a.status==0?user_posting("#response_message",a.msg):(user_response("#response_message",a.msg),$("#fright").hide(), $("#response_ratings").show(),$("#response_ratings").html(a.code))},"json")});$("a[id*='unlike_']").click(function(a){a.preventDefault();var b=$(this).attr("id").split("_"),a=b[1],b=b[2];$("#info_content_hide").hide();$("#ajax_container").hide();$("#post_report").hide();$.post(baseurl+"ajax.php?m=unlike_"+a,{item_id:b},function(a){a.status==0?user_posting("#response_message",a.msg):(user_response("#response_message",a.msg),$("#fright").hide(),$("#response_ratings").show(),$("#response_ratings").html(a.code))}, "json")});$("a[id*='mlikes_']").click(function(a){a.preventDefault();var a=$(this).attr("id").split("_"),b=a[2];$.post(baseurl+"ajax.php?m=mlike_"+a[1],{item_id:b},function(a){a.status==0?user_posting("#response_message_"+b,a.msg):(user_response("#response_message_"+b,a.msg),$("#rating_"+b).hide(),$("#response_ratings_"+b).show(),$("#response_ratings_"+b).html(a.code))},"json")});$("a[id*='munlike_']").click(function(a){a.preventDefault();var a=$(this).attr("id").split("_"),b=a[2];$.post(baseurl+ "ajax.php?m=munlike_"+a[1],{item_id:b},function(a){a.status==0?user_posting("#response_message_"+b,a.msg):(user_response("#response_message_"+b,a.msg),$("#rating_"+b).hide(),$("#response_ratings_"+b).show(),$("#response_ratings_"+b).html(a.code))},"json")});$("a[id*='favorite_']").click(function(a){a.preventDefault();var b=$(this).attr("id").split("_"),a=b[1],b=b[2];$("#info_content_hide").hide();$("#ajax_container").hide();$("#post_report").hide();$.post(baseurl+"ajax.php?m=favorite_"+a,{item_id:b}, function(a){a.status==0?user_posting("#response_message",a.msg):user_response("#response_message",a.msg)},"json")});$("a[id*='mfavorite_']").click(function(a){a.preventDefault();var a=$(this).attr("id").split("_"),b=a[2];$.post(baseurl+"ajax.php?m=mfavorite_"+a[1],{item_id:b},function(a){a.status==0?user_posting("#response_message_"+b,a.msg):user_response("#response_message_"+b,a.msg)},"json")});$("textarea[id*='_comment']").keyup(function(){var a=$(this).attr("id"),a=500-$("textarea[id='"+a+"']").val().length; a<0&&(a=0);$("span[id='chars_left']").html(a)});$("#info_video").click(function(a){a.preventDefault();$("#post_report").hide();$("#ajax_container").hide();$("#info_content_hide").slideToggle()});$("#report_video").click(function(a){a.preventDefault();$("#info_content_hide").hide();$("#ajax_container").hide();$("#post_report").slideToggle()});$("input[id*='report_']").click(function(){var a=$(this).attr("id").split("_"),b=a[1],a=a[2],c=$("input[@name='report_reason']:checked").val(),d=$("input[@name='email']").val(), f=$("textarea[id='report_message']").val();$("#info_content_hide").hide();$("#ajax_container").hide();$.post(baseurl+"ajax.php?m="+b+"_report",{item_id:a,flag_id:c,email_id:d,message:f},function(a){a.status=="0"?user_posting("#response_message",a.msg):($("input[@name='email']").val(""),$("textarea[id='report_message']").val(""),$("#post_report").hide(),user_response("#response_message",a.msg))},"json")});$("a[id*='user_']").click(function(a){a.preventDefault();var b=$(this).attr("id").split("_"), a=b[1],b=b[2];$("#related_container").hide();$("#related_select").show();$("#user_container").show();$.post(baseurl+"ajax.php?m=user_"+a,{user_id:b},function(a){$("#user_container").html(a.code)},"json")});$("a[id*='com_']").click(function(a){a.preventDefault();a=$(this).attr("id").split("_")[1];$("#com_container").slideToggle();$.post(baseurl+"ajax.php?m=com_"+a,{type:a},function(a){$("#com_container").html(a.code)},"json")});$("a[id*='related_content']").click(function(a){a.preventDefault();$("#user_container").hide(); $("#related_select").hide();$("#related_container").show()});$("input[id*='post_comment_']").click(function(){var a=$("#post_message"),b=$(this).attr("id").split("_"),c=b[2],b=b[3],d=$("input[@name='un30']").val(),f=$("input[@name='mail']").val(),g=$("textarea[id='message_comment']").val();if(g=="")return a.show(),!1;if(d=="")return a.show(),!1;a.hide();reset_chars_counter();$.post(baseurl+"ajax.php?m="+c+"_comment",{item_id:b,comment:g,uname:d,mail_id:f},function(a){if(a.status=="0")$("textarea[id='message_comment']").val(""), user_posting("#comment_response",a.msg);else{$(".no_comments").hide();$("input[@name='un30']").val("");$("textarea[id='message_comment']").val("");var b=$("#comments_delimiter"),c=document.createElement("div");$(c).html(a.code);$(b).after(c);user_response("#comment_response",a.msg)}},"json")});$("#id15").css({display:"none"})}); (function(a){a.fn.hoverIntent=function(b,c){var d={sensitivity:7,interval:100,timeout:0},d=a.extend(d,c?{over:b,out:c}:b),f,g,h,i,j=function(a){f=a.pageX;g=a.pageY},k=function(b,c){c.hoverIntent_t=clearTimeout(c.hoverIntent_t);if(Math.abs(h-f)+Math.abs(i-g)<d.sensitivity)return a(c).unbind("mousemove",j),c.hoverIntent_s=1,d.over.apply(c,[b]);else h=f,i=g,c.hoverIntent_t=setTimeout(function(){k(b,c)},d.interval)},l=function(b){var c=jQuery.extend({},b),e=this;if(e.hoverIntent_t)e.hoverIntent_t=clearTimeout(e.hoverIntent_t); if(b.type=="mouseenter"){if(h=c.pageX,i=c.pageY,a(e).bind("mousemove",j),e.hoverIntent_s!=1)e.hoverIntent_t=setTimeout(function(){k(c,e)},d.interval)}else if(a(e).unbind("mousemove",j),e.hoverIntent_s==1)e.hoverIntent_t=setTimeout(function(){e.hoverIntent_t=clearTimeout(e.hoverIntent_t);e.hoverIntent_s=0;d.out.apply(e,[c])},d.timeout)};return this.bind("mouseenter",l).bind("mouseleave",l)}})(jQuery);function x(){} function FocusText(){document.postComment.message_comment.focus();document.postComment.message_comment.select();return!0}function DoSmilie(a){document.postComment.message_comment.value+=a;document.postComment.message_comment.focus()}function DoPrompt(){};

