﻿// JAVASCRIPT VARS
// cache buster
var cacheBuster = "?t=" + Date.parse(new Date());
// stage dimensions		
var stageW = "776";
var stageH = "300";//"100%";

// ATTRIBUTES
var attributes = {};
attributes.id = 'flabanner';
attributes.name = 'flabanner';

// PARAMS
var params = {};
params.bgcolor = "#ffffff";
params.menu = "false";
params.scale = 'noScale';
params.wmode = "opaque";
params.allowfullscreen = "true";
params.allowScriptAccess = "always";			

/* FLASH VARS */
var flashvars = {};

/// if commented / delete these lines, the component will take the stage dimensions defined 
/// above in "JAVASCRIPT SECTIONS" section or those defined in the settings xml
flashvars.componentWidth = stageW;
flashvars.componentHeight = stageH;

/// path to the content folder(where the xml files, images or video are nested)
/// if you want to use absolute paths(like "http://domain.com/images/....") then leave it empty("")			
flashvars.pathToFiles = "";

// path to content XML
flashvars.xmlPath = "XML/banner.xml";

/** EMBED THE SWF**/
swfobject.embedSWF("FLV/preview.swf"+cacheBuster, attributes.id, stageW, stageH, "9.0.124", "FLV/expressInstall.swf", flashvars, params, attributes);

Cufon.replace('.cufon');

$(document).ready(function() {
    $('.kwicks').kwicks({
        duration: 300,
        max: 109,
        spacing: 0
    });
    $("#met").click(function() {
        $.fancybox({
            'href': "Horarios.aspx?Lin=" + $("#cboMP").val(),
            'width': 630,
            'height': '95%',
            'type': 'iframe',
            'centerOnScroll': true
        });
        return false;
    });
    $("#iti").click(function() {
        $.fancybox({
            'href': "Itinerarios.aspx?Lin=" + $("#cboMP").val(),
            'width': 630,
            'height': '95%',
            'type': 'iframe',
            'centerOnScroll': true
        });
        return false;
    });
    //    $("#mapa").click(function(){
    //        $.fancybox({
    //            'href':    "Mapa.aspx?lincod=" + $("#cboMP").val() + "&sentido=B",
    //            'width': '90%',
    //            'height': '90%',
    //            'type': 'iframe',
    //            'centerOnScroll': true
    //        });
    //        return false;
    //    });
    $("#lnc").click(function() {
        $.fancybox({
            'href': "Horarios.aspx?Lin=" + $("#cboLC").val(),
            'width': 610,
            'height': '90%',
            'type': 'iframe',
            'centerOnScroll': true
        });
        return false;
    });
});
