// JavaScript Document


if((location.href).indexOf('www.fryderykwwarszawie.pl', 0)=='-1')
{
serwer='http://fryderykwwarszawie.pl/';	
	
}
else
{
	
serwer='http://www.fryderykwwarszawie.pl/';	
}

//serwer='http://localhost/chopin2/';
function getNewsContent(page)
{
	//alert(category);
	if(page=='news'){
	$('#newsybox').show();	
	$.get(serwer+'news/show_small/news', function(data) {
  	var container=$('#news_content');
   	container.html(' ');
  	container.append(data);
  	container.jScrollPane({showArrows:true, scrollbarWidth:12, scrollbarMargin:12,dragMinHeight:30,dragMaxHeight:30});
  //$('#tweet-container').html(data);
  	Cufon.replace('.date',{ fontFamily: 'Klavika Md' });   });	
	}
	else if(page=='remix')
	{
	$('#konkursybox').show();
	$.get(serwer+'news/show_small/remix', function(data) {
  	var container=$('#konkursy_content');
   	container.html('');
  	container.append(data);
 });		
		
}
	
	else if(page=='murale')
	{
	$('#muralebox').show();
	$.get(serwer+'news/show_small/murale', function(data) {
  	var container=$('#murale_content');
   	container.html('');
  	container.append(data);
 });		
		

			
		
		
	}
	
}

$(document).ready(function(){
				  
if ($('#konkursy_js').length>0)
{
//alert('remix');
var page='remix';
}
else if ($('#murale_js').length>0)
{
//alert('remix');
var page='murale';
}
else
{
var page='news';	
}


getNewsContent(page);
$("#slider").easySlider();
TweetTick();
if ($('#fotoinit').length>0)
{
var numRand = Math.floor(Math.random()*12);
$('#fotoinit').html('<img src="/application/uploads/assets/fotyhome/'+numRand+'.jpg" alt="murale" width="238" height="329" />');
}

   });



function TweetTick()
{
$('#showline').hover(
		function () {
			//show its submenu
			$('#line').fadeIn(200);

		}, 
		function () {
			//hide its submenu
			$('#line').fadeOut(200);			
		}
	);

}

