﻿
InitSite=function(){var div=$('.content-inner');div.animate({paddingTop:180+'px'},'slow');div.fadeIn('slow');$('.tag-cloud').fadeIn('slow');var tags=$('.tag-cloud div');tags.fadeIn('slow');tags.each(function(i){var tag=$(this);tag.mousedown(function(){$(this).unbind('mousedown');hideOthers(this);});});};InitContact=function(){var link=$('.contact');link.click(function(){$('.contact-form').dialog('open');});$('.contact-close').click(function(){$('.contact-form').dialog('close')});var dlg=$('.contact-form').dialog({bgiframe:true,autoOpen:false,modal:true,position:'center',closeOnEscape:true,width:'60%',resizable:false,draggable:false});dlg.parent().appendTo($("form:first"));};CloseDialog=function(){$('.contact-form').dialog('close');$('.contact-form').dialog('close');};hideOthers=function(ob){var tags=$('.tag-cloud div');tags.not(ob).each(function(){$(this).animate({opacity:'.3',width:'90px',height:'75px'});$(this).find('p').slideUp('slow').fadeOut('fast');});$(ob).animate({width:'200px',height:'200px',opacity:1},'fast').find('p').text($(ob).attr('rel')).slideDown('fast').fadeIn('slow');$(ob).mousedown(function(){tags.each(function(){$(this).animate({opacity:'1',width:'90px',height:'75px'}).find('p').slideUp('slow').fadeOut('fast');$(this).mousedown(function(){$(this).unbind('mousedown');hideOthers(this);});});});};AlignOthers=function(ob){var tags=$('.tag-cloud div');var curTag=$(ob);var othTag=tags.not(ob);var p=curTag.position();othTag.each(function(){$(this).animate({top:p.top+'px',left:p.left+'px',zIndex:999},'slow');});};InitTagCloud=function(){};AnimateTags=function(){var cloud=$('#cloud');cloud.css('display','block');var tags=$('#cloud span');var options={};tags.animate({fontSize:'2em'},'slow');tags.each(function(i){var top=GetRandom();var left=GetRandom();$(this).css('position','absolute');$(this).animate({top:top+'px',left:left+'px',opacity:'.2'},'medium');});};FadeTags=function(){var tags=$('#cloud div');tags.each(function(i){$(this).fadeOut();});};GetRandom=function(){return Math.round(Math.floor(Math.random()*100)*5);};var iRotate=0;GetRotation=function(){return Math.floor(Math.random()*4);};GetFontSize=function(){return Math.round(Math.floor(Math.random()*100));};SendEmail=function(){};