function windowsResize(){ $("#wrapper").height(Math.max($(window).height(), 773, 150-27+$('#content').height())); $(".row").width(($(window).width()-950)/2); } $(document).ready( function(){ // Add markItUp! to your textarea in one line // $('textarea').markItUp( { Settings }, { OptionalExtraSettings } ); $('#markItUp').markItUp(mySettings); // You can add content from anywhere in your page // $.markItUp( { Settings } ); $('.add').click(function() { $.markItUp( { openWith:'', closeWith:'<\/closing tag>', placeHolder:"New content" } ); return false; }); // And you can add/remove markItUp! whenever you want // $(textarea).markItUpRemove(); $('.toggle').click(function() { if ($("#markItUp.markItUpEditor").length === 1) { $("#markItUp").markItUpRemove(); $("span", this).text("get markItUp! back"); } else { $('#markItUp').markItUp(mySettings); $("span", this).text("remove markItUp!"); } return false; }); //alert('ready'); windowsResize(); $(window).resize( function(){ windowsResize(); } ); $(".parent").mouseenter( function(){ $(this).children('ul').height('auto'); } ); $('.parent').mouseleave(function() { $(this).children('ul').height('0px'); }); $(".swm_tags").click(function(){ var value = $(this).html(); var value_id = $(this).attr("id"); var strcontrol = $("#swm_discussion_tags").val(); var strcontrol_id = $("#swm_discussion_tags_id").val(); var num = new Array(); num = strcontrol.split(','); if(num.length < 5){ if(strcontrol.indexOf(value+",") == '-1'){ $("#swm_discussion_tags").val(strcontrol+value+","); $("#swm_discussion_tags_id").val(strcontrol_id+value_id+","); } } }); $("#discussionformlink").click(function(){ $("#insertform").toggle(); if ($(this).css('background-position')=='100% -30px') $(this).css('background-position', '100% 17px'); else $(this).css('background-position', '100% -30px'); windowsResize(); }); $("#insertform").hide(); windowsResize(); } ); function openCommentForm(idOpen, classClose){ $("."+classClose).hide(); $("#"+idOpen).show(); windowsResize(); }