 function InsertMainImg(src,type,width,height) { 
 	if((type=="gif")||(type=="jpg")||(type=="png")){		// jestlize je pripona obrazek tak obrazek jinak flash
		document.writeln("<img src=\""+src+"\" alt=\"\" border=\"0\" width=\""+width+"\" height=\""+height+"\" />");
	}else{
		InsertFlash(src,width,height);	
	}
 }
 
 function InsertFlash(src,width,height) { 
	document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.writeln("    <param name=\"movie\" value=\"" + src + "\" />");
	document.writeln("    <param name=\"quality\" value=\"high\" />");
	document.writeln("    <embed src=\"" + src + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\"></embed></object>");
	}
	
	 function AddFavorite(linkObj,addUrl,addTitle)
    {
      if (document.all && !window.opera)
      {
        window.external.AddFavorite(addUrl,addTitle);
        return false;
      }
      else if (window.opera && window.print)
      {
        linkObj.title = addTitle;
        return true;
      }
      else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
      {
        if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
        {
          window.sidebar.addPanel(addTitle,addUrl,'');
          return false;
        }
      }
      window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
      return false;
    }
    
    
	   $(document).ready(
				function(){
			
					
					$('ul#portfolio').innerfade({
						speed: 1000,
						timeout: 5000,
						type: 'sequence',
						containerheight: '200px'
					});
					
	

			});
  	
 
          
          
        $('document').ready(function(){
	       fontSize("#holder1", "#content1", 9, 12, 50);
        });


	  
	    	
                     	  // When the document loads do everything inside here ...
	  $(document).ready(function(){
		
		// When a link is clicked
		$("a.tab").click(function () {
			
			
			// switch all tabs off
			$(".active").removeClass("active");
			
			// switch this tab on
			$(this).addClass("active");
			
			if(window.location.pathname == '/'){
                                // slide all content up
			        $(".content").slideUp();
			        // slide this content up
			        var content_show = $(this).attr("title");
                                $("#"+content_show).slideDown();
                        } else {
                                // slide all content up
                                $(".content_aktualne").slideUp();
                                // slide this content up
                                var content_aktualne_show = $(this).attr("title");
                                $("#"+content_aktualne_show).slideDown();
                        }
			
		});
	
	  });  
              
        
        
    jQuery(function() {

    jQuery.getFeed({
        url: '../system/proxy.php?url=http://doprava-brno.cz/dicbrno/dic_brno.xml',
        success: function(feed) {
        
            jQuery('#result').append('<p class="nadpis">'
            + '<a href="'
            + feed.link
            + '">'
            + feed.title
            + '</a>'
            + '</p>');
            
            var html = '';
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
            
                var item = feed.items[i];
                
                html += '<p class="nadpis">'
                + '<a href="http://doprava-brno.cz/dicbrno/'
                + item.link.substring(10)
                + '">'
                + item.title
                + '</a>'
                + '</p>';
                
                html += '<div class="updated">'
                + item.updated
                + '</div>';
                
                html += '<p>'
                + item.description
                + '</p>';
            }
            
            jQuery('#result').append(html);
        }    
    });
});
      