
jQuery(document).ready(function($){
	//$('#StyledSelect').styledSelect();
	
	
	buttonOverState('.newsletterForm .DivInputSubmit .inputSubmit', 'inputSubmitOver');
	buttonOverState('.formLoginPerson .input_submit_container .inputSubmit', 'inputSubmitOver');
	buttonOverState('.formLoginOrganizations .input_submit_container .inputSubmit', 'inputSubmitOver');
	buttonOverState('.registrationStep2 .input_submit_container .inputSubmit', 'inputSubmitOver');
	
	//button hover
	$('.buttonDark,.buttonLight').hover(function(){$(this).addClass('buttonOver')},function(){$(this).removeClass('buttonOver')})
	
	// Set captcha by JS
	$("input[name='cap_prot']").val('1');
	
	
	
	
	
	
	$('#styledSelect_subject').styledSelect({
		"selectClass": "styledSelect_240_18"
		,"zIndexApply": true
		,"zIndexStart": 305
	});
	
	//$('.main_wrapper').height($(document).height())

});


/* OnOver - add clas for IE - Should be used on elements different from Links */
function buttonOverState(selector, className)
{
	/* Hover over the login button */
	$(selector).hover(function(){
		$(this).addClass(className);
	},
	function(){
		$(this).removeClass(className);
	});
}



window.onload = function(){
	
	$('.imgsleft li').each(function(i){
		
		var elm = $('<div></div>');
		elm.addClass('teaserElm');
		
		var img = $('<img />');
		img.attr('src',$('.src',$(this)).text());
		
		if(i==0){
			
			    img.load(function(){
				
					$(".teaser").cycle({
					    fx:     'fade',
					    speed: 600,
					    timeout: 6000, // > 0(miliseconds) to scroll automaticly, 0 for manual scroll
					    pause: false
				});
						
				
			})
		}
		
		elm.append($('a',$(this)));
		elm.append(img);
		$('.teaser').append(elm);
		
		
		
	})
}
