/* panel */ $(document).ready(function(){ $('head').prepend(''); $('body').prepend('
'); }); $(window).scroll(function(){if ($(this).scrollTop() > 0) {$("#advanced").css({position:'fixed'});} else {$("#advanced").css({position:'relative'});}}); $(function(){ $.cookie("panel"); $.cookie("panel2"); var strCookies = $.cookie("panel"); var strCookies2 = $.cookie("panel2"); var tglflg1,tglflg2 if(strCookies=='boo') { if(strCookies2=='opened'){$("#advanced").css({marginTop:'0px'}).removeClass('closed')}else{$("#advanced").css({marginTop:'-40px'}).addClass('closed')} $("#advanced .trigger").click(function(){ if(tglflg1=!tglflg1){ $(this).find('strong').animate({opacity:0}).parent().parent('#advanced').removeClass('closed').animate({marginTop:'0px'},"fast"); strCookies2=$.cookie("panel2",'opened'); strCookies=$.cookie("panel",null); }else{ $(this).find('strong').animate({opacity:1}).parent().parent('#advanced').addClass('closed').animate({marginTop:'-40px'},"fast") strCookies2=$.cookie("panel2",null); strCookies=$.cookie("panel",'boo'); } }) } else { $("#advanced").css({marginTop:'0px'}).removeClass('closed'); $("#advanced .trigger").click(function(){ if(tglflg2=!tglflg2){ $(this).find('strong').animate({opacity:1}).parent().parent('#advanced').addClass('closed').animate({marginTop:'-40px'},"fast"); strCookies2=$.cookie("panel2",null); strCookies=$.cookie("panel",'boo'); }else{ $(this).find('strong').animate({opacity:0}).parent().parent('#advanced').removeClass('closed').animate({marginTop:'0px'},"fast") strCookies2=$.cookie("panel2",'opened'); strCookies=$.cookie("panel",null); } }) } }); /*--------- end panel *------------*/ $(document).ready(function() { $('[data-toggle="modal"]').click(function(e) { e.preventDefault(); var href = $(this).attr('href'); var rel = $(this).attr('rel'); if (!rel) { $(href).modal('open'); } else { $.get(rel, function(data) { $('').modal(function(){return false;}).on('hidden', function(){ $('#tmp').remove(); });; }); } }); });