if(navigator.userAgent.indexOf("Mac")!=-1 && navigator.userAgent.indexOf("MSIE 5")!=-1){document.write('<link rel="stylesheet" type="text/css" href="iefx.css" media="all" />');mac=1;}

if(screen.height>1000){
	document.write('<style type="text/css">#wrapper{margin-top:80px;}</style>');
}

document.getElementById?ok=1:ok=0;

function writeFl(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="764" height="65" id="nav"> <param name="movie" value="nav.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="scale" value="noscale" /> <param name="salign" value="LT" /> <param name="wmode" value="transparent" /> <param name="bgcolor" value="#ffffff" /> <embed src="nav.swf" menu="false" quality="high" scale="noscale" wmode="transparent" salign="LT" bgcolor="#ffffff"  width="764" height="65" name="nav" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');
}

function writeFl2(a){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="333" height="404" id="'+a+'"> <param name="movie" value="'+a+'.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <embed src="'+a+'.swf" menu="false" quality="high" bgcolor="#FFFFFF"  width="333" height="404" name="'+a+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>');
}



document.write('<style type="text/css">#gallery-pics img{cursor:pointer;}</style>');

var ups;
var scr;


function sup(d){

	if(ok){
		d?scr=d:d=scr;
		clearTimeout(ups);

		t=document.getElementById(d);
		n=parseInt(t.style.top);
		p=t.parentNode.offsetHeight;

		if(n>-t.offsetHeight+p){

			t.style.top=(n-12)+'px';
			ups=setTimeout("sup()",50);

		}
	}
}

function sdn(d){

	if(ok){
		d?scr=d:d=scr;
		clearTimeout(ups);

		t=document.getElementById(d);
		n=parseInt(t.style.top);

		if(n<0){

			t.style.top=(n+12)+'px';
			ups=setTimeout("sdn()",50);

		}
	}
}

function stp(){
	if(ok){clearTimeout(ups);}
}


function ow(a,b){
	re=/\d\d\d\.jpg/;
	mtch=a.src.match(re);
	var pge="pu.htm?" + mtch[0];
	vs='height=320,width=430,resizable';
	if(typeof(opWin) =="undefined" || opWin.closed == true){
	opWin=window.open('','op',vs);opWin.location.href=pge;
	}
	else{
	opWin.location.href=pge;
	}
	opWin.focus();
}


if (window.sidebar){document.onmousedown=new Function("return false");document.onclick=new Function("return true");}
document.oncontextmenu=new Function("return false");document.onselectstart=new Function ("return false");


function prin(){
	if(document.getElementById && document.getElementById('headerpr')){
		document.getElementById('headerpr').innerHTML='<img src="images/headerbg.jpg" style="height:100px;width:754px;" alt="" />';
	}
}
function prout(){
	if(document.getElementById && document.getElementById('headerpr')){
		document.getElementById('headerpr').innerHTML='';
	}
}
window.onbeforeprint=prin;
window.onafterprint=prout;

/*
jQuery(document).ready(function($){ 

	$('#navholder li').not('#navholder li li').each(function(){
		var li = $(this);
		if(li.find('ul').length > 0){
			li.find('ul').hide().end()
			.mouseenter(function(){
				li.find('ul').stop().show('blind',{'easing':'easeOutBack'},700).end().find('a').not('li li a').css('opacity',0.25);
			}).mouseleave(function(){
				li.find('ul').stop().hide().end().find('a').not('li li a').css('opacity',1);
			})
			.find('a').not('li li a').addClass('withSub').end().end();
;
		}
	});

});
*/


$.noConflict();

jQuery(document).ready(function($){

	$('body').removeClass('no_js').addClass('js');

	$('#fll-rs:not(.hold)').skitter({interval:5000, navigation:false, label:false, numbers:false, animation:'cubeHide'});
	
	$('a.with_sub').click(function(){
		return false;
	}).mouseenter(function(){
		$(this).next('ul:not(:animated)').fadeIn(300);
	}).closest('li').mouseleave(function(){
		$(this).find('ul').hide();
	});

});
