var $j=jQuery.noConflict();function modul_box()
{var iSerial;var iDisplay;var iCount=0;iSerial=$j.cookie('iphonecustomOrder');iDisplay=$j.cookie('iphonecustomDisplay');if(iSerial&&iDisplay)
{iSerial=iSerial.split(',');iDisplay=iDisplay.split(',');$j(iSerial).each(function(i)
{$j('#leftcolumn').append($j("#"+this));$j("#"+this).find('.modul-box-content').css('display',iDisplay[iCount]);if(iDisplay[iCount]=='none')
{$j("#"+this).find(".modul-box-header").addClass('active');}
iCount=iCount+1;});}
$j("#leftcolumn").sortable({scroll:true,axis:"y",stop:orderChanged,scrollSpeed:50,cursor:"NS-resize",handle:'.move',containment:"parent",opacity:0.7,forcePlaceholderSize:true,placeholder:"ui-selected"});$j('#leftcolumn .modul-box .expand').click(toggleDisplay)}
function orderChanged(el,ui)
{updateCookie()}
function updateCookie()
{var iSerial;iSerial=$j("#leftcolumn").sortable('toArray');$j.cookie('iphonecustomOrder',iSerial,{path:"/",expires:365});var iDisplay;var strCookie="";var iCount=1;$j("#leftcolumn .modul-box").each(function(i)
{if(iCount>1){strCookie+=",";}
strCookie+=$j(this).find('.modul-box-content').css('display');iCount++});$j.cookie('iphonecustomDisplay',strCookie,{path:"/",expires:365})}
function toggleDisplay()
{var headerEl=$j(this).parent();var el=$j('.modul-box-content',headerEl.parent());var alpha=el.css('opacity');var animateSetting={height:'toggle'};animateSetting.opacity=(el.css('display')=='none')?1:0;headerEl.toggleClass('active');el.animate(animateSetting,250,"easeOutQuad",updateCookie);}
function navmenu()
{$j("ul.sf-menu").supersubs({minWidth:12,maxWidth:27,extraWidth:1}).superfish({delay:1000,speed:'fast',dropShadows:false})
$j("ul.sf-menu li a").hover(function(){$j(this).attr("title","");})}
function lightbox()
{$j('a[rel*=lightbox]').lightBox();}
function tabMain(){$j('#tabvanilla,#tabs-tagcat,#shoptabs,#postswidget,#externwidget').tabs({cookie:{path:"/",expires:30}})}
function iPcAccordion()
{$j("#accordion").accordion({active:0},{header:'div>li'},{autoHeight:false},{navigation:true});}
function toggleAuthor(divid){if(document.getElementById(divid).style.display=='none'){document.getElementById(divid).style.display='block';}else{document.getElementById(divid).style.display='none';}}
function kiekeboe(){$j('.kiekeboe').hide();$j('.kiekeboeToggle').click(function(){$j('.kiekeboe').toggle('fast');return false;})}
function col2(){$j('.col-2').show();}
$j(document).ready(launchMain);function launchMain(){col2();navmenu();tabMain();modul_box();lightbox();iPcAccordion();kiekeboe();}
