(function($){$.fn.antiIE = function(options){$.fn.antiIE.defaults = $.extend({}, $.fn.antiIE.defaults, options);jQuery.each(jQuery.browser,function(i,val){if(i=="msie"&&jQuery.browser.version.substr(0,1)=="8"){$("body").append('<div class="thisisIE6">'+$.fn.antiIE.defaults.ie6Message+'</div>');$('.thisisIE6').css($.fn.antiIE.defaults.css).slideDown('slow');setTimeout(function(){$('.thisisIE6').slideUp()},($.fn.antiIE.defaults.timeout*1000))}});};
$.fn.antiIE.defaults = {
	ie6Message: 'On ie 6-ot hasznal',
	css : {'font-size':'90%','font-family':'Calibri, Arial, Tahoma, Verdana','z-index':'1','border-top':'2px solid #797979','position':'fixed','bottom':'0','left':'0','width':'100%','height':'20px','display':'none','background':'#333131','padding':'12px 20px 12px 20px','color':'#fff'},
	timeout: 15
}})(jQuery);

function setCookie(name, value, expires, path, domain, secure) { 
   // set time, it's in milliseconds 
   var today = new Date(); 
   today.setTime( today.getTime() ); 
   // if the expires variable is set, make the correct expires time, the 
   // current script below will set it for x number of days, to make it 
   // for hours, delete * 24, for minutes, delete * 60 * 24 
   if ( expires ) 
   { 
      expires = expires * 1000 /** 60 * 60 * 24*/; 
   } 
   //alert( 'today ' + today.toGMTString() );// this is for testing purpose only 
   var expires_date = new Date( today.getTime() + (expires) ); 
   //alert('expires ' + expires_date.toGMTString());// this is for testing purposes only 

   document.cookie = name + "=" +escape( value ) + 
      ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString() 
      ( ( path ) ? ";path=" + path : "" ) + 
      ( ( domain ) ? ";domain=" + domain : "" ) + 
      ( ( secure ) ? ";secure" : "" ); 
}

function getCookie(name) {
  var results = document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

if (!getCookie("ie_warning")) {
	$("body").antiIE({ie6Message:'Ön Internet Explorer-t használ, ezért az oldal egyes elemei működésképtelenek lehetnek! Cserélje le böngészőjét <a style="color:red" href="http://my.opera.com/community/download.pl?ref=markborbely&amp;p=opera_desktop">Operára</a>.',timeout: 15});
	setCookie("ie_warning", "1", 60 * 5);
}
