$(document).ready(function(){ //add tooltips to everything with the class $(".tooltip").tooltip({ track: true, delay: 0, showURL: false, fade: 250 }); // fadeout flash messages on click $('.cancel').click(function(){ $(this).parent().fadeOut(); return false; }); // fade out good flash messages after 3 seconds $('.flash_good').animate({opacity: 0.9}, 3000).fadeOut(); $('.flash_bad').animate({opacity: 0.9}, 3000).fadeOut(); $(function() { $(".good_dialog").dialog({ bgiframe: true, modal: true, buttons: { Ok: function() { $(this).dialog('close'); } } }); $(".bad_dialog").dialog({ bgiframe: true, modal: true, buttons: { Ok: function() { $(this).dialog('close'); } } }); }); $('ul.profile a').click(function() { //$(this).parent().parent().fadeOut(); //get the ul id id = $(this).parent().parent().attr('id'); $('ul#'+id).hide("blind", { direction: "vertical" }, 1000); $('ul#'+id+"_edit").show("blind", { direction: "vertical" }, 1000); return false; }); $(function() { $("#datepicker_home").datepicker({ dateFormat: 'yymmdd', onSelect: function(date) { window.location = "http://www.arrangemeadate.com/dates/mydate/"+date; } }); $("#datepicker_dates").datepicker({ minDate: '0', altField: '#hidden_date', altFormat: 'yy-m-d' }); }); //hide the all of the element with class msg_body //$(".expander").hide(); //toggle the componenet with class msg_body $("h2.bord").click(function() { $(this).next(".expander").slideToggle(600); return false; }); $("#leftbtn").click(function () { //$("#prev").hide("slide", { direction: "right" }, 1000); var siz = $("#prev").css("width"); if(siz == "0px") { $("#leftbtn").html(">"); $("#leftbtn").animate({ height: "200px" }, 500 ); $("#prev").animate({ width: "370px", height: "400px" }, 500 ); $("#readmsg").animate({ width: "500px" }, 500 ); $("#prev").css({ 'overflow-y' : 'scroll', 'overflow-x' : 'hidden' }); $("#profile_preview").animate({ width: "390px", height: "400px" }, 500 ); } else { $("#leftbtn").html("<"); $("#leftbtn").animate({ height: "200px" }, 500 ); $("#prev").animate({ width: "0px" }, 500 ); $("#readmsg").animate({ width: "860px" }, 500 ); $("#prev").css({ 'overflow' : 'hidden' }); $("#profile_preview").animate({ width: "20px", height: "400px" }, 500 ); } }); }); /* Preload Images Function */ /* Jonesys custom function to make items on top of pngs in ie6 clickable */ jQuery.pngLinks = function() { $("a").each( function( intIndex ){ $(this ).css({ position: "relative"}); } ); $("input").each( function( intIndex ){ $(this ).css({ position: "relative"}); } ); } /* Jonesys ie6 fixes function */ jQuery.ie6fixes = function() { //$(document).pngFix({sizingMethod:"crop"}); //$(".textbox_middle").pngFix({sizingMethod:"scale"}); //$('a.home:hover').css({backgroundPosition: '0px 40px'}); //$('a.listen').css({background-position-x: '-73px', background-position-x: '0px'}); //$.pngLinks(); } var defaultMCE = { relative_urls : false, document_base_url : 'http://www.arrangemeadate.com/', theme_advanced_disable: 'image,advimage', plugins : 'safari,spellchecker,inlinepopups,media,contextmenu,paste', mode : 'textareas', theme : 'advanced', theme_advanced_buttons1 : 'bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull', theme_advanced_buttons2 : '', theme_advanced_buttons3 : '', theme_advanced_toolbar_location : 'top', theme_advanced_toolbar_align : 'left', theme_advanced_statusbar_location : 'none', valid_elements : 'p,br,strong/b' };