$(document).ready(function(){ 

	if ($.browser.opera) {
		   $("div#searchBar input#searchSubmitButton").css('top','-8px');
	}

	$("div#searchBar input#searchSubmitButton").css('visibility','visible');
	
	
	$("ul.sf-menu").supersubs({
		minWidth: 12,
		maxWidth: 27,
		extraWidth: 1
	}).superfish({
		autoArrows: true,
		dropShadows: true,
		delay: 1400
	}).find('ul').bgIframe({opacity:false});  
	
	$("ul.sf-menu li span.seperator:last").hide();
    
	$("div#imageBasket").slideshow({
		pauseSeconds: 6,
		width: 980,
		height: 160
	});

	i = 0;
	$("div.gallaryTable").each(function(){
		$(this).addClass("myClass_" + i);
		i++; 
	});	
   
	a = 0;

	$("div.gallaryTable").each(function(){

	    $("div.myClass_" + a + " a[rel*=ltbox]").lightBox({
			overlayBgColor: '#ACA5C6',
			overlayOpacity: 0.9,
			imageLoading: '/template/images/lightbox-0.5/lightbox-ico-loading.gif',
			imageBtnClose: '/template/images/lightbox-0.5/lightbox-btn-close.gif',
			imageBtnPrev: '/template/images/lightbox-0.5/lightbox-btn-prev.gif',
			imageBtnNext: '/template/images/lightbox-0.5/lightbox-btn-next.gif',
			containerResizeSpeed: 250,
			txtImage: 'Foto',
			txtOf: 'van'
	   	});
		a++;
	
	});	
	
	
	if($('div#newsLetterDisplay').size()===1){
		setTimeout(function(){
			$('div#newsLetterDisplay').animate({
				'top': '0'
			},'slow','swing',function(){
				setTimeout(function(){
					$('div#newsLetterDisplay').animate({
						'top': '-100'
					},'normal');
				},5000);
			});
		},10);
	}
}); 


function printwindow(mypage,myname,w,h){
  LeftPosition=(screen.width)?(screen.width-w)/2:100;
  TopPosition=(screen.height)?(screen.height-h)/2:100;
  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
  win=window.open(mypage,myname,settings);
}
 
