/*addurl*/
function addurl()
{var title='Weblink Linkgyűjtemény';var url='http://www.weblink.hu';if(window.sidebar)
window.sidebar.addPanel(title,url,"");else if(navigator.appName=="Microsoft Internet Explorer")
window.external.AddFavorite(url,title);else{alert('Az OK megnyomása után kérlek nyomd meg a CTRL+D gombokat, hogy az oldal bekerüljön a kedvencek közé!');}}
/*egyéb*/
$(function(){$('a.uj').click(function(){window.open(this.href);_gaq.push(['_trackEvent','links','external',$(this).attr("href")]);return false;});});$(function(){$('.ljb2 > a:first-child').click(function(){window.open(this.href);_gaq.push(['_trackEvent','links','external',$(this).attr("href")]);return false;});});
/*jtip*/
$(document).ready(JT_init);function JT_init(){$("a.jTip").hover(function(){var a='siteinfo.php?width=480&link='+this.href+'&id='+this.id;JT_show(a,this.id,this.name)},function(){$('#JT').remove()}).click(function(){return false});}
function JT_show(url,linkId,title){if(title==false)title="&nbsp;";var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var hasArea=w-getAbsoluteLeft(linkId);var clickElementy=getAbsoluteTop(linkId)-3;var queryString=url.replace(/^[^\?]+\??/,'');var params=parseQuery(queryString);if(params['width']===undefined){params['width']=250};if(params['link']!==undefined){$('#'+linkId).bind('click',function(){window.location=params['link']});$('#'+linkId).css('cursor','pointer');}
if(hasArea>((params['width']*1)+75)){$("body").append("<div id='JT' style='width:"+params['width']*1+"px'><div id='JT_arrow_left'></div><div id='JT_close_left'>"+title+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>");var arrowOffset=getElementWidth(linkId)+11;var clickElementx=getAbsoluteLeft(linkId)+arrowOffset;}else{$("body").append("<div id='JT' style='width:"+params['width']*1+"px'><div id='JT_arrow_right' style='left:"+((params['width']*1)+1)+"px'></div><div id='JT_close_right'>"+title+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>");var clickElementx=getAbsoluteLeft(linkId)-((params['width']*1)+15);}
$('#JT').css({left:clickElementx+"px",top:clickElementy+"px"});$('#JT').show();$('#JT_copy').load(url);}
function getElementWidth(objectId){x=document.getElementById(objectId);return x.offsetWidth;}
function getAbsoluteLeft(objectId){o=document.getElementById(objectId)
oLeft=o.offsetLeft
while(o.offsetParent!=null){oParent=o.offsetParent
oLeft+=oParent.offsetLeft
o=oParent}
return oLeft}
function getAbsoluteTop(objectId){o=document.getElementById(objectId)
oTop=o.offsetTop
while(o.offsetParent!=null){oParent=o.offsetParent
oTop+=oParent.offsetTop
o=oParent}
return oTop}
function parseQuery(query){var Params=new Object();if(!query)return Params;var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2)continue;var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function blockEvents(evt){if(evt.target){evt.preventDefault();}else{evt.returnValue=false;}}
/*prettypoppin*/
var _followScroll=false;var _readyBound=false;(function($){$.fn.prettyPopin=function(settings){settings=jQuery.extend({modal:false,width:false,height:false,opacity:0.5,animationSpeed:'fast',followScroll:true,loader_path:'images/prettyPopin/loader.gif',callback:function(){}},settings);function bindReady(){if(_readyBound)return;_readyBound=true;$(window).scroll(function(){_centerPopin();});$(window).resize(function(){_centerPopin();});};bindReady();return this.each(function(){var popinWidth;var popinHeight;var $c;$(this).click(function(){buildoverlay();buildpopin();$.get($(this).attr('href'),function(responseText){$('.prettyPopin .prettyContent .prettyContent-container').html(responseText);popinWidth=settings.width||$('.prettyPopin .prettyContent .prettyContent-container').width()+parseFloat($('.prettyPopin .prettyContent .prettyContent-container').css('padding-left'))+parseFloat($('.prettyPopin .prettyContent .prettyContent-container').css('padding-right'));$('.prettyPopin').width(popinWidth);popinHeight=settings.height||$('.prettyPopin .prettyContent .prettyContent-container').height()+parseFloat($('.prettyPopin .prettyContent .prettyContent-container').css('padding-top'))+parseFloat($('.prettyPopin .prettyContent .prettyContent-container').css('padding-bottom'));$('.prettyPopin').height(popinHeight);$('.prettyPopin').height(45).width(45);displayPopin();});return false;});var displayPopin=function(){var scrollPos=_getScroll();projectedTop=($(window).height()/2)+scrollPos['scrollTop']-(popinHeight/2);if(projectedTop<0){projectedTop=10;_followScroll=false;}else{_followScroll=settings.followScroll;};$('.prettyPopin').animate({'top':projectedTop,'left':($(window).width()/2)+scrollPos['scrollLeft']-(popinWidth/2),'width':popinWidth,'height':popinHeight},settings.animationSpeed,function(){displayContent();});};var buildpopin=function(){$('body').append('<div class="prettyPopin"><a href="#" id="b_close" rel="close">Close</a><div class="prettyContent"><img src="'+settings.loader_path+'" alt="Loading" class="loader" /><div class="prettyContent-container"></div></div></div>');$c=$('.prettyPopin .prettyContent .prettyContent-container');$('.prettyPopin a[rel=close]:eq(0)').click(function(){closeOverlay();return false;});var scrollPos=_getScroll();$('.prettyPopin').width(45).height(45).css({'top':($(window).height()/2)+scrollPos['scrollTop'],'left':($(window).width()/2)+scrollPos['scrollLeft']}).hide().fadeIn(settings.animationSpeed);};var buildoverlay=function(){$('body').append('<div id="overlay"></div>');$('#overlay').css('height',$(document).height());$('#overlay').css('opacity',0).fadeTo(settings.animationSpeed,settings.opacity);if(!settings.modal){$('#overlay').click(function(){closeOverlay();});};};var displayContent=function(){$c.parent().find('.loader').hide();$c.parent().parent().find('#b_close').show();$c.fadeIn(function(){$(this).find('input[type=text]:first').trigger('focus');$('.prettyPopin a[rel=internal]').click(function(){$link=$(this);$c.fadeOut(function(){$c.parent().find('.loader').show();$.get($link.attr('href'),function(responseText){$c.html(responseText);_refreshContent($c);});});return false;});$('.prettyPopin form').bind('submit',function(){$theForm=$(this);$c.fadeOut(function(){$c.parent().find('.loader').show();$.post($theForm.attr('action'),$theForm.serialize(),function(responseText){$c.html(responseText);_refreshContent($c);});});return false;});});$('.prettyPopin a[rel=close]:gt(0)').click(function(){closeOverlay();return false;});};var _refreshContent=function(){var scrollPos=_getScroll();if(!settings.width)popinWidth=$c.width()+parseFloat($c.css('padding-left'))+parseFloat($c.css('padding-right'));if(!settings.height)popinHeight=$c.height()+parseFloat($c.css('padding-top'))+parseFloat($c.css('padding-bottom'));projectedTop=($(window).height()/2)+scrollPos['scrollTop']-(popinHeight/2);if(projectedTop<0){projectedTop=10;_followScroll=false;}else{_followScroll=settings.followScroll;};$('.prettyPopin').animate({'top':projectedTop,'left':($(window).width()/2)+scrollPos['scrollLeft']-(popinWidth/2),'width':popinWidth,'height':popinHeight},settings.animationSpeed,function(){displayContent();});};var closeOverlay=function(){$('#overlay').fadeOut(settings.animationSpeed,function(){$(this).remove();});$('.prettyPopin').fadeOut(settings.animationSpeed,function(){$(this).remove();settings.callback()});};});function _centerPopin(){if(!_followScroll)return;if(!$('.prettyPopin'))return;var scrollPos=_getScroll();if($.browser.opera){windowHeight=window.innerHeight;windowWidth=window.innerWidth;}else{windowHeight=$(window).height();windowWidth=$(window).width();};projectedTop=($(window).height()/2)+scrollPos['scrollTop']-($('.prettyPopin').height()/2);if(projectedTop<0){projectedTop=10;_followScroll=false;}else{_followScroll=true;};$('.prettyPopin').css({'top':projectedTop,'left':($(window).width()/2)+scrollPos['scrollLeft']-($('.prettyPopin').width()/2)});};function _getScroll(){scrollTop=window.pageYOffset||document.documentElement.scrollTop||0;scrollLeft=window.pageXOffset||document.documentElement.scrollLeft||0;return{scrollTop:scrollTop,scrollLeft:scrollLeft};};};})(jQuery);
/*$(function(){
    $('.ljb2').mouseenter( function(){
	    var ind=$('.ljb2').index(this);
        $('.rrrr',this).css('color','red')
	});
    $('.ljb2').mouseleave( function(){
        $('.rrrr',this).css('color','4444ee')
    });
});*/
window.onload=function()
{
$("#ftr").html('<!--[if lt IE 9]>\
<style type="text/css">\
#footer-bar {\
	display:none;\
}\
</style>\
<![endif]-->\
<div id="footer-bar"><div id="footer-text"><a href="http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title)+'"><img src="http://weblink.hu/images/facebook.ico" width=16 height=16 border=0></a>\
</div>\
<div id="footer-text3"><a href="http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(document.title)+'">Megosztás</a></div>\
<div id="footer-text4"><g:plusone size="medium" count="false"></g:plusone></div>\
<div id="footer-text2">\
<!-- AddThis Button BEGIN -->\
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4b1e41071dbb4095"><img src="http://weblink.hu/images/at.png" width="150" height="16" border="0" alt="Mentés és Megosztás"/></a>\
<!-- AddThis Button END -->\
</div></div>\
<script type="text/javascript">gapi.plusone.go();</script>\
<script type="text/javascript">function plusone_vote( obj ){_gaq.push(["_trackEvent","plusone",obj.state]);}</script>');

setTimeout(function(){$("#fbr").html('<iframe src="http://www.facebook.com/plugins/likebox.php?id=149355128424110&amp;width=350&amp;connections=0&amp;stream=true&amp;header=false&amp;height=395" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px; height:395px;" allowTransparency="true"></iframe>');},300);
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
    && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target 
      || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        targetOffset=targetOffset-6;
        $('html,body')
        .animate({scrollTop: targetOffset}, 'slow');
        $target.parent().parent().delay(300).fadeTo("slow", 0.33).delay(100).fadeTo("slow", 1.00);
        return false;
      }
    }
  });
}

