var ulcount;
$(document).ready(function(){
//var so = new SWFObject("labels/lbl1.swf", "sotester", "200", "40", "8", "");
//					so.addVariable("t_", "CASA LINEADA");
//					so.addVariable("W", "200");
//					so.addParam("width", "200");
//					so.addVariable("H", "40");
//					so.addParam("height", "40");
//					so.addVariable("margins", "0");
//					so.addVariable("fcolor", "efe0ae");
//					so.addVariable("t_align", "left");					
//					so.addVariable("fontsize", "24");
//					so.addParam("wmode", "transparent");
//					so.write("name-center-ul");
//
//$('#projects ul li div h2').each(function(i){
// $(this).attr('id', 'flash-replased' + i);
// var so = new SWFObject("labels/lbl1.swf", "sotester", "200", "40", "8", "");
//					so.addVariable("t_", $(this).text());
//					so.addVariable("W", "200");
//					so.addParam("width", "200");
//					so.addVariable("H", "40");
//					so.addParam("height", "40");
//					so.addVariable("margins", "0");
//					so.addVariable("fcolor", "efe0ae");
//					so.addVariable("t_align", "left");					
//					so.addVariable("fontsize", "24");
//					so.addParam("wmode", "transparent");
//					so.write('flash-replased' + i);
// } 
 //); 
var current = 0;
var i = 0;
var count=i;
var images = Array();
$('a').focus(function(){$(this).blur()});
$('.aboutus').click(function(){
	window.location=$('.aboutus').children('h3').children('a').attr('href');	
});
$('.aboutus').mouseenter(function(){
	$(this).animate({  		
 		'opacity': 1	
 	}, { queue:false, duration:200, easing: 'easeInOutSine'}); 
});
$('.aboutus').mouseleave(function(){
	$(this).animate({  		
 		'opacity': 0.8	
 	}, { queue:false, duration:200, easing: 'easeInOutSine'}); 
});
$('#projects ul li img').each(function(i){
	images[i]=$(this);	
	if(i==0)images[i].attr('id','project-center');
	if(i==1)images[i].attr('id','project-right');
	if(i==2)images[i].attr('id','project-next');	
	count=i;
});
if(count>0){
	images[count].attr('id','project-left');
	if(count>4)images[count-1].attr('id','project-prev');
	
	 $('#next').click(function(){
	 	$('#project-right').css('z-index', '2');
	 	$('#project-center').css('z-index', '1');
	 	$('#project-left').css('z-index', '0');
	 	$('#project-left').animate({ 
	 		'left' : 447,
	 		'top': 225,
	 		'width':0,		
	 		'height':0,
	 		'top': 300	
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'}); 	
	 	$('#project-center').animate({
	 		'left' : 97
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'}); 	
	 	$('#project-center').animate({ 		
	 		'width': 110,
	 		'height': 80,
	 		'top': 225 		
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});	
	 	
	 	$('#project-right').animate({
	 		
	 		'top': 120
	 	},{ queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#project-right').animate({ 
	 		'left' : 354,		
	 		'width': 307,
	 		'height': 217 		
	 	},{ queue:false, duration:1000, easing: 'easeInOutSine'}); 	
	 	$('#project-next').animate({
	 		'left' : 800,
	 		'width': 110,
	 		'height': 80,
	 		'top': 225
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	if(count>4)$('#project-prev').removeAttr('id');
	 	if(count>4)$('#project-left').attr('id','project-prev');
	 	$('#project-center').attr('id','project-left');
	 	$('#project-right').attr('id','project-center');
	 	$('#project-next').attr('id','project-right');
		current++;
	 	if(current+2 <= count)images[current+2].attr('id','project-next');
	 	else {images[current-count+1].attr('id','project-next');}	
	 	if(current>count)current=0;
	 	$('#name-center-ul').fadeOut(500,function(){$('#name-center-ul').fadeIn(500);
	 	$('#name-center-ul').html($('#project-center').parent().parent().children('.name').children('h2').children('a').html()); 	
	 	});
	 	$('#quote-center blockquote').fadeOut(500,function(){$('#quote-center blockquote').fadeIn(500);
	 	$('#quote-center blockquote').html($('#project-center').parent().parent().children('.quote').html());
	 	});
	 	$('#project-info-center p').fadeOut(500,function(){$('#project-info-center p').fadeIn(500);
	 	$('#project-info-center p').html($('#project-center').parent().parent().children('.project-info').html());
	 	});
	 	$('#prev strong').fadeOut(500,function(){$('#prev strong').fadeIn(500);
	 	$('#prev strong').html($('#project-left').parent().parent().children('.name').children('h2').children('a').html());
	 	});
	 	$('#next strong').fadeOut(500,function(){$('#next strong').fadeIn(500);
	 	$('#next strong').html($('#project-right').parent().parent().children('.name').children('h2').children('a').html());
	 	});
	 	
	 	
	 	
	 	
	 	$('#quote-center blockquote').animate({
	 		'height' : $('#project-center').parent().parent().children('.quote').outerHeight()		
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	hideshow('leftunder');
	 	hideshow('rightunder');
//	 	$('#leftunder').fadeOut(500,function(){$(this).fadeIn(500);});
//	 	$('#rightunder').fadeOut(500,function(){$(this).fadeIn(500);});
//	 	
	 	
	 });
	 $('#prev').click(function(){
	 	$('#project-left').css('z-index', '2');
	 	$('#project-center').css('z-index', '1'); 	
	 	$('#project-right').css('z-index', '0'); 	
	 	if(count>4)$('#project-prev').animate({
	 		'left' : 97, 
	 		'width':110,
	 		'height':80,
	 		'top': 225		
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	else $('#project-next').animate({
	 		'left' : 97, 
	 		'width':110,
	 		'height':80,
	 		'top': 225		
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#project-left').animate({
	 		'left' : 354,
	 		'top': 120
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#project-left').animate({ 		
	 		'width': 307,
	 		'height': 217
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#project-center').animate({
	 		'left' : 800,
	 		'width': 110,
	 		'height': 80,
	 		'top': 225
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#project-right').animate({ 
	 		'left' : 447,
	 		'top': 255,
	 		'width':0,		
	 		'height':0,
	 		'top': 300	
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'}); 
	 	 	
	 	if(count>4)$('#project-next').removeAttr('id'); 	 	
	 	else $('#project-next').attr('id','project-x');
	 	$('#project-right').attr('id','project-next');
	 	$('#project-center').attr('id','project-right');
	 	$('#project-left').attr('id','project-center');
	 	if(count>4)$('#project-prev').attr('id','project-left'); 	 	
		current--;
	 	if(count>4){
	 		if(current-2 >= 0)images[current-2].attr('id','project-prev');
	 	 	else {images[current + count - 1].attr('id','project-prev');}
	 	}else {
	 		$('#project-x').attr('id','project-left');	
	 	}
		
	 	if(current<0)current=count;	
	 	$('#name-center-ul').fadeOut(500,function(){$('#name-center-ul').fadeIn(500);
	 	$('#name-center-ul').html($('#project-center').parent().parent().children('.name').children('h2').children('a').html()); 	
	 	});
	 	$('#quote-center blockquote').fadeOut(500,function(){$('#quote-center blockquote').fadeIn(500);
	 	$('#quote-center blockquote').html($('#project-center').parent().parent().children('.quote').html());
	 	});
	 	$('#project-info-center p').fadeOut(500,function(){$('#project-info-center p').fadeIn(500);
	 	$('#project-info-center p').html($('#project-center').parent().parent().children('.project-info').html());
	 	});
	 	$('#prev strong').fadeOut(500,function(){$('#prev strong').fadeIn(500);
	 	$('#prev strong').html($('#project-left').parent().parent().children('.name').children('h2').children('a').html());
	 	});
	 	$('#next strong').fadeOut(500,function(){$('#next strong').fadeIn(500);
	 	$('#next strong').html($('#project-right').parent().parent().children('.name').children('h2').children('a').html());
	 	});
	
	 	
	 	 	$('#quote-center blockquote').animate({
	 		'height' : $('#project-center').parent().parent().children('.quote').outerHeight()		
	 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});
	 	$('#leftunder').fadeOut(500,function(){$(this).fadeIn(500);});
	 	$('#rightunder').fadeOut(500,function(){$(this).fadeIn(500);});
	 	
	 });
	}
	//top offers
	$('.offersall').css('display','block');
	$('.offersall li.spofferhold').attr('title','Click to see plan');
	$('.offersall li.spofferhold').click(function(){		
		var hlp = $(this).attr('id').substring(1);
		var form = jQuery('<div style="border:0; width: 443px; height: 350px; overflow: hidden;margin:0; padding:0;"><iframe name="fname" style="border:0; width: 443px; height: 350px; overflow: hidden;" src="' + siteurl + 'form.php?l='+l+'&amp;id='+hlp+'"></div>').attr('id', 'form');
			var formb = jQuery('<div></div>').attr('id', 'formb');
			form.css('width', fw);
			form.css('height', fh);
			form.css('opacity', 0);
			form.css('overflow', 'hidden');
			form.css('position', 'fixed');
			form.css('top', 180);
			form.css('left', 258);
			form.css('z-index', 105);
			form.css('border', "0px");
			formb.css('border', "0px");					
			formb.css('top', 0);
			formb.css('left', 0);
			formb.css('position', 'fixed');
			formb.css('background-image', 'url(' + siteurl + 'images/pp.png)');		
			formb.css('background-color', 'transparent');		
			formb.css('width', '100%');		
			formb.css('padding', 0);		
			formb.css('margin', 0);		
			formb.css('height', '100%');		
			formb.css('opacity', 0);		
			formb.css('z-index', 104);									
			$('body').append(form);
			$('body').append(formb);
			$('#formb').animate({  		
 		'opacity': 1
 	}, { queue:false, duration:500, easing: 'linear'});
 	$('#form').animate({  		
 		'width': fw,
 		'height': fh,
 		'opacity': 1,
 		'top'	: 180,
 		'left'	: 258
 	}, { queue:false, duration:500, easing: 'linear'});
		
		
		return false;
		
		//document.location = siteurl + 'hh' +$(this).attr('id');
		
	});
	
	$('.offersall ul.uloffer').each(function(i){
		var m = 0;		
		$(this).children('li').each(function(j){
			var string;
			if(j==0){				
				$(this).css('position', 'absolute');				
				$(this).css('top', 0);	
				$(this).css('right', 0);	
				$(this).css('width', 'auto');	
				$(this).css('height', 62);	
				$(this).css('background-color', '#7d4300');	
				$(this).css('color', '#fbd37e');				
				$(this).css('z-index', '2');
				string = $(this).html();				
				var span = jQuery('<span>'+string+'</span>');
				span.css('margin-left', 30); 
				span.css('margin-right', 30); 
				span.css('margin-top', 23); 
				span.css('display', 'block'); 				 
				$(this).html(span);
			}
			if(j==1){
				$(this).css('position', 'absolute');				
				$(this).css('top', 0);	
				$(this).css('left', 0);	
				$(this).css('width', 'auto');	
				$(this).css('height', 70);	
				$(this).css('background-image', 'url(' + siteurl + 'images/say.png)');	
				$(this).css('background-position', 'right top');	
				$(this).css('color', '#e9efc8');
				$(this).css('z-index', '2');
				string = $(this).html();
				var span = jQuery('<span>'+string+'</span>');	
//				span.css('margin-left', 15); 
				span.css('margin-right', 35); 
//				span.css('margin-top', 23); 
				span.css('display', 'block');	
				$(this).html(span);			
				$(this).css('cursor', 'pointer');			
				swidth = parseInt($(this).outerWidth());
				$(this).mouseover(function(){
					$('.list').animate({ 				 		
				 		'height': 164				 		
				 	}, { queue:false, duration:500, easing: 'easeInOutSine'});
				 	}); 
				 	$(this).mouseout(function(){$('.list').animate({ 				 		
				 		'height': 0				 		
				 	}, { queue:false, duration:500, easing: 'easeInOutSine'});
				});			
			}
			if(j==2){
				$(this).css('position', 'absolute');				
				$(this).css('top', 0);	
				$(this).css('left', 0);	
				$(this).css('width', 474);	
				$(this).css('height', 246);	
				$(this).css('background-color', '#7d4300');					
				$(this).css('color', '#fbd37e');	
				$(this).css('z-index', '1');				
			}
			if(j==3){
				$(this).css('position', 'absolute');				
				$(this).css('top', 0);	
				$(this).css('left', 0);	
				$(this).css('z-index', '1');				
			}		
			$(this).children('ul').children('li').each(function(k){
	
				$(this).parent().css('overflow', 'hidden');
				$(this).parent().css('z-index', 2);
				$(this).parent().css('position', 'absolute');
				$(this).parent().css('width', swidth);
				$(this).parent().css('top', 70);
				$(this).parent().css('height', 0);
				$(this).css('width', swidth);
				$(this).css('height', 44);
				$(this).css('margin-bottom', 1);
				if(k==0){					
					var string = $(this).html();
					var span = jQuery('<span>'+string+'</span>');
					span.css('margin-left',15);
					span.css('position','static');					
					span.css('font-size',15);					
					span.css('color', '#e9efc8');					
					span.css('margin-top',10);
					span.css('display','block');					
					$(this).html(span);
					$(this).css('position','static');
					$(this).css('background-image','url(' + siteurl + 'images/casa.png)');
					$(this).css('background-position','right top');
				}else{					
					var string = $(this).html();
					var span = jQuery('<span>'+string+'</span>');
					span.css('margin-left',15);
					span.css('position','static');					
					span.css('font-size',12);					
					span.css('color', '#e4d7af');					
					span.css('margin-top',13);
					span.css('display','block');					
					$(this).html(span);
					$(this).css('position','static');
					$(this).css('background-image','url(' + siteurl + 'images/casasub.png)');
					$(this).css('background-position','right top');
					$(this).css('height',39);
				}
				
			})	
		});	
		m=i+1;
		$('.offersall').css('width',m*474);		
		//alert(i);
		ulcount = m;	
	});
	//alert(ulcount)
	var cr = 0;
	$('.temp').each(function(){
		var imgl = jQuery('<img></img>').attr('src', siteurl + 'images/left.jpg');
		imgl.css('cursor', 'pointer');
		imgl.css('position', 'absolute');
		imgl.css('z-index', '3');
		imgl.css('top', 200);		
		imgl.css('left', 383);	
		imgl.click(function(){
			if(cr<0)cr = cr+1;
			$('#offersall').animate({
 		'left' : cr*474	
 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});					
		});	
		$(this).append(imgl);
		var imgr = jQuery('<img></img>').attr('src', siteurl + 'images/right.jpg');
		imgr.css('cursor', 'pointer');
		imgr.css('position', 'absolute');
		imgr.css('z-index', '3');
		imgr.css('top', 200);		
		imgr.css('left', 427);
		imgr.click(function(){
			if(cr>-ulcount+1)cr = cr-1;
			$('#offersall').animate({
 		'left' : cr*474
 	}, { queue:false, duration:1000, easing: 'easeInOutSine'});					
		});
		$(this).append(imgr);
		
		
	}); 
 	$('#lang').mouseover(function(){
 		$('#lang ul').each(function(){$(this).animate({
 		'top' : 93	
 	}, { queue:false, duration: 500, easing: 'easeInOutSine'});})
 	}); 
 	$('#lang').mouseleave(function(){
 		$('#lang ul').each(function(){$(this).animate({
 		'top' : 30	
 	}, { queue:false, duration: 500, easing: 'easeInOutSine'});})
 	});
 	//stranica portfolio
 	var broikoloni = 0;
 	$('.topli ul').children('li').each(function(i){
 		broikoloni = i; 		
 	});	
 	broikoloni = broikoloni +1;
 	$('.topli').css('width',145*broikoloni);
 	$('.bottomli').css('width',145*broikoloni);
 	var curentkolona = 0;
 	$('#projects_1 #next').click(function(){
 		if(curentkolona+12<broikoloni){
			$('.topli').animate({
			 		'left' : -(curentkolona+6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			$('.bottomli').animate({
			 		'left' : -(curentkolona+6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			curentkolona = curentkolona +6;	 		
 		}else{
			$('.topli').animate({
			 		'left' : -(broikoloni-6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			$('.bottomli').animate({
			 		'left' : -(broikoloni-6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});
				curentkolona = broikoloni-6;
 		}
 	});
 	$('#projects_1 #prev').click(function(){
 		if(curentkolona-6>=0){
			$('.topli').animate({
			 		'left' : (curentkolona+6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			$('.bottomli').animate({
			 		'left' : (curentkolona+6)*144
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			curentkolona = curentkolona -6;	 		
 		}else{
			$('.topli').animate({
			 		'left' : 0
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});		
			$('.bottomli').animate({
			 		'left' : 0
			 	}, { queue:false, duration:1500, easing: 'easeInOutSine'});
				curentkolona = 0;
 		}
 		
 	});
 	$('.topli').children('ul').children('li').each(function(i){
 				$(this).mouseenter(function(){
 					$('#quote-center blockquote').stop();
 					$('#project-info-center p').stop();
 					$(this).css('background-image','url(' + siteurl + 'images/hover.png)')
 					$(this).children('a').children('strong').css('display', 'block');
	 				
 				})						 				
 				$(this).mouseleave(function(){
 					$(this).css('background-image','')
 						$(this).children('a').children('strong').css('display', 'none');
 				});
	 			$(this).click(function(){
	 					document.location = $(this).children('a').attr('href');
	 			});
 				
 	});
 	$('.bottomli').children('ul').children('li').each(function(i){
 				$(this).mouseenter(function(){
 					$('#quote-center blockquote').stop();
 					$('#project-info-center p').stop();
 					$(this).css('background-image','url(' + siteurl + 'images/hover.png)')
 					$(this).children('a').children('strong').css('display', 'block');
 					
	 				
 				})						 				
 				$(this).mouseleave(function(){
 					$(this).css('background-image','')
 						$(this).children('a').children('strong').css('display', 'none');
 				});
 				$(this).click(function(){
 					document.location = $(this).children('a').attr('href');
 				});
 			
 				
 	});
//			$('#fisheye').Fisheye(
//				{
//					maxWidth: 50,
//					items: 'a',
//					itemsText: 'span',
//					container: '.dock',
//					itemWidth: 40,
//					proximity: 90,
//					halign : 'center'
//				}
//			)
//
			$('#dock a').click(function(){
				var b = $(this);
				var button_on = new Image();
				button_on.src = b.attr('href');

				$('#holodpic').fadeOut(500, function(){
					var a = b.attr('href');					
					$('#holodpic').attr('src',button_on.src);
					$('#holodpic').fadeIn(500);
				});
				return false;
				
			});
			
			
	$('#sort_by').mouseenter(function(){
		$('#sort_by ul').animate({
			 		'height' : 100
			 	}, { queue:false, duration:500, easing: 'easeInOutSine'});	
		//$(this).children('span').css('background-color', '#251400');
	//	$(this).children('span').css('color', '#a96500');
	});			
	$('#sort_by').mouseleave(function(){
		$('#sort_by ul').animate({
			 		'height' : 1
			 	}, { queue:false, duration:500, easing: 'easeInOutSine'});	
	//	$(this).children('span').css('background-color', '#955900');
	});
	$('table#table tr').mouseenter(function(){
		$(this).children('td').css('background-image', 'url(' + siteurl + 'images/ov.png)');
	});
	$('table#table tr').mouseleave(function(){
		$(this).children('td').css('background-image', 'url()');
	});
	$('table#table tr#first_row').unbind();
	$('.news-prev').children('li').each(function(i){
		$(this).click(function(){
			var href = $(this).children('a').attr('href');
			document.location = href;
		});
	});
	$('.news-prev').children('li').each(function(i){
		$(this).mouseenter(function(){
			$(this).animate({  		
 		'opacity': 1	
 	}, { queue:false, duration:200, easing: 'easeInOutSine'});
		});
   		$(this).mouseleave(function(){
			$(this).animate({  		
 		'opacity': 0.9	
 	}, { queue:false, duration:200, easing: 'easeInOutSine'});
		});
		
		
	});
	var fw = 450;
		var fh = 290;
	var x;
	var y;
	$().mousemove(function(e){
		x = e.pageX;
		y = e.pageY;
	//	document.title = y;
	});
	$('.getplan').each(function(i){
		var a = $(this).attr('id');
		
		var a = $('html').width();
		a = a/2;
		if($('#form').length>0){
			return false;
		}else 
		{$(this).click(function(){
			var form = jQuery('<div style="border:0; width: 443px; height: 350px; overflow: hidden;margin:0; padding:0;"><iframe  name="fname" style="border:0; width: 443px; height: 350px; overflow: hidden;" src="'+siteurl+'form.php?l='+l+'&amp;id='+$(this).attr('id')+'"></div>').attr('id', 'form');
			var formb = jQuery('<div></div>').attr('id', 'formb');
			form.css('width', fw);
			form.css('height', fh);
			form.css('overflow', 'hidden');
			form.css('position', 'fixed');
			form.css('top', 180);
			form.css('left', 258);
			form.css('z-index', 105);
			form.css('border', "0px");
			formb.css('border', "0px");					
			formb.css('top', 0);
			formb.css('left', 0);
			formb.css('position', 'fixed');
			formb.css('background-image', 'url(' + siteurl + 'images/pp.png)');		
			formb.css('background-color', 'transparent');		
			formb.css('width', '100%');		
			formb.css('padding', 0);		
			formb.css('margin', 0);		
			formb.css('height', '100%');	
			formb.css('z-index', 104);									
			$('body').append(form);
			$('body').append(formb);
			$('#formb').animate({  		
 		'opacity': 1
 	}, { queue:false, duration:500, easing: 'linear'});
 	$('#form').animate({  		
 		'width': fw,
 		'height': fh, 		
 		'top'	: 180,
 		'left'	: 258
 	}, { queue:false, duration:500, easing: 'linear'});		
		
			//alert($('html').scrollTop());
			//alert($('html').width());
			//alert($('html').height());
			return false;
		});
		}
		
	});
	$('.sendmail').click(function(){
		var form = jQuery('<div style="border:0; width: 443px; height: 350px; overflow: hidden;margin:0; padding:0;"><iframe  name="fname" style="border:0; width: 443px; height: 350px; overflow: hidden;" src="'+ siteurl +'formm.php?l='+l+'"></div>').attr('id', 'form');
			var formb = jQuery('<div></div>').attr('id', 'formb');
			form.css('width', fw);
			form.css('height', fh);
			form.css('opacity', 1);
			form.css('overflow', 'hidden');
			form.css('position', 'fixed');
			form.css('top', 180);
			form.css('left', 258);
			form.css('z-index', 105);
			form.css('border', "0px");
			formb.css('border', "0px");					
			formb.css('top', 0);
			formb.css('left', 0);
			formb.css('position', 'fixed');
			formb.css('background-image', 'url(' + siteurl + 'images/pp.png)');		
			formb.css('background-color', 'transparent');		
			formb.css('width', '100%');		
			formb.css('padding', 0);		
			formb.css('margin', 0);		
			formb.css('height', '100%');		
			formb.css('opacity', 1);		
			formb.css('z-index', 104);									
			$('body').append(form);
			$('body').append(formb);
			$('#formb').animate({  		
 		'opacity': 1
 	}, { queue:false, duration:500, easing: 'linear'});
 	$('#form').animate({  		
 		'width': fw,
 		'height': fh,
 		'top'	: 180,
 		'left'	: 258
 	}, { queue:false, duration:500, easing: 'linear'});
//		
		
		return false;
		
	});
	var cp = 0;
	
	var max = 0;
	$('#dock').children('a').each(function(){
		max++;
	});
	max = max - 4;
	$('#moveleft').click(function(){
		if(cp<0){cp++;
		$('#dock').animate({  		 
 		'left'	: cp*162
 	}, { queue:false, duration:500, easing: 'linear'});	
	}});
	
	$('#moveright').click(function(){
		if(cp>-max){cp--;
		$('#dock').animate({  		 
 		'left'	: cp*162
 	}, { queue:false, duration:500, easing: 'linear'});	
	}});
	$('.bldname').unbind('mouseover');
	
	$('.vote a').click(function(){	
		aa = $.ajax({type: "GET",url: siteurl + "ajax/vote.php",data: "id="+ $(this).attr("rel") + "&type=" + $(this).attr("class") , async: false}).responseText;
		if(aa!='not'){
		$(this).parent().children('span').each(function(){
			$(this).html(aa);
			})
		}
	});
	
	
	
	
	
	
	
	
	
});
function hideshow(el){
	el = '#'+el;
	$(el).css('display','none');
	$(el).delay(1000,function(){
		$(el).css('display','block');
	});
}

function explode (delimiter, string, limit) {
    // Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned.  
    // 
    // version: 909.322
    // discuss at: http://phpjs.org/functions/explode    // +     original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: kenneth
    // +     improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: d3x
    // +     bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)    // *     example 1: explode(' ', 'Kevin van Zonneveld');
    // *     returns 1: {0: 'Kevin', 1: 'van', 2: 'Zonneveld'}
    // *     example 2: explode('=', 'a=bc=d', 2);
    // *     returns 2: ['a', 'bc=d']
     var emptyArray = { 0: '' };
    
    // third argument is not required
    if ( arguments.length < 2 ||
        typeof arguments[0] == 'undefined' ||        typeof arguments[1] == 'undefined' )
    {
        return null;
    }
     if ( delimiter === '' ||
        delimiter === false ||
        delimiter === null )
    {
        return false;    }
 
    if ( typeof delimiter == 'function' ||
        typeof delimiter == 'object' ||
        typeof string == 'function' ||        typeof string == 'object' )
    {
        return emptyArray;
    }
     if ( delimiter === true ) {
        delimiter = '1';
    }
    
    if (!limit) {        return string.toString().split(delimiter.toString());
    } else {
        // support for limit argument
        var splitted = string.toString().split(delimiter.toString());
        var partA = splitted.splice(0, limit - 1);        var partB = splitted.join(delimiter.toString());
        partA.push(partB);
        return partA;
    }
}