/*
 *  JS Document
 *  @author:  Petr /Peggy/ Sládek
 *  @web:     DarkyHry.cz
 */
         


$(document).ready(function () {

	$('#left-col').insertBefore("#page-content");
  
  $('.pool-link').each(function() {
    var option_id = $('<input type="hidden" name="option_id">');
    var key = $('span',this).html(); 
    var aHtml = $('<a>').attr('href','#')
                        .addClass('button-small')
                        .addClass('button-gray')
                        .hover(function (){
                                $(this).addClass('button-yellow')
                                $(this).removeClass('button-gray')     
                               },function (){
                                $(this).addClass('button-gray')
                                $(this).removeClass('button-yellow')         
                               })
                        .click(function () {
                          option_id.attr('value',$(this).html());
                          $('#pool-form').append(option_id)
                                         .submit();
                          return false;
                        })
                        .html(key);
    $(this).html(aHtml);
  })
  //$('.vcenter').vAlign();
  
  
	$("#banners").mbScrollable({
			width: 368,
			elementsInPage:1,
			elementMargin:2,
			//shadow:"#999 2px 2px 2px",
			height:"auto",
			controls:"#controls",
			slideTimer: 500,
			autoscroll:true,
			scrollTimer: 4000
	});
});


function akce() {
	for(b in banners) {
		banners[b].hide();
	}
	banners[i].fadeIn(500)
			  .delay(7000)
			  .fadeOut(500);
}
