function UB_showHideObject(){var i,p,v,obj,args=UB_showHideObject.arguments;for(i=0;i<(args.length-1);i+=2){if((obj=MM_findObj(args[i]))!=null){v=args[i+1];if(obj.style){obj=obj.style;v=(v=='off')?'none':(v=='on')?'block':v;};obj.display=v;}}}
function UB_changeClass(){var i,myObj,myClass,args=UB_changeClass.arguments;for(i=0;i<(args.length-1);i+=2){myObj=MM_findObj(args[i]);myObj.className=args[i+1];}}
function UB_genPop(myUrl,myWinName,myWidth,myHeight,myPars){var winLeft=(screen.availWidth-myWidth)/2;var winTop=(screen.availHeight-myHeight)/2;var winParameters=myPars+'';if(winParameters==''){winParameters=',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no';};newWin=window.open(myUrl,myWinName,'width='+ myWidth +',height='+ myHeight +',left='+ winLeft +',top='+ winTop + winParameters);newWin.focus();}
var activeMNU,subTimeoutID,activeELM;
function UB_subMNUoff(myMNU){if(subTimeoutID){clearTimeout(subTimeoutID)};UB_showHideObject(myMNU,'off');subTimeoutID='';activeMNU='';subTimeoutID='';activeMNU='';if(activeELM){activeELMclassName=activeELM.firstChild.className;activeELM.firstChild.className=activeELMclassName.lastIndexOf(' ')?activeELMclassName.substring(0,activeELMclassName.lastIndexOf(' ')):' ';activeELM='';}}
function UB_timeout(myMNU,myTimeout){myTimeout=myTimeout?myTimeout:333;subTimeoutID=setTimeout("UB_subMNUoff('"+ myMNU +"')",myTimeout);}
function UB_subMNUon(myMNU,myElement){if(myMNU==activeMNU){if(subTimeoutID){clearTimeout(subTimeoutID)};subTimeoutID='';return;};if(activeMNU){UB_subMNUoff(activeMNU)};activeMNU=myMNU;UB_showHideObject(myMNU,'on');if(myElement){myElement.firstChild.className=(myElement.firstChild.className)?myElement.firstChild.className+' sel':'sel';activeELM=myElement;}}
var maxBkgToRoll=4,bkgRollDelay=5555,bkgToRoll=maxBkgToRoll,bkgRollID;
function UB_bkgRoll(){bkgToRoll=(bkgToRoll==maxBkgToRoll)?1:bkgToRoll+1;MM_findObj('page').style.background='url(/gfx/bkg_homepage'+ bkgToRoll +'.jpg)';for(var i=0;i<document.images.length;i++){myImgObj=document.images[i].src;if(myImgObj.lastIndexOf('.png'))myImgObj.style='behavior:url(/css/iepngfix.htc)';};bkgRollID=setTimeout("UB_bkgRoll()",bkgRollDelay);}
var activeGallery='beautycheques';
function UB_swapGallery(myGallery){if(myGallery==activeGallery){return};UB_showHideObject(activeGallery+'CNTNR','off',myGallery+'CNTNR','on');$('#'+activeGallery+'LNK').removeClass('active');$('#'+myGallery+'LNK').addClass('active');activeGallery=myGallery;}
var activeTabProd=4;
function UB_swapTabProd(myTab){if(myTab==activeTabProd){return};UB_showHideObject('elenco'+activeTabProd,'off','elenco'+myTab,'on');$('#lnk'+activeTabProd).removeClass('active');$('#lnk'+myTab).addClass('active');activeTabProd=myTab;}
/*
 * jqBookmark - a jquery Bookmark script
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file license.txt.
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to calisza@gmail.com so we can send you a copy immediately.
 *
 */
$(document).ready(function(){
	// add a "rel" attrib if Opera 7+
	if(window.opera) {
		if ($("a.jqbookmark").attr("rel") != ""){
			$("a.jqbookmark").attr("rel","sidebar");
		} 
	}

	$("a.jqbookmark").click(function(event){
		event.preventDefault();
		var url = this.href;
		var title = this.title;
		
		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title);
		} else if(window.opera) { // Opera 7+
			return false; // do nothing
		} else { 
			 alert('Unfortunately, this browser does not support the requested action,'
			 + ' please bookmark this page manually.');
		}
	
	});
});
