	$(document).ready(function() {
	//kwicksmenu
				$('#kwicksNavi .kwicks').kwicks({
					max : 275,
					spacing : 20
				});
				
				$('#horizontal .kwicks').kwicks({
						max : 190,
						spacing : 1,
						isVertical : true
				});

				$('#coursesnfo .kwicks').kwicks({
						max : 190,
						spacing : 5,
						isVertical : true
				});
                                $('#ccoursesnfo .kwicks').kwicks({
						max : 127,
						spacing : 3,
						isVertical : true
				});
	//colorbox
				$.fn.colorbox.settings.bgOpacity = "0.6";
				$("#warningInfo").colorbox({inline:true, href:"#warningContent"});
				$("#newsJoin").colorbox({inline:true, href:"#joinContent"});
				$("#fullList").colorbox({inline:true, href:"#clientList"});
				$("#eApply").colorbox({inline:true, href:"#formContainer"});
				$(".apply").colorbox({inline:true, href:"#formContainer"});
				$("a[rel='albumname']").colorbox({transition:"fade"});
				$(".slideshow").colorbox({transition:"fade", slideshow:true});
	//img fade		
				$('#partners li')
           .removeClass('highlight')
           .find('a')
           .append('<span class="hover" />').each(function () {
                   var $span = $('> span.hover', this).css('opacity', 0);
                   $(this).hover(function () {
                       // on hover
                       $span.stop().fadeTo(500, 1);
                   }, function () {
                       // off hover
                       $span.stop().fadeTo(1000, 0);
                   });
               });
	//email address			
			$('#emailAddress').click(
						function() {
						if (this.value == this.defaultValue) {
						this.value = '';
						}
						}
						);
						$('#emailAddress').blur(
						function() {
						if (this.value == '') {
						this.value = this.defaultValue;
						}
						}
					);
			$('a.email').nospam();
			
			$('#emailButton').click(function() { 
				ActionSubsciber($('input[name="subscribe"]:checked').val(), $('#emailAddress').val()); 
			});
			
	// wysylanie forma
			$('#submitButton').click(function() {
				SendForm();
			});
			
			$('#type').change(function() {
				if($('#type :selected').val() != 1)
					$('#youngLink').fadeIn('slow');
				else
					$('#youngLink').fadeOut('slow');
			});
			
		//albums fadein
			$('.albumHolder').hide();
			$('.albumHolder').fadeIn(3000);
			$('.photo').hide();
			$('.photo').fadeIn(3000);
                  
              //    $(function () {
            // basic version is: $('div.demo marquee').marquee() - but we're doing some sexy extras
        
            //      $('div.coursesNews marquee').marquee('pointer').mouseover(function () {
            //      $(this).trigger('stop');
            //      }).mouseout(function () {
           //       $(this).trigger('start');
           //       }).mousemove(function (event) {
          //        if ($(this).data('drag') == true) {
           //       this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
           //       }
          //        }).mousedown(function (event) {
           //       $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
          //        }).mouseup(function () {
         //         $(this).data('drag', false);
                  
         //   });
      //   });
});
