﻿<?xml version="1.0" encoding="utf-8" ?>
<Module>
	<ModulePrefs title="TurulMeme" directory_title="TurulMeme" title_url="http://turulmeme.com/"
        description="Fedezd fel melyek a legnépszerűbb, legfrisseb megosztások és hozzászólások a TurulMeme szemüvegén keresztül."
        screenshot="http://turulmeme.com/images/gadget.png"
        thumbnail="http://turulmeme.com/images/gadget-thumb.png"
        author="Séra László" author_location="Biatorbágy"
        author_email="laszlo.sera@gmail.com"
        category="news" category2="technology">
		<Require feature="dynamic-height" />
		<Require feature="tabs" />
		<Require feature="setprefs" />
	</ModulePrefs>
	<UserPref name="refresh" datatype="hidden" default_value="2" />
	<UserPref name="tab" datatype="hidden" default_value="0" />
	<UserPref name="offset" datatype="hidden" default_value="0" />
	<UserPref name="lead" datatype="hidden" default_value="1" />
	<UserPref name="num" datatype="hidden" default_value="10" />	
	<Content type="html">
		<![CDATA[ 
		<style type="text/css">
			select
			{
				font-size: 12px;
			}
			.memeitem
			{
				font-size: 12px;
				color:#222222;
				/*border-bottom:3px solid #E2E2E2;*/
				margin-bottom:5px;
				overflow:hidden;
				padding:4px 0px;
				border-top:1px solid #DDDDDD;
			}
			.userAction
			{
				font-size: 12px;
				color:#222222;
				border-top:1px solid #DDDDDD;
				overflow:hidden;
				padding:4px 0px;
			}
			#setttings_module
			{
				font-size: 12px;
				color:#222222;
				overflow:hidden;
				padding:4px 0px;
			}
			span.settings-title
			{
				display:block;
				float:left;
				width:110px;
			}
			.save {
    				margin-top: 10px;
    				clear: both;	
					text-align:center;
				}
				
			.save input
			{
				background-color: #fff; border: solid 1px #999
			}
			.alterUserAction {
				background-color:#EFEFEF;
			}
		    a.tag,
			a.title,
			.sourceInfo a:link,
			.sourceInfo a:visited,
			.sourceTitle a:link,
			.sourceTitle a:visited {
    			color: #B31E04;
    			text-decoration: none;
			}
			a.tag:hover,
			a.tag:active,
			a.title:hover,
			a.title:active,
			.sourceInfo a:hover,
			.sourceInfo a:active,
			.sourceTitle a:hover,
			.sourceTitle a:active {
    			color: #B31E04;	
			}
			.sourceInfo, .readAction, .readAction:visited {
				color:#888888;
				font-family:Arial;
				font-size:10px;
				padding:2px 0 3px;
				text-decoration: none;
			}		
			.tags a.delicious, a.delicious
			{
				color: #1259C7;
			}

			.tags a.delicious:hover
			{
				background-color: #1259C7;
			}

			.tags a.netvibes, a.netvibes
			{
				color: #269b00;
			}

			.tags a.netvibes:hover
			{
				background-color: #269b00;
			}
			.tip-box
			{
				margin-top: 8px;
				position: relative;
			}
			.tip-box .arr
			{
				background-repeat: no-repeat;
				font-size: 1px;
				height: 100%;
				left: 10px;
				position: absolute;
				top: -11px;
			}
			.tip-left .c
			{
				margin-left: 20px;
			}
			.tip-left .arr
			{
				background-image: url(http://turulmeme.com/images/tip-arrow-top.gif);
				background-position: left bottom;
				background-repeat: no-repeat;
				padding-left: 26px;
			}
			.entry-annotation
			{
				color: #666666;
				margin: 15px 0 10px; /*max-width:565px;*/
			}
			.entry-annotation-author-name
			{
				font-size: 13px;
				font-weight: bold;
			}

			.entry-annotation-author-name a
			{
				color: #0A65BB;
				text-decoration: none;
			}

			.entry-annotation-author-name a:hover
			{
				background-color: #0A65BB;
				color: #fff;
			}

			.entry-annotation-body
			{
				font-size: 12px;
				font-style: italic;
				line-height: 115%;
				margin: 0.3em;
			}
			.entry-annotation-author-container
			{
				font-weight: bold;
				padding: 0.3em 0.3em 0.3em 0;
				white-space: nowrap;
			}
			.entry-annotation-profile-image
			{
				border: 1px solid #CCCCCC;
				height: 18px;
				margin-right: 0.3em;
				width: 18px;
			}
			.entry-annotation-box-container
			{
				width: 100%;
			}
			.entry-annotation-box .round-box
			{
				width: auto;
			}
			.entry-annotation-box .round-box .c
			{
				background-color: #E1ECFE !important;
				width: auto;
			}
			.entry-annotation-box .round-box .s
			{
				background-color: #C2D9FF !important;
			}
			.entry-annotation-box .round-box .tl, .entry-annotation-box .round-box .tr, .entry-annotation-box .round-box .bl, .entry-annotation-box .round-box .br
			{
				height: 1px;
				width: 1px;
			}
			.entry-annotation .tip-left .arr, #userActions .tip-left .arr
			{
				background-image: url(http://turulmeme.com/images/annotation-tip-arrow-top.gif);
				background-position: 0 3px;
				padding-left: 9px;
			}
			.entry-annotation .tip-left .c
			{
				margin-left: 8px;
			}
			.round-box
			{
				empty-cells: show;
			}
			.round-box td
			{
				margin: 0;
				padding: 0;
			}
			.round-box .s
			{
				font-size: 1px;
				line-height: 1px;
			}
			.round-box .s, .round-box .c
			{
				background-color: #CCCCCC;
			}
			.round-box .tl, .round-box .tr, .round-box .bl, .round-box .br
			{
				background-repeat: no-repeat;
				height: 3px;
				width: 3px;
			}
			.round-box .tl
			{
				background-image: url(http://turulmeme.com/images/corner_tl.gif);
				background-position: left top;
			}
			.round-box .tr
			{
				background-image: url(http://turulmeme.com/images/corner_tr.gif);
				background-position: right top;
			}
			.round-box .bl
			{
				background-image: url(http://turulmeme.com/images/corner_bl.gif);
				background-position: left bottom;
			}
			.round-box .br
			{
				background-image: url(http://turulmeme.com/images/corner_br.gif);
				background-position: right bottom;
			}
			.round-box .sq
			{
				background-image: none;
			}			
			.entry-annotation
			{
				margin-top: 0;
			}
			.entry-annotation-body
			{
				margin: 0.1em 0.5em;
			}
		</style>
		<div id="meme-tab" style="clear: both;"></div>
        <script type="text/javascript">
			var prefs = new _IG_Prefs();
			var tabs;
			
			function savePrefs() {
				_gel('meme-save').innerHTML = '&nbsp;Mentés...';
 
				prefs.set('num', _gel('meme-num').value);
				prefs.set('refresh', _gel('meme-refresh').value);
				prefs.set('lead', _gel('meme-lead').value);
		 
				updateTab();
			}
		
			 function updateTab() {
		        var tab = tabs.getSelectedTab();
				var refresh = prefs.getString('refresh');
				var num = prefs.getString('num');
				var lead = prefs.getString('lead');
				
				var requestURL = null;
				requestURL = 'http://turulmeme.com/gadget.ashx?m=' + tab.getIndex() + '&num='+num+'&refresh='+refresh+'&lead='+lead;
												
				// Grab the HTML page and insert it
				_IG_FetchContent(requestURL, 
					function (responseHTML) {
						// If the response was blank, try again in a couple seconds
						if (responseHTML == '') {
							setTimeout('updateTab()', 2000);
						} else {
							// We got data, so display it
							tab.getContentContainer().innerHTML = responseHTML;
		                    
							if (prefs.getInt('refresh') > 0) {
								setTimeout('updateTab()', prefs.getInt('refresh') * 60000);
							}
						}

						_IG_AdjustIFrameHeight();
					},
					{ refreshInterval: 0 }
				);
			 }
			
			function init() {
				// Initialize tabs.
				var tabArray = Array();
				tabArray[0] = 'Népszerű';
				tabArray[1] = 'Friss';
				tabArray[2] = 'Aktivitás';
				tabArray[3] = 'Beállítások';

				 if(prefs.getInt('tab')) {
          			tabs = new _IG_Tabs(__MODULE_ID__,tabArray[prefs.getInt('tab')],_gel('meme-tab'));
				  } else {
					tabs = new _IG_Tabs(__MODULE_ID__,0,_gel('meme-tab'));
				  }

				  // When you use addDynamicTab, the tab's content is
				  // dynamically generated through the callback function.
				 for(x in tabArray) {
					tabs.addDynamicTab(tabArray[x], callback);
				 }
			}
			
			function callback(tabId) 
			{
				prefs.set('offset', 0); 
				prefs.set('tab',tabs.getSelectedTab().getIndex());
				updateTab();
			}

			_IG_RegisterOnloadHandler(init);
	   </script>
     ]]>
	</Content>
</Module>
