/*
	* FunciÃ³n menuCamp
	* FunciÃ³n encargada de paginar los contenidos de campanas y promociones full
	* @param {string} Contienen el elemento [objeto] al que se le ha hecho click
*/
var porid = {
	idname: function(e) {
	if(e.target.id){
		if(eval("this."+e.target.id)!=undefined){
			eval("this."+e.target.id)(e.target);
			}
		}
	},
	menuCont : function(){
		$j(".seccCamp").hide();
		if(document.URL.match(/#n/)){
			url = document.URL.split("#");
			$j("#"+url[1]).show();
			$j("#link-"+url[1]).parent().addClass("acti");
		}
		else{
			$j("#n1").show();
			$j("#link-n1").parent().addClass("acti");
		}
	},
	startImagTop : function(){
		$j('.contImag').innerfade({
			animationtype: 'fade',
			speed: 200,
			timeout: 4000,
			type: 'random_start',
			containerheight: '336px'
		});},
	stopImagTop : function(e){
		clearTimeout(time);
		$j("#imagThum li").removeClass("acti");
		imag = e.target.id.split("-");
		$j(".contImag li").fadeOut(200)
		$j("#"+imag[1]).fadeIn(200);
		$j("#"+e.target.id).parent().parent().addClass("acti");
	},
}
var porclass = {
	boxShow : function(e){
		var id = e.target.id.split("link-");
		$j("#ocul-"+id[1]).fadeIn(500);
	},
	boxHide : function(e){
		var id = e.target.id.split("link-");
		$j("#ocul-"+id[1]).fadeOut(500);
	}
}

/*   DETECCION DE EVENTOS GENERALES  ------------------------------------------------------------------------*/
	var $j = jQuery.noConflict();
	//inicializamos todo
	$j(document).ready( function() {
	$j(".hide").hide();
	if(document.getElementById("imagBox")){
		porid.menuCont();
		porid.startImagTop();
		$j("#imagThum li a").bind("click",function(e){ porid.stopImagTop(e); return false; });
	}
	})