$(document).ready(function() { //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the A tag var id = $(this).attr('href'); //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({'width':maskWidth,'height':maskHeight}); //transition effect $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/2-$(id).width()/2); //transition effect $(id).fadeIn(2000); }); //if close button is clicked $('.window .close').click(function (e) { //Cancel the link behavior e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function () { $(this).hide(); $('.window').hide(); }); }); //** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com //** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/ //** Menu created: Nov 12, 2008 //** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level) contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth //** Feb 11th, 09" (v1.02): The currently active main menu item (LI A) now gets a CSS class of ".selected", including sub menu items. //** May 1st, 09" (v1.3): //** 1) Now supports vertical (side bar) menu mode- set "orientation" to 'v' //** 2) In IE6, shadows are now always disabled //** July 27th, 09" (v1.31): Fixed bug so shadows can be disabled if desired. //** Feb 2nd, 10" (v1.4): Adds ability to specify delay before sub menus appear and disappear, respectively. See showhidedelay variable below //** Dec 17th, 10" (v1.5): Updated menu shadow to use CSS3 box shadows when the browser is FF3.5+, IE9+, Opera9.5+, or Safari3+/Chrome. Only .js file changed. var ddsmoothmenu={ //Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs): arrowimages: {down:['downarrowclass', '../../vcms_temi/'+tema+'immagini/down.gif'], right:['rightarrowclass', '../../vcms_temi/'+tema+'immagini/right.gif']}, transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds shadow: {enable:false, offsetx:5, offsety:5}, //enable shadow? showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively ///////Stop configuring beyond here/////////////////////////// detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc) detectie6: document.all && !window.XMLHttpRequest, css3support: window.msPerformance || (!document.all && document.querySelector), //detect browsers that support CSS3 box shadows (ie9+ or FF3.5+, Safari3+, Chrome etc) getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu $menucontainer.html("Loading Menu...") $.ajax({ url: setting.contentsource[1], //path to external menu file async: true, error:function(ajaxrequest){ $menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText) }, success:function(content){ $menucontainer.html(content) ddsmoothmenu.buildmenu($, setting) } }) }, buildmenu:function($, setting){ var smoothmenu=ddsmoothmenu var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL //$mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu" var $headers=$mainmenu.find("ul").parent() $headers.hover( function(e){ $(this).children('a:eq(0)').addClass('selected') }, function(e){ $(this).children('a:eq(0)').removeClass('selected') } ) $headers.each(function(i){ //loop through each LI header var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header var $subul=$(this).find('ul:eq(0)').css({display:'block'}) $subul.data('timers', {}) this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header? $subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0}) $curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {}).append( //add arrow images '' ) $curobj.hover( function(e){ var $targetul=$subul //reference UL to reveal var header=$curobj.get(0) //reference header LI as DOM object clearTimeout($targetul.data('timers').hidetimer) $targetul.data('timers').showtimer=setTimeout(function(){ header._offsets={left:$curobj.offset().left, top:$curobj.offset().top} var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent if ($targetul.queue().length<=1){ //if 1 or less queued animations $targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime) } }, ddsmoothmenu.showhidedelay.showdelay) }, function(e){ var $targetul=$subul var header=$curobj.get(0) clearTimeout($targetul.data('timers').showtimer) $targetul.data('timers').hidetimer=setTimeout(function(){ $targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime) }, ddsmoothmenu.showhidedelay.hidedelay) } ) //end hover }) //end $headers.each() $mainmenu.find("ul").css({display:'none', visibility:'visible'}) }, init:function(setting){ if (typeof setting.customtheme=="object" && setting.customtheme.length==2){ //override default menu colors (default/hover) with custom set? var mainmenuid='#'+setting.mainmenuid var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid document.write('') } this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow jQuery(document).ready(function($){ //ajax menu? if (typeof setting.contentsource=="object"){ //if external ajax menu ddsmoothmenu.getajaxmenu($, setting) } else{ //else if markup menu ddsmoothmenu.buildmenu($, setting) } }) } } //end ddsmoothmenu variable function conferma_reload() { $.fn.colorbox.close(); location.href=location.href; } $(document).ready(function(){ jQuery('.lightbox').lightbox(); $(".vcms_submit").live("click",function(){ var data = ''; data = $(this).closest("form").serialize(); var vcms_varblock = data.split('&'); $.each(vcms_varblock, function(key, value) { var vcms_varvar = value.split('='); window[vcms_varvar[0]] = vcms_varvar[1]; if(typeof larghezza_box_vcms == 'undefined'){ larghezza_box_vcms ='400';} }); $.ajax({ type: "POST", url: "../../cms/azioni_admin/comandi.php", data: data, success:function(data){ //alert(data); $().colorbox({html: data, open:true,width:larghezza_box_vcms}); $('#loader').delay(500).animate({'opacity':1},500); $('body').delay(500).css("background-image", "url('')"); } }); return false; }); $(function() { //$('.vcms_modulo').jScrollPane(); }); $("#vcms_esegui_submit").live("click",function(){ var data = $(this).closest("form").serialize(); $.ajax({ type: "POST", url: "http://www.vectordesign.it//cms/azioni_admin/comandi.php", data: data, success:function(data){ $().colorbox({html: data, open:true}); $.fn.colorbox.close(); location.reload(); } }); return false; }); $(".azioni").colorbox({width:"700px",height:"150px", iframe:true, onClosed:function(){ location.href=location.href; }}); $(".dati").colorbox({width:"750px",height:"150px", iframe:true}); $(".layout").colorbox({width:"1034px",height:"100px", iframe:true}); $(".minipad").colorbox({width:"400px",height:"100px", iframe:true}); $(".midpad").colorbox({width:"480px",height:"100px", iframe:true}); $(".elementi").colorbox({width:"785px",height:"150px", iframe:true}); $(".pagina").colorbox({width:"960px",height:"150px", iframe:true, escKey:true,onLoad: function() { $('#cboxClose').remove(); $('#cboxTitle').remove(); } }); $('#logo').bind( 'tripleclick', function(event){ $.fn.colorbox({href:'http://www.vectordesign.it//vcmslogin', open: true, iframe: true, width:400, height:100}); }); }); /* AnythingSlider v1.5.6.4 By Chris Coyier: http://css-tricks.com with major improvements by Doug Neiner: http://pixelgraphics.us/ based on work by Remy Sharp: http://jqueryfordesigners.com/ crazy mods by Rob Garrison (aka Mottie) To use the navigationFormatter function, you must have a function that accepts two paramaters, and returns a string of HTML text. index = integer index (1 based); panel = jQuery wrapped LI item this tab references @return = Must return a string of HTML/Text navigationFormatter: function(index, panel){ return "Panel #" + index; // This would have each tab with the text 'Panel #X' where X = index } */ (function($) { $.anythingSlider = function(el, options) { // To avoid scope issues, use 'base' instead of 'this' // to reference this class from internal events and functions. var base = this; // Wraps the ul in the necessary divs and then gives Access to jQuery element base.$el = $(el).addClass('anythingBase').wrap('
'); // Add a reverse reference to the DOM object base.$el.data("AnythingSlider", base); base.init = function(){ base.options = $.extend({}, $.anythingSlider.defaults, options); if ($.isFunction(base.options.onBeforeInitialize)) { base.$el.bind('before_initialize', base.options.onBeforeInitialize); } base.$el.trigger('before_initialize', base); // Cache existing DOM elements for later // base.$el = original ul // for wrap - get parent() then closest in case the ul has "anythingSlider" class base.$wrapper = base.$el.parent().closest('div.anythingSlider').addClass('anythingSlider-' + base.options.theme); base.$window = base.$el.closest('div.anythingWindow'); base.$controls = $('
').appendTo( $(base.options.appendControlsTo).length ? $(base.options.appendControlsTo) : base.$wrapper); base.$nav = $('