var nowimg = 0;
$(document).ready(function(){

$("#topthumbsslider").css({width:(images*136)+"px"});

$('.dropdown > .dropme').live('mouseover', dropdown_open);
$('.dropdown > .dropme').live('mouseout', dropdown_timer);
$("body").live('click', dropdown_close);


});
function slideimgs(dir) {
nowimg+=(dir*3);
if (nowimg>=images) {nowimg=0;}
if (nowimg<0) {nowimg=images-3;}
$("#topthumbsslider").animate({left: "-"+(nowimg*136)+"px"}, 500);
}
function showphoto(file) {
$("#bigimg").html('<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="326" height="326" id="bigphotoswf" align="middle"><param name="movie" value="gfx/photoviewer.swf" /><param name="FlashVars" value="loadphoto='+file+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" /><embed src="gfx/photoviewer.swf?loadphoto='+file+'" quality="high" FlashVars="loadphoto='+file+'" swliveconnect="true" bgcolor="#ffffff" wmode="transparent" width="326" height="326" name="bigphotoswf" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}


var closetimer;
var dropdownmenuitem;

function dropdown_open() {
dropdown_canceltimer();
dropdown_close();
dropdownmenuitem = $(this).find('.inbl').css('display', 'inline-block');
}

function dropdown_close() {
if(dropdownmenuitem) {dropdownmenuitem.css('display', 'none');}
}

function dropdown_timer() {
closetimer = window.setTimeout(dropdown_close, 500);
}

function dropdown_canceltimer() {
if(closetimer) {window.clearTimeout(closetimer);}
}

