
<!--
/**
 * @author tomasztu
 */
(function($){
    jQuery.fn.conciergeTeam = function(){
        $(this).find("ol.pages > li li").each(function(){
            $(this).css("cursor", "pointer").click(function(){
                var trgt = $(this).find("p > a").attr("href");
                document.location.href = trgt + "#" + current;
                return false;
            })
        })
  
        return this.each(function(){
            var el = $(this);
            pages = pages || getPages(el);
            pageWidth = pageWidth || getPageWidth(el);
            current = current || getCurrentPage(el);
            bind(el);
        });
    }
 
    var pages;
    var pageWidth;
    var current;
 
    function bind(el){
        $('p.next', el).click(function(e){
            e.preventDefault();
            goToNext(el);
        });
        $('p.prev', el).click(function(e){
            e.preventDefault();
            goToPrev(el);
        });
        goToPageAfterLoad(el);
    };
 
    function goToPageAfterLoad(el){
        nr = document.location.href.split('#');
        if (nr[1] > 1) {
            current = nr[1];
   $('ol.pages', el).css('marginLeft',-(current - 1) * pageWidth + 'px'); 
        }
        else {
            current = 1
        }
        updatePage(el);
    };
 
    function goToNext(el){
        if ($('ol.pages:animated', el).length > 0) 
            return false;
        if (current == pages) {
            animation = 0;
            current = 1;
        }
        else {
            animation = '-=' + pageWidth + 'px';
            current++;
        }
        $('ol.pages', el).animate({
            'marginLeft': animation
        }, 'slow');
        updatePage(el)
    };
 
    function goToPrev(el){
        if ($('ol.pages:animated', el).length > 0) 
            return false;
        if (current != 1) {
            animation = '+=' + pageWidth + 'px';
            current--;
        }
        else {
            animation = -pageWidth * (pages - 1);
            current = pages;
        }
        $('ol.pages', el).animate({
            'marginLeft': animation
        }, 'slow');
        updatePage(el)
    };
 
    function getPages(el){
        return $('ol.pages > li', el).length;
    };
 
    function getPageWidth(el){
        return $('ol.pages > li:first', el).width();
    };
 
    function getCurrentPage(el){
        updatePage(el);
        return $('ol.pages > li', el).index($('li.current')[0]) + 1;
    };
 
    function updatePage(el){
        $('p.current span', el).text(current);
    };
 
})(jQuery);
//-->

<!--
$(window).load(function(){
var l = new String(window.location.hash);
if(l.indexOf("triggerL") != -1) {
   $("#goLogin").trigger("click");
}
});


           $(function(){



    // test
    $('a.back').click(function(){
        history.go(-1);
    });
    $('input.text').inputFill();
    $('#city-select, select.select').selectbox();
    $('#team-concierge').conciergeTeam();
    $('ul#slider-area .img-holder').galleryslide({
        navigation: $("#slider-nav"),
        loop: true,
        autoplay: true,
        delay: 10000,
        bubbleElements: 'ul,p'
    });
    });
	
//galeria
(function($) {
 jQuery.fn.galleryslide = function(options) {
  /* global/scope vars and stuff */
   
  var opts = jQuery.extend({}, $.fn.galleryslide.defaults, options);
  var animating = false;
  delay = opts.delay;
  autoplay = opts.autoplay;
  loop = opts.loop;
  bubbleElements = opts.bubbleElements;
  slideimages = this;
  
  if (slideimages.length == 1) {
   $(slideimages[0]).show();
  }
  if (slideimages.length < 2) {
   return false; 
  }
  navarea = $(opts.navigation);
  
  /* generate navigation */
  
  for (i = 0; i < slideimages.length; i++) {
   $(opts.navigation).append("<li><a href='#'>" + $(slideimages).find("img").attr("title") + "</a></li>") 
  }
  
  navigators = $(opts.navigation).find("a");
  activeNav = $(navigators[0]).parent().addClass("active");
  activeArea = $(slideimages[0]).addClass("visible");
  
  
  $(navigators).click( function() {
     
   if (animating) { 
    return false
   }
   /* remember indexes before change */
   
   var toShow = $(navigators).index(this);
   var toHide = $(navigators).index($(activeNav).find("a"));
   /* check is there is something to change */
   
   if (toShow == toHide) {
    return false
   }
   
   animating = true;
      
   /* change active navigator */
   
   $(activeNav).removeClass("active");
   activeNav = $(this).parent().addClass("active");
   
   /* handlers and private vars */
   
   var toShowObj = $(slideimages[toShow]);
   var toHideObj = $(slideimages[toHide]);
   
   var toHideHeight = $(toHideObj).height();
   /* which way, commander? */
   
   if (toShow < toHide) {
    toHideHeight = 0 - toHideHeight
   }
   
   /* animation */
   
   if (bubbleElements != "") {
    bubbles = $(toShowObj).find(bubbleElements).each( function() {
     $(this).css("opacity", "0").css("visibility", "hidden")
    })
   }
   
   $(toShowObj).css("opacity", 0);
   $(toShowObj).css("display", "block");
   cntHeight = 0;
   $(toShowObj).children().each( function() { 
    cntHeight = cntHeight + $(this).height()
   })
   
   $(slideimages).parent().height(cntHeight+11).parent().height(cntHeight); // ,,God grant me the serenity to accept the things I cannot change`` | EVILSTUFF!
   
   $(toShowObj).animate({
    opacity: 1
   }, {
    duration: 500,
    queue: false,
    easing: "swing"
   });
   $(toHideObj).animate({
    opacity: 0
   }, {
    duration: 500,
    queue: false,
    complete: function() {
     $(toHideObj).removeClass("visible");
     animating = false;
     if (autoplay) {
      clearTimeout(myTimer);
     }
     
     if (bubbleElements != "") {
      $(bubbles).each(function() {
       $(this).css("visibility", "visible")
       rnd = (parseInt(Math.random(5) * 10) + 1) * 100;
       
       $(this).animate({
        opacity: 1
       }, {
        duration: rnd,
        queue: true,
  complete: function() { $(this).css("zoom", "0") }
       })
      })
     }
     
       
     if (autoplay) {
      myTimer = setTimeout(autoNext, delay)
     }   
     
    }
   });
   
   $(toShowObj).addClass("visible");
   
   return false;
   
  })
  
  /* autoplay */
  
  if (!autoplay) {
   
   return false
   
  }
  
  myTimer = setTimeout(autoNext, delay)
  
 };
 
  autoNext = function() {
   
   act = $(navigators).index($(activeNav).find("a"));
   
   if ((act + 1) != slideimages.length) {
    $(activeNav).next().find("a").click()
   } else {
    
    if (loop) {
     $(navigators[0]).click()
    }
    
   }
   
   myTimer = setTimeout(autoNext, delay)
  }
 
  /* defaults */
  
 jQuery.fn.galleryslide.defaults = {
        navigators : '',  // container in which navigation links should be generated (jQuery object)
  speed : 5,    // nothing yet ;-) TODO -- speed of animation
  autoplay: false,  // should the sliding start automatically? (boolean)
  loop: false,   // should it loop? (boolean)
  delay: 10000,   // delay between changing photos in (msecs)
  bubbleElements: ''  // elements inside that should be animated separately (jQuery selector, i.e 'p,ul')
    };
})(jQuery);
//-->

<!--
/**
 * jquery.inputfill.js
 * @author szymonp@k2.pl
 */
(function($){
    $.fn.inputFill = function(options){
    
        var opts = jQuery.extend({}, $.fn.inputFill.defaults, options);
        
        var obj = this;
        
        obj.each(function(){
            var startval = $(this).val();
            $(this).focus(function(){
                if ($(this).val() == startval) {
                    $(this).val(opts.text);
                }
            }).blur(function(){
                if ($(this).val() == opts.text) {
                    $(this).val(startval);
                }
            })
        })
    }
    
    jQuery.fn.inputFill.defaults = {
        text : ''
    };
    
})(jQuery);
//-->

