var aktiv; var memtime; var origx,origy,origw,origh; var varsreload = 5; var txtlink = 'Which image do you want to link to this title?'; var txtsettings= 'Settings'; var txtshare= 'Share'; $("html").css("overflow","hidden"); $(window).load(function(){ /* -- Hide area ---------------------------------------------------------- -- */ $.blockUI({ css: { border: 'none', padding: '0', backgroundColor: 'transparent', opacity: .5, color: '#fff'}, message: '' }); /* -- Timeline ----------------------------------------------------------- -- */ $("#panel").append('
'); /* -- Panel buttons ------------------------------------------------------ -- */ $("#panel").append('
'); $("#panel").append('
'); $("#panel").append('
'); $("#panel").append('
'); /* -- Init search function ----------------------------------------------- -- */ $("#panel").prepend('
'); var runningRequest=false; var request; $('input#searchbox').keyup(function(e){ // window.clearTimeout(aktiv); cleartimeline(); e.preventDefault(); var $q = $(this); if($q.val()=='' || $q.val().length<4){ starttimer(); $("#results").remove(); $(".stripe li").removeClass("lowlight").removeClass("highlight"); return false; } if(runningRequest) request.abort(); runningRequest=true; request=$.post( "showresults.php", { q:$q.val() }, function(response){ showResults(response); runningRequest=false; },"json" ); function showResults(data){ $(".stripe li").removeClass("highlight").addClass("lowlight"); $.each(data, function(i,item){ $(item).removeClass("lowlight").addClass("highlight"); }); $("#results").remove(); $("#searchform").append("
"+$(".highlight").length+"
"); if(data.length==0) starttimer(); } }); /* -- Adjust sizes ------------------------------------------------------- -- */ $("#screen,#detail").css("height",$(window).height()-$("#panel").height()+"px"); $('#screen').load('load.php', function() { $(".box").css("margin","10px auto 10px"); $(".box .stripe").css("margin","10px 0 0 10px"); if($.browser.msie) $(".box .stripe").css("margin-bottom","10px"); $(".stripe ul li").css("margin-bottom","10px"); /* -- Adjust sizes ------------------------------------------------------- -- */ origw=parseFloat($(".stripe ul li:last-child").width(),10); origh=parseFloat($(".stripe ul li:last-child").height(),10); bowi=origw +parseFloat($(".stripe ul li:last-child").css("margin-left"),10) +parseFloat($(".stripe ul li:last-child").css("margin-right"),10); liwi=Math.floor((parseFloat($(window).width(),10)-20-10)/bowi); $(".box,.stripe").css("width",(bowi*liwi+10)+"px"); $(".stripe ul li .double").css("height",(origh)+"px"); $(".stripe ul .content a[rel^='prettyPhoto']").removeAttr("onclick"); $(".stripe ul .head a[rel^='prettyPhoto'],.stripe ul a.head[rel^='prettyPhoto'],.stripe ul .content a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'}); $('.stripe ul .head img[title], .stripe ul .head a[title], .stripe ul a.head[title], .stripe ul .icon[title], .stripe ul .title[title], .stripe ul .content .text[title]').qtip({ style: {name:'dark',background:'#333333',tip:true,border:{width:2,radius:5,color:'#333333'}}, position: {corner:{target:'bottomLeft',tooltip:'topRight'},target: 'mouse', adjust: { mouse: true, screen: true }} }); $(".section a").click(function() { url=$(this).attr("href"); if(url!="") loadsite(url,""); return false; }); $(".stripe ul li:eq(0)").find(".head, .content").css("width",((origw+5)*2)+"px"); $(".stripe ul li:eq(0)").find(".head, .content").css("height",((origh+5)*1)+"px"); $(".stripe ul li:eq(0)").find(".head, .content").css("font-size","2em"); $(".stripe ul li:eq(0)").find(".text").css("padding","10px"); /* -- Big box for big text ----------------------------------------------- -- */ var boxwidth = $(".box,.stripe").width()-10; var boxposition = $(".box:first").position(); $(".stripe ul li:gt(0) .content .text").each(function() { if($(this).text().length>150) { var position = $(this).parent().parent().parent().position(); pl=position.left-boxposition.left-10; if(pl+bowi.5) { $(this).parent().parent().parent().children(".head,.content").css("width",((origw+5)*2)+"px"); } } }); /* -- Adjust image sizes ------------------------------------------------- -- */ $(".stripe ul .headimg").each(function(index) { $(this).load(function() { ww=$(this).parent().parent().innerWidth(); wh=$(this).parent().parent().innerHeight(); wp=ww/wh; iw=$(this).width(); ih=$(this).height(); ip=iw/ih; if(wp0) { $("#detailtext").fadeOut(function(){ $("#detailweb").fadeIn(); }) } else { $("#detail").append('