function womOn(){window.onload=womGo}function womGo(){for(var indx=0;indx<woms.length;indx++)if(woms[indx]!='undefined')eval(woms[indx])}function womAdd(func){if(func!='undefined')woms[woms.length]=func}var woms=new Array();function gId(idName){return document.getElementById(idName)}function Position(){var viewWidth=0,viewHeight=0,iHeight=0,baHeight=0,iFrame=gId('image_frame'),baFrame=gId('browse_about_frame');if(typeof(window.innerWidth)=='number'){viewWidth=window.innerWidth;viewHeight=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){viewWidth=document.documentElement.clientWidth;viewHeight=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){viewWidth=document.body.clientWidth;viewHeight=document.body.clientHeight}if(iFrame!=null){iHeight=(viewHeight-imageHeight)/2-40;if(iHeight<10){iHeight=10}iFrame.style.top=+iHeight+'px'}if(baFrame!=null){baHeight=(viewHeight-baBoxHeight)/2-30;if(baHeight<10){baHeight=10}baFrame.style.top=+baHeight+'px'}}womAdd('iCandy()');womAdd('loadShadowbox()');womAdd('initImage()');womAdd('initImageBorder()');window.onresize=Position;function Browsing(){if(prevID!=imageID){document.write('<a href="#" id="menu_browse_prev" onclick="window.location=\'index.php?showimage='+prevID+'&category='+catID+'\';"></a>');jQuery().keys('[37]',function(){window.location.assign('index.php?showimage='+prevID+'&category='+catID)})}if(nextID!=imageID){document.write('<a href="#" id="menu_browse_next" onclick="window.location=\'index.php?showimage='+nextID+'&category='+catID+'\';"></a>');jQuery().keys('[39]',function(){window.location.assign('index.php?showimage='+nextID+'&category='+catID)})}}function loadShadowbox(){var options={animate:true,animSequence:'sync',displayNav:false,overlayColor:'#000000',overlayOpacity:0.95,continuous:true,displayCounter:true,counterType:'default',viewportPadding:40,handleLgImages:'resize',keysClose:['c','q','x',27],listenOverlay:true,enableKeys:true,handleUnsupported:'remove'};if((document.getElementById("photobox"))||(document.getElementById("caption"))){Shadowbox.init(options)}}function initImage(){if(document.getElementById("photo")){imageId='photo';if(document.getElementById){image=document.getElementById(imageId);setOpacity(image,0);image.style.visibility="visible";setTimeout("fadeIn('photo',0)",0)}}}function initImageBorder(){if(document.getElementById("image_border")){borderId='image_border';if(document.getElementById){Border=document.getElementById(borderId);setOpacity(Border,0);setTimeout("fadeIn('image_border',0)",0)}}}function fadeIn(objId,opacity){if(document.getElementById){obj=document.getElementById(objId);if(opacity<=100){setOpacity(obj,opacity);opacity+=10;window.setTimeout("fadeIn('"+objId+"',"+opacity+")",1)}}}function setOpacity(obj,opacity){opacity=(opacity==100)?99.999:opacity;obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100}function iCandy(){jQuery(document).ready(function(){jQuery('#thumbnails').hover(function(){jQuery(this).fadeTo("slow",1.0)},function(){jQuery(this).fadeTo("slow",0.0)});jQuery('.thumbnails').hover(function(){jQuery(this).fadeTo("slow",0.3)},function(){jQuery(this).fadeTo("slow",1.0)});jQuery('a').hover(function(){jQuery(this).animate({color:'#641AFF'},{queue:false,duration:750})},function(){jQuery(this).animate({color:'#777'},{queue:false,duration:750})});jQuery('#info_details').click(function(){jQuery('#info').fadeIn(900);jQuery('#info_details').css("display","none");jQuery('#info_details_close').css("display","inline")});jQuery('.close, #info_details_close').click(function(){jQuery('#info').fadeOut(900);jQuery('#info_details').css("display","inline");jQuery('#info_details_close').css("display","none")});if(document.getElementById("image_border")){jQuery().keys('[27]',function(){jQuery('#info').fadeOut(900);jQuery('#info_details').css("display","inline");jQuery('#info_details_close').css("display","none")})}})}function simple_tooltip(target_items,name){jQuery(target_items).each(function(i){jQuery("body").append("<div class='"+name+"' id='"+name+i+"'><p>"+jQuery(this).attr('title')+"</p></div>");var my_tooltip=jQuery("#"+name+i);if(jQuery(this).attr("title")!=""&&jQuery(this).attr("title")!="undefined"){jQuery(this).removeAttr("title").mouseover(function(){my_tooltip.css({opacity:0.85,display:"none"}).fadeIn(900)}).mousemove(function(kmouse){var border_top=jQuery(window).scrollTop();var border_right=jQuery(window).width();var left_pos;var top_pos;var offset=15;if(border_right-(offset*2)>=my_tooltip.width()+kmouse.pageX){left_pos=kmouse.pageX-(offset/2)}else{left_pos=border_right-my_tooltip.width()-(offset/2)}if(border_top+(offset*2)>=kmouse.pageY-my_tooltip.height()){top_pos=border_top+(offset*3)}else{top_pos=kmouse.pageY-my_tooltip.height()-offset}my_tooltip.css({left:left_pos,top:top_pos})}).mouseout(function(){my_tooltip.css({left:"-9999px"})})}})}jQuery(document).ready(function(){simple_tooltip("a","tooltip");if(document.getElementById("about_photo")){jQuery('#about_photo').css("display","inline");jQuery(function(){jQuery('#about_photo').cycle({delay:4000,speed:4000,before:onBefore});function onBefore(){jQuery('#caption').html(this.alt)}})}if(document.getElementById("photobox")){if(prevID==imageID){jQuery('.prev_button').css("display","none");jQuery('#footer_nav').css("padding-right","30px")}if(nextID==imageID){jQuery('.next_button').css("display","none");jQuery('.prev_button').css("right","4px");jQuery('#footer_nav').css("padding-right","30px")}}});jQuery.noConflict();
